Struct evm_gasometer::Gasometer [−][src]
pub struct Gasometer<'config> { /* fields omitted */ }
Expand description
EVM gasometer.
Implementations
Create a new gasometer with given gas limit and config.
Returns the numerical gas cost value.
Total used gas.
Refunded gas.
Explictly fail the gasometer with out of gas. Return OutOfGas
error.
Record CREATE
code deposit.
pub fn record_dynamic_cost(
&mut self,
cost: GasCost,
memory: Option<MemoryCost>
) -> Result<(), ExitError>
pub fn record_dynamic_cost(
&mut self,
cost: GasCost,
memory: Option<MemoryCost>
) -> Result<(), ExitError>
Record opcode gas cost.
Record transaction cost.
Trait Implementations
Auto Trait Implementations
impl<'config> RefUnwindSafe for Gasometer<'config>
impl<'config> UnwindSafe for Gasometer<'config>
Blanket Implementations
Mutably borrows from an owned value. Read more