September 2019
Beginner to intermediate
540 pages
13h 3m
English
Once we get a smart contract instance, it will be quite easy to get the token name and symbol information and display it on our navigation bar. Here is the code to get symbol:
const symbol = await contractInstance.methods.symbol().call()
Note that contractInstance.methods.myMethod([param1[, param2[, ...]]]).call(transactionObject, blockNumber, callback]) in web3 is used to return a result from a read-only method. This call() function does not send any transaction in EVM.
The params call transaction object can be an optional input, as shown here:
Read now
Unlock full access