pub struct InterchainTokenService;Implementations§
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_operator() -> [u8; 32]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_transfer_operatorship() -> [u8; 68]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_owner() -> [u8; 32]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_transfer_ownership() -> [u8; 64]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_paused() -> [u8; 32]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_pause() -> [u8; 28]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_unpause() -> [u8; 28]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_version() -> [u8; 32]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_required_auths() -> [u8; 44]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_upgrade() -> [u8; 60]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_migrate() -> [u8; 132]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_gateway() -> [u8; 32]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_execute() -> [u8; 196]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr___constructor() -> [u8; 288]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_gas_service() -> [u8; 36]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_chain_name() -> [u8; 36]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_its_hub_chain_name() -> [u8; 44]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_its_hub_address() -> [u8; 40]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_native_token_address() -> [u8; 44]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_interchain_token_wasm_hash() -> [u8; 56]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_token_manager_wasm_hash() -> [u8; 52]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_is_trusted_chain() -> [u8; 60]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_set_trusted_chain() -> [u8; 92]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_remove_trusted_chain() -> [u8; 92]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_interchain_token_id() -> [u8; 88]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_canonical_interchain_token_id() -> [u8; 88]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_linked_token_id() -> [u8; 84]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_interchain_token_address() -> [u8; 72]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_token_manager_address() -> [u8; 72]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_registered_token_address() -> [u8; 72]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_deployed_token_manager() -> [u8; 72]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_token_manager_type() -> [u8; 88]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_flow_limit() -> [u8; 64]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_flow_out_amount() -> [u8; 64]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_flow_in_amount() -> [u8; 64]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_set_flow_limit() -> [u8; 120]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_deploy_interchain_token() -> [u8; 220]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_deploy_remote_interchain_token() -> [u8; 200]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_register_canonical_token() -> [u8; 108]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_deploy_remote_canonical_token() -> [u8; 208]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_register_token_metadata() -> [u8; 164]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_register_custom_token() -> [u8; 200]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_link_token() -> [u8; 300]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_interchain_transfer() -> [u8; 260]
Source§impl InterchainTokenService
impl InterchainTokenService
pub const fn spec_xdr_transfer_token_admin() -> [u8; 120]
Trait Implementations§
Source§impl AxelarExecutableInterface for InterchainTokenService
impl AxelarExecutableInterface for InterchainTokenService
Source§fn execute(
env: &Env,
source_chain: String,
message_id: String,
source_address: String,
payload: Bytes,
) -> Result<(), <InterchainTokenService as CustomAxelarExecutable>::Error>
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
impl CustomAxelarExecutable for InterchainTokenService
type Error = ContractError
Source§fn __gateway(env: &Env) -> Address
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>
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
impl CustomMigratableInterface for InterchainTokenService
Source§type MigrationData = ()
type MigrationData = ()
Data needed during the migration. Each contract can define its own data type.
Choose
() if none is necessarySource§type Error = ContractError
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§impl InterchainTokenServiceInterface for InterchainTokenService
impl InterchainTokenServiceInterface for InterchainTokenService
Source§fn gas_service(env: &Env) -> Address
fn gas_service(env: &Env) -> Address
Returns the address of the Gas Service contract.
Source§fn chain_name(env: &Env) -> String
fn chain_name(env: &Env) -> String
Returns the name of the current chain.
Source§fn its_hub_chain_name(env: &Env) -> String
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
fn its_hub_address(env: &Env) -> String
Returns the address of the ITS Hub.
Source§fn native_token_address(env: &Env) -> Address
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>
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>
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
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>
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>
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>
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>
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>
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
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
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
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
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
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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
Source§fn link_token(
env: &Env,
deployer: Address,
salt: BytesN<32>,
destination_chain: String,
destination_token_address: Bytes,
token_manager_type: TokenManagerType,
link_params: Option<Bytes>,
gas_token: Option<Token>,
) -> Result<BytesN<32>, ContractError>
fn link_token( env: &Env, deployer: Address, salt: BytesN<32>, destination_chain: String, destination_token_address: Bytes, token_manager_type: TokenManagerType, link_params: Option<Bytes>, gas_token: Option<Token>, ) -> Result<BytesN<32>, ContractError>
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>
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>
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 moreSource§impl MigratableInterface for InterchainTokenService
impl MigratableInterface for InterchainTokenService
Source§type Error = ContractError
type Error = ContractError
Error type returned if the migration fails.
Source§fn migrate(
env: &Env,
migration_data: <InterchainTokenService as CustomMigratableInterface>::MigrationData,
) -> Result<(), ContractError>
fn migrate( env: &Env, migration_data: <InterchainTokenService as CustomMigratableInterface>::MigrationData, ) -> Result<(), ContractError>
Migrates contract state after upgrading the contract code.
Auto Trait Implementations§
impl Freeze for InterchainTokenService
impl RefUnwindSafe for InterchainTokenService
impl Send for InterchainTokenService
impl Sync for InterchainTokenService
impl Unpin for InterchainTokenService
impl UnsafeUnpin for InterchainTokenService
impl UnwindSafe for InterchainTokenService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
Source§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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