-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth_estimateGas and eth_call error if a non-zero value is specified without a funded from
address
#2869
Comments
Similar error if you just try an eth_call :(
|
from
addressfrom
address
hi @tkporter thanks for sharing this, I'll talk to the team internally and see how we can manage this. |
hi @tkporter, we have discussed internally and looks like the behavior is working as expected, I'll explain: The On On zkEVM our default sender address is As you already have mentioned, when you specify a |
wow that's wild! sorry for the false alarm. we run infrastructure on pretty much all the big EVM chains (mainnets & testnets) and have never ran into this before For posterity, I tried overriding the address(0) balance on eth to be 0 just to confirm, and this is true:
|
Btw, one of the more surprising things is we started running into this a couple days ago for the very first time, but previously had no issues. Unsure if a recent node upgrade could be the reason or what Edit: figured this out, was something on our side :) |
…hains to match addresses in MultiProtocolApp (#3001) ### Description Fixes 2 issues: 1. Estimates gas in Kathy by explicitly specifying the `from` address due to this bug with PolygonZkEvm when using a non-zero value 0xPolygonHermez/zkevm-node#2869 2. Now that we've added neutron & mantapacific as mainnet chains but we don't have helloworld deployments on these chains, Kathy was trying to send to & from these chains. To fix, I changed the constructor of `MultiProtocolApp` to intersect the multiProvider to only work with the chains specified in `addresses` ### Drive-by changes n/a ### Related issues n/a ### Backward compatibility ye ### Testing Ran kathy locally successfully & sent from polygonzkevm
System information
zkEVM Node version:
v0.0.X-RCXX
- unknown, whateverhttps://zkevm-rpc.com
is usingOS & Version:
Windows/Linux/OSX
- OSXCommit hash : (if
develop
)Network:
Mainnet/Testnet
- mainnetExpected behaviour
I should be able to estimate gas when calling a payable function with some value. For example, making an eth_estimateGas RPC against my smart contract at
0xaad207a0Fd7a4e3C927Ccc78ac8134baF586B852
and calling thesendHelloWorld
function with 0.01 ETH should give me a non-error outputHowever it complains presumably because the default account used for eth_estimateGas is assumed to have a balance of 0:
If I explicitly specify a from address with a balance, all is fine:
This is not expected behavior - all other EVM compatible chains work when estimating gas w/ value even without specifying the from address. For example, calling my same smart contract on Ethereum:
Actual behaviour
:(
Steps to reproduce the behaviour
Use
cast
as done above, or manually construct the eth_estimateGas using the params specifiedBacktrace
n/a
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: