I am using Truffle
for writing smart contract and using drizzle and drizzle-react for communicating with smart contract.
I have configured as tutorial said. After that, I try to print out:
this.props.contracts.MyContract
It will print a bunch of public state, public method on smart contracts ... So I think when come to this step, there is no problem.
But when I try to call method as tutorial:
this.props.contracts.MyContract.methods.set(this.state.storageAmount).send()
I meet exception because inside this.props.contracts.MyContract
, there is no methods
object, so it will undefined. What am I wrong ? Please tell me.