Trait fc_rpc::EstimateGasAdapter
source · pub trait EstimateGasAdapter {
// Required method
fn adapt_request(request: TransactionRequest) -> TransactionRequest;
}
Expand description
Allow to adapt a request for estimate_gas
.
Can be used to estimate gas of some contracts using a different function
in the case the normal gas estimation doesn’t work.
Example: a precompile that tries to do a subcall but succeeds regardless of the success of the subcall. The gas estimation will thus optimize the gas limit down to the minimum, while we want to estimate a gas limit that will allow the subcall to have enough gas to succeed.
Required Methods§
fn adapt_request(request: TransactionRequest) -> TransactionRequest
Object Safety§
This trait is not object safe.