April 2017
Intermediate to advanced
266 pages
7h 4m
English
Before we start learning about truffle-contract APIs, we need to set up a testing environment, which will help us test our code while learning.
First of all, run the ethereumjs-testrpc node representing network ID 10 by just running the testrpc --networkId 10 command. We have randomly chosen network ID 10 for development purposes, but you are free to choose any other network ID. Just make sure it's not 1 as mainnet is always used in live apps and not for development and testing purposes.
Then, create an HTML file and place this code in it:
<!doctype html> <html> <body> <script type="text/javascript" src="./web3.min.js"></script> <script type="text/javascript" src="./truffle- contract.min.js"></script> ...
Read now
Unlock full access