Contract 8a2b3fd944612968801d015af20b843db0552affc8e79ef2775f7f21fd7f34cf

← 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

  • CBQEZUKG6R6PLEHHUNJI2YITWFUXTWVMLATLA5Z57UR3XMQLCFYIXLFY

Interface

Verifies authorization for the executor contract.

The public key must correspond to a registered admin and must have signed the signature_payload. Uses Ed25519 signature verification.

fn __check_auth(
    env: soroban_sdk::Env,
    signature_payload: soroban_sdk::BytesN<32>,
    auth_data: ExecutorSignature,
    auth_contexts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Sets the paused state of the worker.

When paused, the worker will reject new job assignments (e.g., assign_job, get_fee). Existing jobs in progress are not affected.

Arguments

  • paused - true to pause, false to unpause
fn set_paused(env: soroban_sdk::Env, paused: bool)

Sets admin status for an address.

Admins can configure worker settings like fee multipliers, deposit addresses, and supported option types.

Address type requirement: Admins used for execute/compose flows (Executor) or custom account auth (DVN) must be Ed25519 accounts. Contract-type addresses cannot participate in custom account authorization. Only Ed25519 account addresses can sign for execute/compose and DVN admin operations. Contract-type admins are not supported for these flows;

Arguments

  • admin - The address to set admin status for
  • active - true to add admin, false to remove
fn set_admin(env: soroban_sdk::Env, admin: soroban_sdk::Address, active: bool)

Sets whether a message library is supported by this worker.

Message libraries (e.g., ULN302) call workers to assign jobs. Only supported libraries can interact with this worker.

Arguments

  • message_lib - The message library contract address
  • supported - true to add support, false to remove support
fn set_supported_message_lib(
    env: soroban_sdk::Env,
    message_lib: soroban_sdk::Address,
    supported: bool,
)

Sets allowlist status for an OApp address.

When the allowlist is empty, all OApps are allowed (unless on denylist). When the allowlist is not empty, only allowlisted OApps are allowed. Denylist always takes precedence over allowlist.

Arguments

  • oapp - The OApp contract address
  • allowed - true to add to allowlist, false to remove
fn set_allowlist(env: soroban_sdk::Env, oapp: soroban_sdk::Address, allowed: bool)

Sets denylist status for an OApp address.

Denylisted OApps are blocked from using this worker, even if they're on the allowlist (denylist takes precedence).

Arguments

  • oapp - The OApp contract address
  • denied - true to add to denylist, false to remove
fn set_denylist(env: soroban_sdk::Env, oapp: soroban_sdk::Address, denied: bool)

Sets the default fee multiplier in basis points.

The multiplier is applied to base fees during fee calculation. Used when no destination-specific multiplier is configured.

Arguments

  • admin - Admin address (must provide authorization)
  • multiplier_bps - Multiplier in basis points (10000 = 1x, 12000 = 1.2x)
fn set_default_multiplier_bps(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    multiplier_bps: u32,
)

Sets the deposit address where worker fees are collected.

When jobs are assigned, fees are directed to this address.

Arguments

  • admin - Admin address (must provide authorization)
  • deposit_address - Address to receive collected fees
fn set_deposit_address(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    deposit_address: soroban_sdk::Address,
)

Sets supported executor option types for a destination endpoint.

Arguments

  • admin - Admin address (must provide authorization)
  • eid - Destination endpoint ID (chain identifier)
  • option_types - Supported option types. Each byte represents an option type.
fn set_supported_option_types(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    eid: u32,
    option_types: soroban_sdk::Bytes,
)

Sets the worker fee library contract address.

The fee library calculates fees based on executor options and price feed data.

Arguments

  • admin - Admin address (must provide authorization)
  • worker_fee_lib - Fee library contract address implementing IExecutorFeeLib
fn set_worker_fee_lib(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    worker_fee_lib: soroban_sdk::Address,
)

Sets the price feed contract address.

The price feed provides gas prices and exchange rates for cross-chain fee calculations.

Arguments

  • admin - Admin address (must provide authorization)
  • price_feed - Price feed contract address implementing ILayerZeroPriceFeed
fn set_price_feed(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    price_feed: soroban_sdk::Address,
)

Returns whether the worker is paused.

fn paused(env: soroban_sdk::Env) -> bool

Returns whether an address is an admin.

Arguments

  • admin - The address to check
fn is_admin(env: soroban_sdk::Env, admin: soroban_sdk::Address) -> bool

Returns all admin addresses.

fn admins(env: soroban_sdk::Env) -> soroban_sdk::Vec

Returns whether a message library is supported.

Arguments

  • message_lib - Message library contract address
fn is_supported_message_lib(
    env: soroban_sdk::Env,
    message_lib: soroban_sdk::Address,
) -> bool

Returns all supported message library addresses.

Returns

Vector of supported message library contract addresses.

fn message_libs(env: soroban_sdk::Env) -> soroban_sdk::Vec

Returns whether an OApp is on the allowlist.

Arguments

  • oapp - OApp contract address
fn is_on_allowlist(env: soroban_sdk::Env, oapp: soroban_sdk::Address) -> bool

Returns the number of addresses on the allowlist.

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

Returns whether an OApp is on the denylist.

Arguments

  • oapp - OApp contract address
fn is_on_denylist(env: soroban_sdk::Env, oapp: soroban_sdk::Address) -> bool

Returns whether an OApp has access control list (ACL) permission.

ACL evaluation order:

  1. If on denylist → denied
  2. If allowlist is empty OR on allowlist → allowed
  3. Otherwise → denied

Arguments

  • oapp - OApp contract address to check
fn has_acl(env: soroban_sdk::Env, oapp: soroban_sdk::Address) -> bool

Returns the default fee multiplier in basis points.

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

Returns the deposit address where fees are collected.

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

Returns supported option types for a destination endpoint.

Arguments

  • eid - Destination endpoint ID (chain identifier)
fn get_supported_option_types(
    env: soroban_sdk::Env,
    eid: u32,
) -> Option

Returns the worker fee library contract address.

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

Returns the price feed contract address.

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

Assigns a job to the executor and returns fee recipient information.

fn assign_job(
    env: soroban_sdk::Env,
    send_lib: soroban_sdk::Address,
    sender: soroban_sdk::Address,
    dst_eid: u32,
    calldata_size: u32,
    options: soroban_sdk::Bytes,
) -> FeeRecipient

Calculates the execution fee for a cross-chain message.

fn get_fee(
    env: soroban_sdk::Env,
    send_lib: soroban_sdk::Address,
    sender: soroban_sdk::Address,
    dst_eid: u32,
    calldata_size: u32,
    options: soroban_sdk::Bytes,
) -> i128

Sets destination-specific configurations for multiple endpoints.

fn set_dst_config(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    params: soroban_sdk::Vec,
)

Returns the destination configuration for a specific endpoint.

fn dst_config(env: soroban_sdk::Env, dst_eid: u32) -> Option

Native token drops.

Transfers native tokens to each receiver specified in the parameters and tracks the success/failure status of each transfer.

fn native_drop(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    origin: Origin,
    dst_eid: u32,
    oapp: soroban_sdk::Address,
    native_drop_params: soroban_sdk::Vec,
)

Returns the endpoint address from storage.

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

Initializes the executor contract.

Sets up ownership, worker configuration, and endpoint address.

Arguments

  • endpoint - LayerZero Endpoint V2 contract address
  • owner - Contract owner address
  • admins - Initial admin addresses (must not be empty)
  • message_libs - Supported message library addresses (e.g., ULN302)
  • price_feed - Price feed contract address for fee calculations
  • default_multiplier_bps - Default fee multiplier in basis points (10000 = 1x)
  • worker_fee_lib - Worker fee library contract address
  • deposit_address - Address to receive fee payments
fn __constructor(
    env: soroban_sdk::Env,
    endpoint: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    admins: soroban_sdk::Vec,
    message_libs: soroban_sdk::Vec,
    price_feed: soroban_sdk::Address,
    default_multiplier_bps: u32,
    worker_fee_lib: soroban_sdk::Address,
    deposit_address: soroban_sdk::Address,
)

Withdraws a token from the contract to a specified address.

Arguments

  • token - The token contract address
  • to - The recipient address
  • amount - The amount to withdraw
fn withdraw_token(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

Registers an executor helper contract with its allowed function names.

The executor helper is an intermediary contract that calls executor.require_auth() before delegating to OApp functions. The registered address and function names are used by validate_auth_contexts to verify authorization contexts.

Arguments

  • helper - The executor helper contract address
  • allowed_functions - Function names the helper is allowed to invoke (e.g., "execute", "compose")
fn set_executor_helper(
    env: soroban_sdk::Env,
    helper: soroban_sdk::Address,
    allowed_functions: soroban_sdk::Vec,
)

Returns the registered executor helper configuration.

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

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

Imports

WebAssembly Text (WAT) ▶