Contract 870de1c00c6617b1110f387e299a869ed6a8e8399c5c0a4c20bc3e4ff6816ae0

← 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

  • CA532JSKKJ3Z3UKFWOE46SGUQV7QUOMRYU53RHXIKZICTRSO45MCDM2G
  • CB2MSNGSRUOLNWQRNWDLKGEHFDHK7IN4O4JWEL6JYHRCNLNRH5PVYQWB
  • CDDATRMRM3VU5YKYQ35XOO5WZXX7RHAGRI5LGE54XJTXRSEFU3XAQC5R

Interface

Validates authorization for DVN contract operations.

fn __check_auth(
    env: soroban_sdk::Env,
    signature_payload: soroban_sdk::BytesN<32>,
    auth_data: TransactionAuthData,
    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

Calculates the verification fee for a cross-chain message.

Called by the send library to quote DVN fees before sending.

fn get_fee(
    env: soroban_sdk::Env,
    send_lib: soroban_sdk::Address,
    sender: soroban_sdk::Address,
    dst_eid: u32,
    packet_header: soroban_sdk::Bytes,
    payload_hash: soroban_sdk::BytesN<32>,
    confirmations: u64,
    options: soroban_sdk::Bytes,
) -> i128

Assigns a verification job to this DVN and returns fee payment info.

Called by the send library when a message is sent. The DVN will later verify the message on the destination chain.

fn assign_job(
    env: soroban_sdk::Env,
    send_lib: soroban_sdk::Address,
    sender: soroban_sdk::Address,
    dst_eid: u32,
    packet_header: soroban_sdk::Bytes,
    payload_hash: soroban_sdk::BytesN<32>,
    confirmations: u64,
    options: soroban_sdk::Bytes,
) -> FeeRecipient

Dispatches external contract calls.

fn execute_transaction(env: soroban_sdk::Env, calls: soroban_sdk::Vec)

Sets the upgrader contract address. Requires self authorization.

fn set_upgrader(env: soroban_sdk::Env, upgrader: Option)

Returns the current upgrader contract address, if set.

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

Sets destination chain configurations. Requires admin authorization.

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

Returns the destination configuration for a specific endpoint ID.

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

Returns the Verifier ID for this DVN.

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

Computes the hash of call data for multisig signing.

Off-chain signers use this to compute the hash they need to sign.

fn hash_call_data(
    env: soroban_sdk::Env,
    vid: u32,
    expiration: u64,
    calls: soroban_sdk::Vec,
) -> soroban_sdk::BytesN<32>

Initializes the DVN contract.

Arguments

  • vid - Verifier ID, unique identifier for this DVN
  • signers - Initial multisig signers (20-byte Ethereum addresses)
  • threshold - Minimum signatures required for multisig operations
  • admins - Initial admin addresses for operational functions
  • supported_msglibs - Message libraries this DVN supports (e.g., ULN302)
  • price_feed - Price feed contract for fee calculations
  • default_multiplier_bps - Default fee multiplier (10000 = 1x)
  • worker_fee_lib - Fee library contract for computing DVN fees
  • deposit_address - Address to receive fee payments
fn __constructor(
    env: soroban_sdk::Env,
    vid: u32,
    signers: soroban_sdk::Vec>,
    threshold: u32,
    admins: soroban_sdk::Vec,
    supported_msglibs: soroban_sdk::Vec,
    price_feed: soroban_sdk::Address,
    default_multiplier_bps: u32,
    worker_fee_lib: soroban_sdk::Address,
    deposit_address: soroban_sdk::Address,
)

Sets admin status for an address. Can be called by an existing admin.

This allows existing admins to add or remove other admins without going through the owner/multisig path.

Arguments

  • caller - The admin calling this function (must provide authorization)
  • admin - The address to set admin status for
  • active - true to add admin, false to remove
fn set_admin_by_admin(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    admin: soroban_sdk::Address,
    active: bool,
)

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

Adds or removes a signer from the multisig. Requires owner authorization.

fn set_signer(env: soroban_sdk::Env, signer: soroban_sdk::BytesN<20>, active: bool)

Sets the signature threshold (quorum). Requires owner authorization.

fn set_threshold(env: soroban_sdk::Env, threshold: u32)

Returns all registered signers.

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

Returns the total number of registered signers.

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

Checks if an address is a registered signer.

fn is_signer(env: soroban_sdk::Env, signer: soroban_sdk::BytesN<20>) -> bool

Returns the current signature threshold (quorum).

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

Verifies signatures against the configured threshold.

fn verify_signatures(
    env: soroban_sdk::Env,
    digest: soroban_sdk::BytesN<32>,
    signatures: soroban_sdk::Vec>,
)

Verifies signatures against a custom threshold.

fn verify_n_signatures(
    env: soroban_sdk::Env,
    digest: soroban_sdk::BytesN<32>,
    signatures: soroban_sdk::Vec>,
    threshold: u32,
)

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) ▶