InterchainTokenExecutableInterface

Trait InterchainTokenExecutableInterface 

Source
pub trait InterchainTokenExecutableInterface: CustomInterchainTokenExecutable + DeriveOnly {
    // Required methods
    fn interchain_token_service(env: &Env) -> Address;
    fn execute_with_interchain_token(
        env: &Env,
        source_chain: String,
        message_id: String,
        source_address: Bytes,
        payload: Bytes,
        token_id: BytesN<32>,
        token_address: Address,
        amount: i128,
    ) -> Result<(), Error>;
}
Expand description

Interface for an Interchain Token Executable app. Use the InterchainTokenExecutable derive macro to implement this interface.

DO NOT IMPLEMENT THIS MANUALLY!

Required Methods§

Source

fn interchain_token_service(env: &Env) -> Address

Returns the address of the interchain token service contract that is authorized to execute arbitrary payloads on this contract

Source

fn execute_with_interchain_token( env: &Env, source_chain: String, message_id: String, source_address: Bytes, payload: Bytes, token_id: BytesN<32>, token_address: Address, amount: i128, ) -> Result<(), Error>

Execute a cross-chain message with the given payload and token.

§Authorization
  • Only callable by ITS contract.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§