-
Notifications
You must be signed in to change notification settings - Fork 108
Failed to read smart contracts #7
Copy link
Copy link
Open
Description
I failed to read smart contracts with this code. Can anyone help?
const abi = [{"constant":true,"inputs":[],"name":"mintingFinished",...}]
const address = '0xd26114cd6EE289AccF82350c8d8487fedB8A0C07'
const contract = new web3.eth.Contract(abi, address)
contract.methods.totalSupply().call((err, result) => { console.log(result) })
contract.methods.name().call((err, result) => { console.log(result) })
contract.methods.symbol().call((err, result) => { console.log(result) })
contract.methods.balanceOf('0xd26114cd6EE289AccF82350c8d8487fedB8A0C07').call((err, result) => { console.log(result) })
The output:
undefined
undefined
undefined
undefined
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels