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>
impl<T: Config> FrameMeter<T>
Sourcepub fn charge_contract_deposit_and_transfer(
&mut self,
contract: T::AccountId,
amount: StorageDeposit<BalanceOf<T>>,
) -> DispatchResult
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.
Sourcepub fn record_contract_storage_changes(&mut self, diff: &Diff) -> DispatchResult
pub fn record_contract_storage_changes(&mut self, diff: &Diff) -> DispatchResult
Record storage changes of a contract.
Sourcepub fn finalize(&mut self, info: Option<&mut ContractInfo<T>>) -> DispatchResult
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.