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 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_rescuer(env: soroban_sdk::Env) -> Option
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 CctpForwarder contract.
env - Access to the Soroban environment.params - Initialization parameters including roles and contract addresses.Emits role configuration events for all roles.
fn __constructor(env: soroban_sdk::Env, params: CctpForwarderContractInitParams)
fn update_pauser(env: soroban_sdk::Env, new_pauser: soroban_sdk::Address)
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 accept_ownership(env: soroban_sdk::Env)
Mints tokens via CCTP and forwards them to the forward recipient.
This function calls receive_message on the MessageTransmitter to mint tokens
to this contract, then forwards them to the recipient specified in the hook data.
e - Access to the Soroban environment.message - The CCTP message bytes.attestation - The attestation bytes for the message.HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused).CctpForwarderError::InvalidMessageFormat] – The message format is invalid.CctpForwarderError::UnsupportedMessageVersion] – The message version is not supported.CctpForwarderError::InvalidBurnMessageFormat] – The burn message format is invalid.CctpForwarderError::UnsupportedBurnMessageVersion] – The burn message version is not supported.CctpForwarderError::InvalidMintRecipient] – The mintRecipient is not this contract.CctpForwarderError::InvalidRecipient] – The recipient is not the TokenMessengerMintefn mint_and_forward(
env: soroban_sdk::Env,
message: soroban_sdk::Bytes,
attestation: soroban_sdk::Bytes,
)
fn get_pending_admin(env: soroban_sdk::Env) -> Option
fn get_pending_owner(env: soroban_sdk::Env) -> Option
fn transfer_ownership(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
expires_in_ledgers: u32,
)
Returns the configured MessageTransmitter address.
e - Access to the Soroban environment.The MessageTransmitter contract address.
fn get_message_transmitter(env: soroban_sdk::Env) -> soroban_sdk::Address
Returns the configured TokenMessengerMinter address.
e - Access to the Soroban environment.The TokenMessengerMinter contract address.
fn get_token_messenger_minter(env: soroban_sdk::Env) -> soroban_sdk::Address
Returns the expected message version.
e - Access to the Soroban environment.The expected message version.
fn get_expected_message_version(env: soroban_sdk::Env) -> u32
Returns the expected burn message version.
e - Access to the Soroban environment.The expected burn message version.
fn get_expected_burn_msg_version(env: soroban_sdk::Env) -> u32