fn pause(env: soroban_sdk::Env)
fn paused(env: soroban_sdk::Env) -> bool
fn unpause(env: soroban_sdk::Env)
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
operator: soroban_sdk::Address,
)
fn denylist(env: soroban_sdk::Env, account: soroban_sdk::Address)
fn get_admin(env: soroban_sdk::Env) -> Option
fn get_owner(env: soroban_sdk::Env) -> Option
fn get_pauser(env: soroban_sdk::Env) -> Option
fn get_min_fee(env: soroban_sdk::Env, burn_token: soroban_sdk::Address) -> i128
fn get_rescuer(env: soroban_sdk::Env) -> Option
fn set_min_fee(env: soroban_sdk::Env, burn_token: soroban_sdk::Address, min_fee: i128)
fn un_denylist(env: soroban_sdk::Env, account: soroban_sdk::Address)
fn accept_admin(env: soroban_sdk::Env)
fn rescue_sep41(
env: soroban_sdk::Env,
token_contract: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
Initializes the TokenMessengerMinterV2 contract.
env - Access to the Soroban environment.params - Initialization parameters including:owner: The contract owner address.pauser: The address authorized to pause/unpause the contract.rescuer: The address authorized to rescue tokens.token_controller: The address authorized to manage token configurations.admin: The contract admin address.fee_recipient: The address that receives fees.min_fee_controller: The address that controls min fee configuration.denylister: The address authorized to manage the denylist.message_transmitter: The local MessageTransmitter contract address.message_body_version: The version for burn message bodies.remote_domains: List of remote domain identifiers.remote_token_messengers: Corresponding remote token messenger addresses.remote_domains and remote_token_messengers have different lengths.RemoteTokenMessengerError::ZeroAddressfn __constructor(
env: soroban_sdk::Env,
params: TokenMessengerMinterV2ContractInitParams,
)
fn is_denylisted(env: soroban_sdk::Env, account: soroban_sdk::Address) -> bool
fn update_pauser(env: soroban_sdk::Env, new_pauser: soroban_sdk::Address)
fn get_denylister(env: soroban_sdk::Env) -> Option
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
expires_in_ledgers: u32,
)
fn update_rescuer(env: soroban_sdk::Env, new_rescuer: soroban_sdk::Address)
fn get_local_token(
env: soroban_sdk::Env,
remote_domain: u32,
remote_token: soroban_sdk::BytesN<32>,
) -> Option
fn link_token_pair(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
remote_domain: u32,
remote_token: soroban_sdk::BytesN<32>,
)
fn accept_ownership(env: soroban_sdk::Env)
Deposits and burns tokens from sender to be minted on destination domain.
e - Access to the Soroban environment.caller - The address of the caller depositing tokens.amount - Amount of tokens to burn (must be non-zero).destination_domain - Destination domain to receive message on.mint_recipient - Address of mint recipient on destination domain (as bytes32).burn_token - Token to burn amount of, on local domain.destination_caller - Authorized caller on the destination domain (as bytes32).
If zero, any address can broadcast the message.max_fee - Maximum fee to pay on the destination domain, in units of burn_token.min_finality_threshold - The minimum finality at which the burn message will be attested.HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused).HostError: Error(Auth, InvalidAction) – caller authorization fails.DenylistError::AccountDenylisted] – If caller is on the denylist.fn deposit_for_burn(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
amount: i128,
destination_domain: u32,
mint_recipient: soroban_sdk::BytesN<32>,
burn_token: soroban_sdk::Address,
destination_caller: soroban_sdk::BytesN<32>,
max_fee: i128,
min_finality_threshold: u32,
)
fn get_fee_recipient(env: soroban_sdk::Env) -> Option
fn get_pending_admin(env: soroban_sdk::Env) -> Option
fn get_pending_owner(env: soroban_sdk::Env) -> Option
fn set_fee_recipient(env: soroban_sdk::Env, new_fee_recipient: soroban_sdk::Address)
fn unlink_token_pair(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
remote_domain: u32,
remote_token: soroban_sdk::BytesN<32>,
)
fn update_denylister(env: soroban_sdk::Env, denylister: soroban_sdk::Address)
fn get_min_fee_amount(
env: soroban_sdk::Env,
burn_token: soroban_sdk::Address,
amount: i128,
) -> i128
fn transfer_ownership(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
expires_in_ledgers: u32,
)
fn get_token_controller(env: soroban_sdk::Env) -> Option
fn set_token_controller(
env: soroban_sdk::Env,
new_token_controller: soroban_sdk::Address,
)
fn get_min_fee_controller(env: soroban_sdk::Env) -> Option
fn get_swap_minter_config(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
) -> Option
fn set_min_fee_controller(
env: soroban_sdk::Env,
new_min_fee_controller: soroban_sdk::Address,
)
fn set_swap_minter_config(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
swap_minter: soroban_sdk::Address,
allow_asset: soroban_sdk::Address,
)
Returns the message body version used for burn messages.
e - Access to the Soroban environment.The message body version.
TokenMessengerMinterError::MessageBodyVersionNotSet] – If not set.fn get_message_body_version(env: soroban_sdk::Env) -> u32
fn get_token_decimal_config(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
) -> Option
fn set_token_decimal_config(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
local_decimals: u32,
canonical_decimals: u32,
)
fn remove_swap_minter_config(env: soroban_sdk::Env, local_token: soroban_sdk::Address)
fn add_remote_token_messenger(
env: soroban_sdk::Env,
domain: u32,
token_messenger: soroban_sdk::BytesN<32>,
)
Deposits and burns tokens from sender to be minted on destination domain, with optional hook data for execution on the destination chain.
e - Access to the Soroban environment.caller - The address of the caller depositing tokens.amount - Amount of tokens to burn (must be non-zero).destination_domain - Destination domain to receive message on.mint_recipient - Address of mint recipient on destination domain (as bytes32).burn_token - Token to burn amount of, on local domain.destination_caller - Authorized caller on the destination domain (as bytes32).
If zero, any address can broadcast the message.max_fee - Maximum fee to pay on the destination domain, in units of burn_token.min_finality_threshold - The minimum finality at which the burn message will be attested.hook_data - Hook data to append to burn message for interpretation on destination domain.HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused).fn deposit_for_burn_with_hook(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
amount: i128,
destination_domain: u32,
mint_recipient: soroban_sdk::BytesN<32>,
burn_token: soroban_sdk::Address,
destination_caller: soroban_sdk::BytesN<32>,
max_fee: i128,
min_finality_threshold: u32,
hook_data: soroban_sdk::Bytes,
)
fn get_remote_token_messenger(
env: soroban_sdk::Env,
domain: u32,
) -> Option>
Returns the address of the local MessageTransmitter contract.
e - Access to the Soroban environment.The address of the local MessageTransmitter contract.
TokenMessengerMinterError::LocalMessageTransmitterNotSet] – If not set.fn get_local_message_transmitter(env: soroban_sdk::Env) -> soroban_sdk::Address
Handles an incoming finalized message received by the local MessageTransmitter, and takes the appropriate action. For a burn message, mints the associated token to the requested recipient on the local domain.
e - Access to the Soroban environment.source_domain - The domain where the message originated from.sender - The sender of the message (remote TokenMessenger).finality_threshold_executed - The level of finality at which the message was attested to.message_body - The message body bytes (burn message).true if successful.
HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused).HostError: Error(Auth, InvalidAction) – Authorization from the local MessageTransmitter fails.RemoteTokenMessengerError::RemoteTokenMessengerNotRegistered] – Sender is not a registered remote token messenger.TokenMessengerMinterError::InvalidBurnMessageFormat] – Burn message format is invalid.fn handle_recv_finalized_message(
env: soroban_sdk::Env,
source_domain: u32,
sender: soroban_sdk::BytesN<32>,
finality_threshold_executed: u32,
message_body: soroban_sdk::Bytes,
) -> bool
fn remove_remote_token_messenger(env: soroban_sdk::Env, domain: u32)
fn get_max_burn_amount_per_message(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
) -> Option
Handles an incoming unfinalized message received by the local MessageTransmitter,
and takes the appropriate action. For a burn message, mints the associated token
to the requested recipient on the local domain, less fees.
Fees are separately minted to the currently set fee_recipient address.
e - Access to the Soroban environment.source_domain - The domain where the message originated from.sender - The sender of the message (remote TokenMessenger).finality_threshold_executed - The level of finality at which the message was attested to.message_body - The message body bytes (burn message).true if successful.
HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused).HostError: Error(Auth, InvalidAction) – Authorization from the local MessageTransmitter fails.RemoteTokenMessengerError::RemoteTokenMessengerNotRegistered] – Sender is not a registered remote token messenger.fn handle_recv_unfinalized_message(
env: soroban_sdk::Env,
source_domain: u32,
sender: soroban_sdk::BytesN<32>,
finality_threshold_executed: u32,
message_body: soroban_sdk::Bytes,
) -> bool
fn set_max_burn_amount_per_message(
env: soroban_sdk::Env,
local_token: soroban_sdk::Address,
burn_limit_per_message: i128,
)