Trait ibc::apps::nft_transfer::context::NftTransferExecutionContext
source · pub trait NftTransferExecutionContext: NftTransferValidationContext {
// Required methods
fn create_or_update_class_execute(
&self,
class_id: &PrefixedClassId,
class_uri: Option<&ClassUri>,
class_data: Option<&ClassData>
) -> Result<(), NftTransferError>;
fn escrow_nft_execute(
&mut self,
from_account: &Self::AccountId,
port_id: &PortId,
channel_id: &ChannelId,
class_id: &PrefixedClassId,
token_id: &TokenId,
memo: &Memo
) -> Result<(), NftTransferError>;
fn unescrow_nft_execute(
&mut self,
to_account: &Self::AccountId,
port_id: &PortId,
channel_id: &ChannelId,
class_id: &PrefixedClassId,
token_id: &TokenId
) -> Result<(), NftTransferError>;
fn mint_nft_execute(
&mut self,
account: &Self::AccountId,
class_id: &PrefixedClassId,
token_id: &TokenId,
token_uri: Option<&TokenUri>,
token_data: Option<&TokenData>
) -> Result<(), NftTransferError>;
fn burn_nft_execute(
&mut self,
account: &Self::AccountId,
class_id: &PrefixedClassId,
token_id: &TokenId,
memo: &Memo
) -> Result<(), NftTransferError>;
}
Expand description
Read-write methods required in NFT transfer execution context.
Required Methods§
sourcefn create_or_update_class_execute(
&self,
class_id: &PrefixedClassId,
class_uri: Option<&ClassUri>,
class_data: Option<&ClassData>
) -> Result<(), NftTransferError>
fn create_or_update_class_execute( &self, class_id: &PrefixedClassId, class_uri: Option<&ClassUri>, class_data: Option<&ClassData> ) -> Result<(), NftTransferError>
Creates a new NFT Class identified by classId. If the class ID already exists, it updates the class metadata.
sourcefn escrow_nft_execute(
&mut self,
from_account: &Self::AccountId,
port_id: &PortId,
channel_id: &ChannelId,
class_id: &PrefixedClassId,
token_id: &TokenId,
memo: &Memo
) -> Result<(), NftTransferError>
fn escrow_nft_execute( &mut self, from_account: &Self::AccountId, port_id: &PortId, channel_id: &ChannelId, class_id: &PrefixedClassId, token_id: &TokenId, memo: &Memo ) -> Result<(), NftTransferError>
Executes the escrow of the NFT in a user account.
memo
field allows to incorporate additional contextual details in the
escrow execution.
sourcefn unescrow_nft_execute(
&mut self,
to_account: &Self::AccountId,
port_id: &PortId,
channel_id: &ChannelId,
class_id: &PrefixedClassId,
token_id: &TokenId
) -> Result<(), NftTransferError>
fn unescrow_nft_execute( &mut self, to_account: &Self::AccountId, port_id: &PortId, channel_id: &ChannelId, class_id: &PrefixedClassId, token_id: &TokenId ) -> Result<(), NftTransferError>
Executes the unescrow of the NFT in a user account.
sourcefn mint_nft_execute(
&mut self,
account: &Self::AccountId,
class_id: &PrefixedClassId,
token_id: &TokenId,
token_uri: Option<&TokenUri>,
token_data: Option<&TokenData>
) -> Result<(), NftTransferError>
fn mint_nft_execute( &mut self, account: &Self::AccountId, class_id: &PrefixedClassId, token_id: &TokenId, token_uri: Option<&TokenUri>, token_data: Option<&TokenData> ) -> Result<(), NftTransferError>
Executes minting of the NFT in a user account.
sourcefn burn_nft_execute(
&mut self,
account: &Self::AccountId,
class_id: &PrefixedClassId,
token_id: &TokenId,
memo: &Memo
) -> Result<(), NftTransferError>
fn burn_nft_execute( &mut self, account: &Self::AccountId, class_id: &PrefixedClassId, token_id: &TokenId, memo: &Memo ) -> Result<(), NftTransferError>
Executes burning of the NFT in a user account.
memo
field allows to incorporate additional contextual details in the
burn execution.
Object Safety§
This trait is not object safe.