1

I'm trying to interact with a smart contract I deployed with truffle using web3py I can't figure out how to load the abi string into the web3py eth.contract function

contract = w3.eth.contract(address=contract_address, abi=...)

How do I load my ABI [ ] interface into the above function

0

In the latest version of web3py, the abi field accepts either of two types:

  • a list of dictionaries, defining the ABI
  • a string, that is the json-encoded version of the ABI

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.