FrameMeter

Type Alias FrameMeter 

Source
pub type FrameMeter<T> = ResourceMeter<T, Nested>;
Expand description

The type of resource meter used for an execution frame.

Aliased Type§

pub struct FrameMeter<T> { /* private fields */ }

Implementations§

Source§

impl<T: Config> FrameMeter<T>

Source

pub fn charge_contract_deposit_and_transfer( &mut self, contract: T::AccountId, amount: StorageDeposit<BalanceOf<T>>, ) -> DispatchResult

Record a contract’s storage deposit and schedule the transfer.

Updates the frame’s deposit accounting and schedules the actual token transfer for later execution – at the end of the transaction execution.

Source

pub fn record_contract_storage_changes(&mut self, diff: &Diff) -> DispatchResult

Record storage changes of a contract.

Source

pub fn finalize(&mut self, info: Option<&mut ContractInfo<T>>) -> DispatchResult

Self::charge_contract_deposit_and_transfer and Self::record_contract_storage_changes does not enforce the storage limit since we want to do this check as late as possible to allow later refunds to offset earlier charges.