Contract 480f4f931ba428f587f815f97268afda0afb41084ac2daf990a745b0fca4d8c4

← Back to Index 📥 Download WASM

Meta

cliver 28.0.0#300aaf69ab100536678bdb641428b06f06b318ea
rssdk_spec_shaking 2
rssdkver 28.0.0#48d506712f964094d14176e2f0b02afcd1054567
rsver 1.96.0

Instances

  • CAVJORXN3EOHH5GGHOK66YTPBUFNICWGSAO3UBUG6SS75VSMGWIEQX4V

Interface

Current mapping owner, or None after renouncement. Maintains instance/code TTL.

fn owner(
    env: soroban_sdk::Env,
) -> Result, soroban_sdk::Error>

Chain map for name, looked up after ASCII lowercasing; UnknownChain if absent.

Permissionless; maintains instance/code TTL but does not renew the map's TTL.

fn route(
    env: soroban_sdk::Env,
    name: soroban_sdk::String,
) -> Result

Read immutable provider configuration and maintain instance/code TTL.

Permissionless. Returns Configuration if missing.

fn config(env: soroban_sdk::Env) -> Result

Export source attestations to recipient_oracle on an Axelar destination_chain.

source is the native attester; 1–4 canonical payloads of at most 684 bytes each must be attested in this adapter's own namespace. Recipient is a raw 32-byte ID converted using the configured destination format. Attestations are not consumed.

Authorization and effects

Relayed mode: payer authorizes this call and transfer of positive gas_amount fee-token base units. Gas service and gateway calls are atomic. No fee funds are retained by the adapter; provider refund handling targets the payer.

SelfRelay requires zero gas and no payer authorization; gateway dispatch remains. Solana destinations require their config PDA and one proof of at most 320 bytes.

Errors

Unknown chains, malformed addresses/messages, unattested proofs, mode/fee mismatch, configuration errors, and downstream provider/auth failures. Estimate gas externally; there is no local quote formula.

fn submit(
    env: soroban_sdk::Env,
    destination_chain: soroban_sdk::String,
    recipient_oracle: soroban_sdk::BytesN<32>,
    source: soroban_sdk::Address,
    payloads: soroban_sdk::Vec,
    payer: soroban_sdk::Address,
    gas_amount: i128,
    destination_config: soroban_sdk::BytesN<32>,
    delivery_mode: DeliveryMode,
) -> Result<(), soroban_sdk::Error>

Register proofs from an exact gateway-approved GMP message; any relayer may call.

source_chain selects the map after ASCII lowercasing and is passed to the gateway exactly; source_address is the authenticated remote adapter in that route's address format. message_id and Keccak of payload are passed with this receiving contract to gateway validate_message. Only approval permits decoding and recording the payload's source application/proofs. Solana routes admit exactly one proof of at most 320 bytes, as on export.

Effects and errors

Approval consumption and storage are atomic; a malformed/bounded-message failure rolls both back. Absent or expired tuples emit OutputProven; all renew TTL. UnknownChain, invalid address, NotApproved, Malformed, MessageLimit, or provider failures abort. Source names and addresses are not caller attestations.

fn execute(
    env: soroban_sdk::Env,
    source_chain: soroban_sdk::String,
    message_id: soroban_sdk::String,
    source_address: soroban_sdk::String,
    payload: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>

Renew proof TTL for each concatenated 128-byte tuple, plus instance/code TTL.

Permissionless; the common capped renewal policy applies. Empty input succeeds; Malformed rejects partial tuples and NotProven rejects any missing proof. All renewals roll back on failure. This call does not register new evidence. Proofs expire 120,960 ledgers after their last renewal; an expired proof needs a fresh authenticated delivery.

fn maintain(
    env: soroban_sdk::Env,
    proofs: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>

Check one authenticated proof tuple without renewing proof TTL.

chain is the source OIF chain ID; oracle is the authenticated remote adapter; application is the source attester's raw ID; hash is Keccak of a canonical payload. Returns false for unknown or expired tuples. Permissionless; maintains instance/code TTL. Configuration or host archival failures abort.

fn is_proven(
    env: soroban_sdk::Env,
    chain: soroban_sdk::U256,
    oracle: soroban_sdk::BytesN<32>,
    application: soroban_sdk::BytesN<32>,
    hash: soroban_sdk::BytesN<32>,
) -> Result

Lowercase Axelar name mapped to chain_id; UnknownChain if unmapped.

The Stellar counterpart of EVM reverseChainIdMap, returning the name itself. Permissionless; maintains instance/code TTL but does not renew the reservation.

fn chain_name(
    env: soroban_sdk::Env,
    chain_id: soroban_sdk::U256,
) -> Result

Install immutable config, the mapping owner and the expected Stellar network_id.

Requires native gateway/gas-service/token contract addresses. owner may be any account or contract; it can only add chain maps and transfer or renounce ownership. Returns Configuration for a wrong network or Address for non-contract provider addresses. Maintains instance/code TTL. The deployer must verify provider addresses and the native token for this network. No chain is mapped at deployment.

fn __constructor(
    env: soroban_sdk::Env,
    network_id: soroban_sdk::BytesN<32>,
    owner: soroban_sdk::Address,
    config: AxelarConfig,
) -> Result<(), soroban_sdk::Error>

Set an immutable map from a canonical lowercase Axelar name to chain_id and kind.

The owner authorizes; the transaction's source account pays the rent for both new entries. Names are 1–20 bytes of a-z, 0-9 and '-'; each name and nonzero chain ID is mapped once and never changes; there is no count limit. This privilege lets chains be added after an immutable deployment, as in the EVM mapped oracles. It cannot touch funds, proofs or existing maps, but it decides which Axelar name authenticates an unmapped OIF chain ID; orders should only reference mapped chains. Emits ChainMapConfigured.

Errors

Configuration for a renounced owner, invalid name, zero ID or an already-set name or ID.

fn set_chain_map(
    env: soroban_sdk::Env,
    name: soroban_sdk::String,
    chain_id: soroban_sdk::U256,
    kind: AddressKind,
) -> Result<(), soroban_sdk::Error>

Remove the owner permanently, freezing the set of chain maps.

The current owner authorizes. Emits OwnershipTransferred with no new owner. Returns Configuration once ownership has been renounced.

fn renounce_ownership(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>

Transfer mapping ownership to new_owner in one step, as OpenZeppelin Ownable.

The current owner authorizes. Emits OwnershipTransferred. Returns Configuration once ownership has been renounced.

fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Require every concatenated 128-byte proof tuple to exist; empty input succeeds.

Each tuple is chain[32] || oracle[32] || application[32] || hash[32]. Permissionless; preserves proof TTL and maintains instance/code TTL. Returns Malformed for a partial tuple or NotProven for any missing or expired member; the entire invocation fails if any check fails.

fn efficient_require_proven(
    env: soroban_sdk::Env,
    proofs: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶