Overview
This has been proposed on ethereum/execution-apis
We need a new eth_fillTransaction RPC method that: (1) prepares a transaction by filling in missing fields (nonce, gas limit, fees, chain id, etc), and (2) simulates it with the same semantics as eth_call / eth_estimateGas, throwing with revert data if needed.
Currently, we use the following RPC methods to fill a transaction:
eth_getTransactionCount: for nonce
eth_maxPriorityFeePerGas: for maxPriorityFeePerGas
eth_getBlockByNumber: for maxFeePerGas (block.baseFee + maxPriorityFeePerGas)
eth_estimateGas: for gas
eth_chainId: for chainId
This is not ideal, because some of these calls depend on each other, which introduces increased latency. We should consolidate all these into the one "fill transaction" method.
Overview
This has been proposed on
ethereum/execution-apisWe need a new
eth_fillTransactionRPC method that: (1) prepares a transaction by filling in missing fields (nonce, gas limit, fees, chain id, etc), and (2) simulates it with the same semantics aseth_call/eth_estimateGas, throwing with revert data if needed.Currently, we use the following RPC methods to fill a transaction:
eth_getTransactionCount: fornonceeth_maxPriorityFeePerGas: formaxPriorityFeePerGaseth_getBlockByNumber: formaxFeePerGas(block.baseFee+maxPriorityFeePerGas)eth_estimateGas: forgaseth_chainId: forchainIdThis is not ideal, because some of these calls depend on each other, which introduces increased latency. We should consolidate all these into the one "fill transaction" method.