Trait TokenTransferExecutionContext

Source
pub trait TokenTransferExecutionContext: TokenTransferValidationContext {
    // Required methods
    fn escrow_coins_execute(
        &mut self,
        from_account: &Self::AccountId,
        port_id: &PortId,
        channel_id: &ChannelId,
        coin: &PrefixedCoin,
        memo: &Memo,
    ) -> Result<(), HostError>;
    fn unescrow_coins_execute(
        &mut self,
        to_account: &Self::AccountId,
        port_id: &PortId,
        channel_id: &ChannelId,
        coin: &PrefixedCoin,
    ) -> Result<(), HostError>;
    fn mint_coins_execute(
        &mut self,
        account: &Self::AccountId,
        coin: &PrefixedCoin,
    ) -> Result<(), HostError>;
    fn burn_coins_execute(
        &mut self,
        account: &Self::AccountId,
        coin: &PrefixedCoin,
        memo: &Memo,
    ) -> Result<(), HostError>;
}
Expand description

Methods required in token transfer execution, to be implemented by the host.

Required Methods§

Source

fn escrow_coins_execute( &mut self, from_account: &Self::AccountId, port_id: &PortId, channel_id: &ChannelId, coin: &PrefixedCoin, memo: &Memo, ) -> Result<(), HostError>

Executes the escrow of the tokens in a user account.

memo field allows incorporating additional contextual details in the escrow execution.

Source

fn unescrow_coins_execute( &mut self, to_account: &Self::AccountId, port_id: &PortId, channel_id: &ChannelId, coin: &PrefixedCoin, ) -> Result<(), HostError>

Executes the unescrow of the tokens in a user account.

Source

fn mint_coins_execute( &mut self, account: &Self::AccountId, coin: &PrefixedCoin, ) -> Result<(), HostError>

Executes minting of the tokens in a user account.

Source

fn burn_coins_execute( &mut self, account: &Self::AccountId, coin: &PrefixedCoin, memo: &Memo, ) -> Result<(), HostError>

Executes burning of the tokens in a user account.

memo field allows incorporating additional contextual details in the burn execution.

Implementors§