Conversation
|
Whoops, this was meant to be a personal PR. My bad folks 😅 |
|
Wait, but does hardhat network behave like that? |
|
It does appear to be working in this weird way in JS tests, yes. I am not sure what the correct behavior for |
|
How is |
|
A brief look at Geth makes me think an |
|
I looked into this a bit; both infura and remix throw errors. |
|
I can confirm that geth throws an "insufficient funds for intrinsic transaction cost" error and that hardhat doesn't. I opened NomicFoundation/hardhat#1529 to track this. |
|
I had no idea that was the expected behavior. Makes sense. It's simpler to implement with that restriction. BTW, @ben-chain @smartcontracts you may find this interesting: ethereum/execution-specs#35 -- There's an ongoing effort to standardized the JSON-RPC interface, including this kind of edge cases. It's just starting, but I guess it can be useful for you. |
So it appears that if the
eth_call'svalueargument is greater than thefromargument's current balance, it behaves as if thefrom's balance wasorigBalance + (value - origBalance) * 2. Bizarre... logs are: