Introduce a standalone gas estimate type #12250
Labels
A-rpc
Related to the RPC implementation
C-enhancement
New feature or request
S-needs-triage
This issue needs to be labelled
Describe the feature
with
reth/crates/rpc/rpc-eth-api/src/node.rs
Line 12 in bd8c4ec
we now have a way to plugin additional logic into the rpc stack:
for example:
reth/crates/rpc/rpc-eth-api/src/helpers/spec.rs
Lines 17 to 18 in bd8c4ec
we can use this as the entrypoint to abstract away more evm specific logic, for example gas estimation:
reth/crates/rpc/rpc-eth-api/src/helpers/call.rs
Lines 51 to 59 in bd8c4ec
which has a very simple interface
but perhaps it would be simpler if we introduce a new trait and type like
EthApiCore {type Estimator;}
so that it can plugged into the rpc stack by implementingso we can do
trait Call: EthApiCore< Estimator: impl trait GasEstimator>
or similar.this can then be plugged into the rpc type like
reth/crates/optimism/rpc/src/eth/mod.rs
Line 116 in bd8c4ec
this means we need to convert this into a standalone type first:
reth/crates/rpc/rpc-eth-api/src/helpers/call.rs
Lines 684 to 703 in bd8c4ec
Additional context
No response
The text was updated successfully, but these errors were encountered: