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
When developing the new erc20 precompile, I find the current precompiles code structure is not ideal, there are a few issues:
Each precompile has to duplicate the "out of gas" panic recovering, gas metering, BalanceHandler, and those are critical logics for stateful precompiles to function correctly, fail to include one of them could cause disastrous issue.
It has to recover panic twice in the same precompile, in the RunSetup and precompile Run itself.
ABI handling is intertwined with the native state handling, make it hard to implement stateful precompiles that don't use the go-ethereum/accounts/abi library for the API.