multiversx_sc_snippets::imports

Trait TxGas

Source
pub trait TxGas<Env>
where Env: TxEnv,
{ // Required methods fn gas_annotation(&self, env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>; fn gas_value(&self, env: &Env) -> u64; fn explicit_or_gas_left(&self, env: &Env) -> u64; }
Expand description

All typed that populate the gas field of a transaction need to implement this trait.

Required Methods§

Source

fn gas_annotation(&self, env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>

Source

fn gas_value(&self, env: &Env) -> u64

Source

fn explicit_or_gas_left(&self, env: &Env) -> u64

Implementations on Foreign Types§

Source§

impl<Env> TxGas<Env> for ()
where Env: TxEnv,

Source§

fn gas_annotation(&self, env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>

Source§

fn gas_value(&self, env: &Env) -> u64

Source§

fn explicit_or_gas_left(&self, _env: &Env) -> u64

Implementors§

Source§

impl<Env, GasValue> TxGas<Env> for ExplicitGas<GasValue>
where Env: TxEnv, GasValue: TxGasValue<Env>,