Contract c4c0d4750e245d3a8e85dfd18abbef0c947dfc0e786e18510f796b8a4211c837

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 26.1.1#8ac18efb681a1c0b4b85a38c5a380300344e3f39
rsver 1.96.0

Instances

  • CBB32NVBEKSXS5GHGCM44HLKLCYKTDAZCVEVLABDCF3G5KF5G3KBI6GZ
  • CDUQGX32UCWCRBCV3F2VPRUCV4ATMSZ5VME6JYIDVEUVBCOVJDQIS7FT

Interface

Get the current owner.

Returns

The owner address, or None if not initialized.

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

Deliver a self-verified payload to receiver.on_relay(sender, execution_id, payload) without OCR signature verification.

The forwarder does not vouch for the payload; the receiver must verify it. What the forwarder provides is the same replay protection and observable transmission state that report() provides, so a DON can coordinate a write schedule for payloads that carry their own proof (Streams reports, ZK proofs, ...).

Safety properties:

  • only addresses on the relayer list may call this;
  • the replay key is derived on-chain from sha256(receiver ‖ execution_id ‖ sha256(payload)), so a relayer can neither choose the key nor block a different payload;
  • it dispatches to on_relay, never on_report, so a receiver that trusts on_report as proof of DON quorum is unreachable from here;
  • a non-contract receiver is rejected with an error and writes no state.
fn relay(
    env: soroban_sdk::Env,
    transmitter: soroban_sdk::Address,
    receiver: soroban_sdk::Address,
    execution_id: soroban_sdk::BytesN<32>,
    payload: soroban_sdk::Bytes,
) -> Result
fn report(
    env: soroban_sdk::Env,
    transmitter: soroban_sdk::Address,
    receiver: soroban_sdk::Address,
    raw_report: soroban_sdk::Bytes,
    report_context: soroban_sdk::Bytes,
    signatures: soroban_sdk::Vec,
) -> Result<(), ForwarderError>

Check if an address is the owner.

fn is_owner(env: soroban_sdk::Env, addr: soroban_sdk::Address) -> bool

Initialize the owner. Should be called during contract initialization.

Arguments

  • env - The environment
  • owner - The initial owner address
fn init_owner(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
) -> Result<(), CCIPError>
fn initialize(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
) -> Result<(), ForwarderError>
fn set_config(
    env: soroban_sdk::Env,
    don_id: u32,
    config_version: u32,
    f: u32,
    signers: soroban_sdk::Vec>,
) -> Result<(), ForwarderError>

Allow relayer to deliver self-verified payloads through relay(). This list is independent from the report() transmitter registry: an address on one list gains nothing on the other.

fn add_relayer(
    env: soroban_sdk::Env,
    relayer: soroban_sdk::Address,
) -> Result<(), ForwarderError>
fn clear_config(
    env: soroban_sdk::Env,
    don_id: u32,
    config_version: u32,
) -> Result<(), ForwarderError>
fn add_forwarder(
    env: soroban_sdk::Env,
    forwarder: soroban_sdk::Address,
) -> Result<(), ForwarderError>

Require that the caller is the owner. This calls require_auth() on the owner address.

Errors

  • NotOwner - Owner has not been set in storage

Panics

If the owner address did not authorize this invocation (require_auth).

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

A method to transfer ownership without waiting for the new owner to accept.

Panics

If the current owner did not authorize this invocation (require_auth).

fn set_new_owner(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), CCIPError>

State of a relay() delivery. payload_hash is sha256(payload), as carried in RelayProcessedEvent.

fn get_relay_info(
    env: soroban_sdk::Env,
    receiver: soroban_sdk::Address,
    execution_id: soroban_sdk::BytesN<32>,
    payload_hash: soroban_sdk::BytesN<32>,
) -> Result
fn remove_relayer(
    env: soroban_sdk::Env,
    relayer: soroban_sdk::Address,
) -> Result<(), ForwarderError>

Accept pending ownership transfer. Must be called by the pending new owner.

Errors

  • NoPendingOwner - No ownership transfer is pending

Panics

If the pending owner address did not authorize this invocation (require_auth).

fn accept_ownership(env: soroban_sdk::Env) -> Result<(), CCIPError>
fn remove_forwarder(
    env: soroban_sdk::Env,
    forwarder: soroban_sdk::Address,
) -> Result<(), ForwarderError>

Off-chain identifier for this contract version. Matches the EVM ITypeAndVersion pattern: off-chain agents can distinguish forwarder instances in a multi-version deployment without parsing the wasm.

fn type_and_version(env: soroban_sdk::Env) -> soroban_sdk::String

Get the pending owner (if any).

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

Start ownership transfer to a new address (two-step process). The new owner must call accept_ownership() to complete the transfer.

Arguments

  • env - The environment
  • new_owner - The proposed new owner

Errors

  • NotOwner - Owner has not been set in storage

Panics

If the current owner did not authorize this invocation (require_auth).

fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), CCIPError>
fn get_transmission_info(
    env: soroban_sdk::Env,
    receiver: soroban_sdk::Address,
    workflow_execution_id: soroban_sdk::BytesN<32>,
    report_id: soroban_sdk::BytesN<2>,
) -> Result

Cancel a pending ownership transfer. Can only be called by the current owner.

Panics

If the current owner did not authorize this invocation (require_auth).

fn cancel_ownership_transfer(env: soroban_sdk::Env) -> Result<(), CCIPError>

Imports

WebAssembly Text (WAT) ▶