Contract 00b1b70550f887bd87835270ddee76307ced7a00aa6ad354ed744bc0544a03ac

← Back to Index 📥 Download WASM

Meta

rssdkver 23.5.3#d3e1ab2424388b10893b796b0c8e405c5edd03d2
rsver 1.93.0

Instances

  • CBZL2IH7F6BIDAA3WBNXYKIXSATJGMSW7K5P5MJ6STX5RXN47TZJDF5T

Interface

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.

Arguments

  • env - Access to the Soroban environment.
  • params - Initialization parameters including roles and contract addresses.

Events

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.

Arguments

  • e - Access to the Soroban environment.
  • message - The CCTP message bytes.
  • attestation - The attestation bytes for the message.

Errors

  • 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 TokenMessengerMinte
fn 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.

Arguments

  • e - Access to the Soroban environment.

Returns

The MessageTransmitter contract address.

fn get_message_transmitter(env: soroban_sdk::Env) -> soroban_sdk::Address

Returns the configured TokenMessengerMinter address.

Arguments

  • e - Access to the Soroban environment.

Returns

The TokenMessengerMinter contract address.

fn get_token_messenger_minter(env: soroban_sdk::Env) -> soroban_sdk::Address

Returns the expected message version.

Arguments

  • e - Access to the Soroban environment.

Returns

The expected message version.

fn get_expected_message_version(env: soroban_sdk::Env) -> u32

Returns the expected burn message version.

Arguments

  • e - Access to the Soroban environment.

Returns

The expected burn message version.

fn get_expected_burn_msg_version(env: soroban_sdk::Env) -> u32

Imports

WebAssembly Text (WAT) ▶