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:


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:


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.


contracts can be accessed via context in component. make sure that you defined drizzle context types and assign contracts as this.contracts = context.drizzle.contracts in your component.

btw see my pr on github

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.