Contract e1191bc282426547ae9c65f4188a69678b16897bcd40c548ff9940650470c409

← Back to Index 📥 Download WASM

Meta

binver 0.0.1
cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 25.1.1#94c2a3b3a5ded6b9cf9cef0c207bf8804f3eb294
rsver 1.90.0

Instances

  • CCMB6ZBQ7B5RKVVJ2A7L2A3NEN7MELEUJSJD77EVTKLTFI37YI2OJK4R

Interface

Upgrades the contract to new WASM bytecode.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Runs migration logic after an upgrade.

fn migrate(env: soroban_sdk::Env, migration_data: soroban_sdk::Bytes)
fn authorizer(env: soroban_sdk::Env) -> Option

Returns the current owner address, or None if no owner is set.

fn owner(env: soroban_sdk::Env) -> Option

Returns the pending owner address for 2-step transfer, or None if no transfer is pending.

fn pending_owner(env: soroban_sdk::Env) -> Option

Transfers ownership immediately to a new address.

Use with caution - if you transfer to a wrong address, ownership is lost forever. Consider using begin_ownership_transfer instead.

Panics

  • OwnerNotSet if no owner is currently set
  • TransferInProgress if a 2-step transfer is in progress
fn transfer_ownership(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)

Begins an ownership transfer to a new address.

The new owner must call accept_ownership() within ttl ledgers to complete the transfer. The pending transfer will automatically expire after.

Arguments

  • new_owner - The proposed new owner
  • ttl - Number of ledgers the new owner has to accept. Use 0 to cancel a pending transfer (new_owner must match pending).

Panics

  • OwnerNotSet if no owner is currently set
  • NoPendingTransfer when cancelling and no pending transfer exists
  • InvalidTtl if ttl exceeds max TTL
  • InvalidPendingOwner when cancelling with wrong new_owner address
fn begin_ownership_transfer(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    ttl: u32,
)

Accepts a pending 2-step ownership transfer.

Must be called by the pending owner before the TTL expires.

Panics

  • NoPendingTransfer if there is no pending transfer (or it expired)
fn accept_ownership(env: soroban_sdk::Env)

Permanently renounces ownership.

Panics

  • OwnerNotSet if no owner is currently set
  • TransferInProgress if a 2-step transfer is in progress (cancel it first)
fn renounce_ownership(env: soroban_sdk::Env)

Extends the instance TTL.

Arguments

  • threshold - The threshold to extend the TTL (if current TTL is below this, extend).
  • extend_to - The TTL to extend to.
fn extend_instance_ttl(env: soroban_sdk::Env, threshold: u32, extend_to: u32)

Sets TTL configs for instance and persistent storage.

  • None values remove the corresponding config (disables auto-extension for that type)
  • Validates that threshold <= extend_to <= MAX_TTL

Arguments

  • instance - TTL config for instance storage
  • persistent - TTL config for persistent storage

Panics

  • TtlConfigFrozen if configs are frozen
  • InvalidTtlConfig if validation fails
fn set_ttl_configs(
    env: soroban_sdk::Env,
    instance: Option,
    persistent: Option,
)

Returns the current TTL configs as (instance_config, persistent_config).

fn ttl_configs(env: soroban_sdk::Env) -> (Option, Option)

Permanently freezes TTL configs, preventing any future modifications.

This is irreversible and provides immutability guarantees to users. Emits TtlConfigsFrozen event.

Panics

  • TtlConfigAlreadyFrozen if already frozen
fn freeze_ttl_configs(env: soroban_sdk::Env)

Returns whether TTL configs are frozen.

fn is_ttl_configs_frozen(env: soroban_sdk::Env) -> bool
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    endpoint: soroban_sdk::Address,
    uln302: soroban_sdk::Address,
)

Returns the endpoint address.

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

Returns the Uln302 address.

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

Returns the local endpoint ID.

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

Checks if a messaging path can be initialized for the given origin and receiver.

fn initializable(
    env: soroban_sdk::Env,
    origin: Origin,
    receiver: soroban_sdk::Address,
) -> bool

Checks if a message can be verified at the endpoint.

Verifies:

  1. Receive library is valid for this receiver and source
  2. Endpoint nonce check passes
  3. Payload hash is not empty
fn verifiable(
    env: soroban_sdk::Env,
    origin: Origin,
    receiver: soroban_sdk::Address,
    receive_lib: soroban_sdk::Address,
    payload_hash: soroban_sdk::BytesN<32>,
) -> bool

Returns the execution state of a message.

fn executable(
    env: soroban_sdk::Env,
    origin: Origin,
    receiver: soroban_sdk::Address,
) -> ExecutionState

Returns the combined verification state of a message.

This function checks:

  1. Packet header validity (dst_eid matches local_eid)
  2. Endpoint initializable status
  3. Endpoint verifiable status
  4. ULN verifiable status (DVN confirmations)
fn uln_verifiable(
    env: soroban_sdk::Env,
    packet_header: soroban_sdk::Bytes,
    payload_hash: soroban_sdk::BytesN<32>,
) -> VerificationState

Imports

WebAssembly Text (WAT) ▶