Skip to main content

InterchainTokenService

Struct InterchainTokenService 

Source
pub struct InterchainTokenService;

Implementations§

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_operator() -> [u8; 32]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_owner() -> [u8; 32]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_paused() -> [u8; 32]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_pause() -> [u8; 28]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_unpause() -> [u8; 28]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_version() -> [u8; 32]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_required_auths() -> [u8; 44]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_upgrade() -> [u8; 60]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_migrate() -> [u8; 132]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_gateway() -> [u8; 32]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_execute() -> [u8; 196]

Source§

impl InterchainTokenService

Source

pub fn __constructor( env: Env, owner: Address, operator: Address, gateway: Address, gas_service: Address, its_hub_address: String, chain_name: String, native_token_address: Address, interchain_token_wasm_hash: BytesN<32>, token_manager_wasm_hash: BytesN<32>, )

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr___constructor() -> [u8; 288]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_gas_service() -> [u8; 36]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_chain_name() -> [u8; 36]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_its_hub_address() -> [u8; 40]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_linked_token_id() -> [u8; 84]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_flow_limit() -> [u8; 64]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_flow_out_amount() -> [u8; 64]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_flow_in_amount() -> [u8; 64]

Source§

impl InterchainTokenService

Source

pub const fn spec_xdr_set_flow_limit() -> [u8; 120]

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Source§

impl InterchainTokenService

Trait Implementations§

Source§

impl AxelarExecutableInterface for InterchainTokenService

Source§

fn gateway(env: &Env) -> Address

Return the trusted gateway contract id.
Source§

fn execute( env: &Env, source_chain: String, message_id: String, source_address: String, payload: Bytes, ) -> Result<(), <InterchainTokenService as CustomAxelarExecutable>::Error>

Execute a cross-chain message with the given payload. This function must validate that the message is received from the trusted gateway.
Source§

impl CustomAxelarExecutable for InterchainTokenService

Source§

type Error = ContractError

Source§

fn __gateway(env: &Env) -> Address

Custom implementation of the gateway query function that’s called by AxelarExecutableInterface::gateway.
Source§

fn __execute( env: &Env, source_chain: String, message_id: String, source_address: String, payload: Bytes, ) -> Result<(), Self::Error>

Custom implementation of the execute function that’s called by AxelarExecutableInterface::execute after validation has succeeded. It is guaranteed that the validate_message function has already been called when this function is executed.
Source§

impl CustomMigratableInterface for InterchainTokenService

Source§

type MigrationData = ()

Data needed during the migration. Each contract can define its own data type. Choose () if none is necessary
Source§

type Error = ContractError

Error type returned if the migration fails. It must implement the Into<ContractError> trait if migration is implemented with the #[derive(Upgradable)] macro.
Source§

fn __migrate( _env: &Env, _migration_data: Self::MigrationData, ) -> Result<(), Self::Error>

Migrates contract state after upgrading the contract code.
Source§

impl InterchainTokenServiceInterface for InterchainTokenService

Source§

fn gas_service(env: &Env) -> Address

Returns the address of the Gas Service contract.
Source§

fn chain_name(env: &Env) -> String

Returns the name of the current chain.
Source§

fn its_hub_chain_name(env: &Env) -> String

Returns the name of the chain on which the ITS Hub is deployed.
Source§

fn its_hub_address(env: &Env) -> String

Returns the address of the ITS Hub.
Source§

fn native_token_address(env: &Env) -> Address

Returns the address of the native token on the current chain.
Source§

fn interchain_token_wasm_hash(env: &Env) -> BytesN<32>

Returns the WASM hash of the token contract used for deploying interchain tokens.
Source§

fn token_manager_wasm_hash(env: &Env) -> BytesN<32>

Returns the WASM hash of the token manager contract used for deploying token managers.
Source§

fn is_trusted_chain(env: &Env, chain: String) -> bool

Returns whether the specified chain is trusted for cross-chain messaging.
Source§

fn set_trusted_chain(env: &Env, chain: String) -> Result<(), ContractError>

Sets the specified chain as trusted for cross-chain messaging. Read more
Source§

fn remove_trusted_chain(env: &Env, chain: String) -> Result<(), ContractError>

Removes the specified chain from trusted chains. Read more
Source§

fn interchain_token_id( env: &Env, deployer: Address, salt: BytesN<32>, ) -> BytesN<32>

Computes the unique identifier for an interchain token. Read more
Source§

fn canonical_interchain_token_id( env: &Env, token_address: Address, ) -> BytesN<32>

Computes a 32-byte token id for a canonical token. Read more
Source§

fn linked_token_id(env: &Env, deployer: Address, salt: BytesN<32>) -> BytesN<32>

Computes a 32-byte token id for a linked token. Read more
Source§

fn interchain_token_address(env: &Env, token_id: BytesN<32>) -> Address

Returns the predicted address of the native interchain token associated with the specified token ID. Read more
Source§

fn token_manager_address(env: &Env, token_id: BytesN<32>) -> Address

Returns the predicted address of the token manager that will be deployed for the specified token ID. Read more
Source§

fn registered_token_address(env: &Env, token_id: BytesN<32>) -> Address

Returns the address of the token associated with the specified token ID.
Source§

fn deployed_token_manager(env: &Env, token_id: BytesN<32>) -> Address

Returns the address of the token manager associated with the specified token ID.
Source§

fn token_manager_type(env: &Env, token_id: BytesN<32>) -> TokenManagerType

Returns the type of the token manager associated with the specified token ID.
Source§

fn flow_limit(env: &Env, token_id: BytesN<32>) -> Option<i128>

Returns the flow limit for the token associated with the specified token ID. Returns None if no limit is set.
Source§

fn flow_out_amount(env: &Env, token_id: BytesN<32>) -> i128

Returns the amount that has flowed out of the chain to other chains during the current epoch for the token associated with the specified token ID.
Source§

fn flow_in_amount(env: &Env, token_id: BytesN<32>) -> i128

Retrieves the amount that has flowed into the chain from other chains during the current epoch for the token associated with the specified token ID.
Source§

fn set_flow_limit( env: &Env, token_id: BytesN<32>, flow_limit: Option<i128>, ) -> Result<(), ContractError>

Sets or updates the flow limit for a token. Read more
Source§

fn deploy_interchain_token( env: &Env, caller: Address, salt: BytesN<32>, token_metadata: TokenMetadata, initial_supply: i128, minter: Option<Address>, ) -> Result<BytesN<32>, ContractError>

Deploys a new interchain token on the current chain with specified metadata and optional initial supply. If initial supply is provided, it is minted to the caller. The caller can also specify an optional minter address for the interchain token. Read more
Source§

fn deploy_remote_interchain_token( env: &Env, caller: Address, salt: BytesN<32>, destination_chain: String, gas_token: Option<Token>, ) -> Result<BytesN<32>, ContractError>

Initiates the deployment of an interchain token to a specified destination chain. Read more
Source§

fn register_canonical_token( env: &Env, token_address: Address, ) -> Result<BytesN<32>, ContractError>

Registers a canonical token as an interchain token. Read more
Source§

fn deploy_remote_canonical_token( env: &Env, token_address: Address, destination_chain: String, spender: Address, gas_token: Option<Token>, ) -> Result<BytesN<32>, ContractError>

Deploys a remote canonical token on a specified destination chain. Read more
Source§

fn register_token_metadata( env: &Env, token_address: Address, spender: Address, gas_token: Option<Token>, ) -> Result<(), ContractError>

Registers token metadata with the ITS Hub. Read more
Source§

fn register_custom_token( env: &Env, deployer: Address, salt: BytesN<32>, token_address: Address, token_manager_type: TokenManagerType, ) -> Result<BytesN<32>, ContractError>

Registers a custom token as an interchain token. Read more
Links a remote token on the destination chain to a local token corresponding to the token ID computed from the provided salt. Read more
Source§

fn interchain_transfer( env: &Env, caller: Address, token_id: BytesN<32>, destination_chain: String, destination_address: Bytes, amount: i128, data: Option<Bytes>, gas_token: Option<Token>, ) -> Result<(), ContractError>

Initiates a cross-chain token transfer. Read more
Source§

fn transfer_token_admin( env: &Env, token_id: BytesN<32>, new_admin: Address, ) -> Result<(), ContractError>

Transfers the admin role of a Stellar Classic Asset registered under the token_id from the corresponding token manager to the new_admin. Read more
Source§

impl MigratableInterface for InterchainTokenService

Source§

type Error = ContractError

Error type returned if the migration fails.
Source§

fn migrate( env: &Env, migration_data: <InterchainTokenService as CustomMigratableInterface>::MigrationData, ) -> Result<(), ContractError>

Migrates contract state after upgrading the contract code.
Source§

impl OperatableInterface for InterchainTokenService

Source§

fn operator(env: &Env) -> Address

Returns the address of the contract’s operator.
Source§

fn transfer_operatorship(env: &Env, new_operator: Address)

Transfers operatorship of the contract to a new address.
Source§

impl OwnableInterface for InterchainTokenService

Source§

fn owner(env: &Env) -> Address

Returns the address of the contract’s owner.
Source§

fn transfer_ownership(env: &Env, new_owner: Address)

Transfers ownership of the contract to a new address.
Source§

impl PausableInterface for InterchainTokenService

Source§

fn paused(env: &Env) -> bool

Returns whether the contract is currently paused.
Source§

fn pause(env: &Env)

Pauses the contract. Only callable by the owner.
Source§

fn unpause(env: &Env)

Unpauses the contract. Only callable by the owner.
Source§

impl UpgradableInterface for InterchainTokenService

Source§

fn version(env: &Env) -> String

Returns the current version of the contract.
Source§

fn required_auths(env: &Env) -> Vec<Address>

Returns all addresses the contract authorizes before upgrading.
Source§

fn upgrade(env: &Env, new_wasm_hash: BytesN<32>)

Upgrades the contract to a new WASM hash.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, C> Compare<&T> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare(&self, a: &&T, b: &&T) -> Result<Ordering, <C as Compare<&T>>::Error>

Source§

impl<T, U, E, C> Compare<(T, U)> for C
where C: Compare<T, Error = E, Error = E> + Compare<U>,

Source§

type Error = E

Source§

fn compare( &self, a: &(T, U), b: &(T, U), ) -> Result<Ordering, <C as Compare<(T, U)>>::Error>

Source§

impl<T, U, V, E, C> Compare<(T, U, V)> for C
where C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,

Source§

impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W>,

Source§

impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W> + Compare<X>,

Source§

impl<T, C> Compare<Box<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Box<T>, b: &Box<T>, ) -> Result<Ordering, <C as Compare<Box<T>>>::Error>

Source§

impl<T, C> Compare<Option<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Option<T>, b: &Option<T>, ) -> Result<Ordering, <C as Compare<Option<T>>>::Error>

Source§

impl<T, C> Compare<Rc<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Rc<T>, b: &Rc<T>, ) -> Result<Ordering, <C as Compare<Rc<T>>>::Error>

Source§

impl<T, C> Compare<Vec<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Vec<T>, b: &Vec<T>, ) -> Result<Ordering, <C as Compare<Vec<T>>>::Error>

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<E, T, U> IntoVal<E, T> for U
where E: Env, T: FromVal<E, U>,

Source§

fn into_val(&self, e: &E) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<E, T, U> TryIntoVal<E, T> for U
where E: Env, T: TryFromVal<E, U>,

Source§

type Error = <T as TryFromVal<E, U>>::Error

Source§

fn try_into_val(&self, env: &E) -> Result<T, <U as TryIntoVal<E, T>>::Error>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V