Trait fvm::kernel::GasOps

source ·
pub trait GasOps {
    // Required methods
    fn gas_used(&self) -> Gas;
    fn gas_available(&self) -> Gas;
    fn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()>;
    fn price_list(&self) -> &PriceList;
}
Expand description

Operations for explicit gas charging.

Required Methods§

source

fn gas_used(&self) -> Gas

Returns the gas used by the transaction so far.

source

fn gas_available(&self) -> Gas

Returns the remaining gas for the transaction.

source

fn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()>

ChargeGas charges specified amount of gas for execution. name provides information about gas charging point.

source

fn price_list(&self) -> &PriceList

Returns the currently active gas price list.

Implementors§

source§

impl<C> GasOps for DefaultKernel<C>
where C: CallManager,