September 2019
Beginner to intermediate
540 pages
13h 3m
English
In the web3 section, we learned how to instantiate a web3 instance. To call a deployed contract instance from the blockchain network, web3 provides an API—web3.eth.Contract(JSON Interface, address, options)—for this purpose. The next screenshot shows how we can get the DigitalArtContract instance:

We first load the compiled DigitalArt.json ABI file. By reading networkId through the web3 API—web3.eth.net.getId(), we can find the network address from the ABI file—network[networkId].
We then call the web API (web3.eth.Contract) to get the contract instance. To build the frontend components, we will ...
Read now
Unlock full access