You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👋 Hi Geth team! The web3py team is looking to support the state override parameter in eth_call and we're running into some unexpected behavior. It looks like @rjl493456442 implemented this in #19917. Please see details below!
System information
Geth version: v1.10.1
OS & Version: OSX
Expected behaviour
When using the state override argument for eth_call, I expect that a change to the Solidity code will return the expected result. See steps to reproduce below.
Actual behaviour
It looks like some bytecode is returned instead of the expected int, but haven't been able to figure out what the bytecode represents.
Steps to reproduce the behaviour
Following the example in the docs here leads to the expected behavior. I'm using curl with Rinkeby on Infura.
@kclowes You have to attach the runtime bytecode in order to override the contract code. In your case the bytecode is for deployment.
Can you please try the 6080604052348015600f57600080fd5b506004361060285760003560e01c80630be5b6ba14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000602a90509056fea265627a7a72315820cf283c7cc96ce94c0a7d6f99cb6e0c6ae854d84d7ca945bb68e9923ff7383ed264736f6c63430005110032 instead? Or you can copy the runtime bytecode from the remix output.
👋 Hi Geth team! The web3py team is looking to support the state override parameter in
eth_call
and we're running into some unexpected behavior. It looks like @rjl493456442 implemented this in #19917. Please see details below!System information
Geth version: v1.10.1
OS & Version: OSX
Expected behaviour
When using the state override argument for
eth_call
, I expect that a change to the Solidity code will return the expected result. See steps to reproduce below.Actual behaviour
It looks like some bytecode is returned instead of the expected int, but haven't been able to figure out what the bytecode represents.
Steps to reproduce the behaviour
Following the example in the docs here leads to the expected behavior. I'm using curl with Rinkeby on Infura.
Working as expected:
bytecode (from Remix):
6080604052348015600f57600080fd5b5060888061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80630be5b6ba14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b600060075490509056fea265627a7a72315820c20a98eb83e0fa5a4f0c05d6f392484e4d8009ccacdedd0c6884c53210f8ab5f64736f6c63430005110032
function hash (from Remix):
0be5b6ba
which is correct.
However, changing the Solidity code to:
bytecode (from Remix):
6080604052348015600f57600080fd5b5060878061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80630be5b6ba14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000602a90509056fea265627a7a723158209dca50efe62375ee4d60d5d21ee28edd70e2afa4558b9f8560778158274c9eed64736f6c63430005110032
function hash (from Remix):
0be5b6ba
Then:
I expect result to return 42 after decoding.
It's also worth noting that neither Remix nor py-solc-x generates the same bytecode from the Solidity contract source shown in the docs.
I'm not sure if this is a bug or a documentation issue or a decoding issue on our end.
Thanks!
The text was updated successfully, but these errors were encountered: