Anyone here know the behavior that’s expected when a call (eth_call RPC) operation is performed against a function that is not a view function where the values provided are likely to result in the transaction failing?
i.e. trying to call an ERC20 transferFrom with an address that has no ETH and no allowance and has never actually be used before anywhere on the chain?
Apr 29, 2021, 3:42 PM
A revert in a call basically just ends the call. Calling non-view functions can be used to estimate the gas usage
Apr 29, 2021, 5:17 PM
I found the issue… it’s my bad 🙂 The accounts I had configured in the truffle test didn’t all have TLOS to cover the gas, so when I ran against my test network it failed the transaction but on the built-in node that truffle uses without specifying a network it passed.
I threw a check into the test and I can see that if you use the built-in node it sets up like 10 accounts all with 100 ETH
My test network only account[0] had a balance
Apr 29, 2021, 5:36 PM