1

With access to the contract abi, how can the data from a contract be read? You can get the byte code with eth_getCode but I don't understand how that can be converted to a readable form

1 Answer 1

2

I have found two methods for doing this:

  • The data in a contract can be iterated through using eth_getstorageat at 0x0, 0x1 etc. You can use the abi to find which variables are stored at each index.

  • Public variables are automatically assigned a getter function. This can be called with eth_call to return the value stored in that variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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