June 2018
Beginner to intermediate
170 pages
3h 46m
English
Now, let's write some JavaScript and make use of the web3 library. Don't worry if you are not familiar with web3, you will see more of that in Chapter 2, Web3 and Solidity in Truffle. For now, you will interact with web3 just enough to get a fully working Dapp.
In app.js, paste the following code:
import { default as Web3} from 'web3';import { default as contract } from 'truffle-contract'import taskMasterArtifacts from '../../build/contracts/TaskMaster.json'
By pasting in the preceding code, you just imported the following: