Contract 3d91d14054fbfe731e23039137c75d4f9e9d7de7055472bf346ba28be7448d91

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 26.1.1#8ac18efb681a1c0b4b85a38c5a380300344e3f39
rsver 1.96.0

Instances

  • CBFSTXRCHGFRSSK7PTT56F4XDPEK2CFLQWBYH55DJI3SQXS634NHLZAG
  • CBMWYN42SM4LOGGN4O4MILVZ4PQSQOXM6C6HTB4EY2IZWTN3II6CSJIH
  • CBMZRPLDIQR5F3MLUV6YNQG7JSTCZOKSFY7BHEKJPRCI7LSH2BCJDFUQ
  • CDAPXU75MK3IX45EPPCOLAEXG2SVO4SYHR3COVXQ5BOAXGRDZVGDSOHJ
  • CDI4RSM6E3BWRLQSVEMZJAFFMYZGARPI7XC2FUVPG2YHIAO4R2ZJ2EKY
  • CDOTQCFEINJXWAN276FIN4MZENGJSW5DKA6MP2FUXULQVCJQZVVPDF3P

Interface

Get the current owner.

Returns

The owner address, or None if not initialized.

fn owner(env: soroban_sdk::Env) -> Option
fn execute(
    env: soroban_sdk::Env,
    op: StellarOp,
    proof: MerkleProof,
) -> Result<(), McmsError>
fn get_root(env: soroban_sdk::Env) -> Result<(soroban_sdk::BytesN<32>, u32), McmsError>

Check if an address is the owner.

fn is_owner(env: soroban_sdk::Env, addr: soroban_sdk::Address) -> bool
fn set_root(
    env: soroban_sdk::Env,
    root: soroban_sdk::BytesN<32>,
    valid_until: u32,
    metadata: StellarRootMetadata,
    metadata_proof: MerkleProof,
    signatures: SignatureVec,
) -> Result<(), McmsError>
fn get_config(env: soroban_sdk::Env) -> Result

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>

Initialize MCMS atomically with owner, Stellar network id (32-byte passphrase hash per chain-selectors), the initial signer configuration, and an immutable instance label. Applying the config here means no deployer needs temporary ownership for set_config.

fn initialize(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    chain_network_id: soroban_sdk::BytesN<32>,
    signer_addresses: SignerAddresses,
    signer_groups: SignerGroups,
    group_quorums: soroban_sdk::BytesN<32>,
    group_parents: soroban_sdk::BytesN<32>,
    instance_label: soroban_sdk::Symbol,
) -> Result<(), McmsError>

Owner-only signer configuration (mirrors Solidity setConfig).

fn set_config(
    env: soroban_sdk::Env,
    signer_addresses: SignerAddresses,
    signer_groups: SignerGroups,
    group_quorums: soroban_sdk::BytesN<32>,
    group_parents: soroban_sdk::BytesN<32>,
    clear_root: bool,
) -> Result<(), McmsError>
fn get_op_count(env: soroban_sdk::Env) -> Result

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>

Permissionless TTL extension for fixed persistent keys and instance storage. Per-hash seen entries are extended at creation. Anyone may call this.

Restoring an archived SeenHash entry

SeenHash(h) entries are bumped once at creation in [Self::set_root] and are never swept by bump_ttls (they are not enumerable from inside the contract). Once their TTL elapses they are archived. Starting with protocol 23, a normal simulation-prepared invocation includes touched archived entries in its restore list, so they are automatically restored before guest code runs. A manually constructed transaction without the required restore list fails before contract execution.

Replay safety follows directly from restoration: set_root observes the original marker and returns SignedHashAlreadySeen. The fixed root-validity horizon is an independent policy bound, not the replay-protection mechanism.

There is no guest-side "restore seen hash" entrypoint, and one cannot exist: Soroban does not expose a restore

fn extend_all_ttls(env: soroban_sdk::Env) -> Result<(), McmsError>

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 chain_network_id(
    env: soroban_sdk::Env,
) -> Result, McmsError>

Get the pending owner (if any).

fn get_pending_owner(env: soroban_sdk::Env) -> Option
fn get_root_metadata(env: soroban_sdk::Env) -> Result
fn get_config_version(env: soroban_sdk::Env) -> Result

Immutable deployment-time role label (PROPOSER, CANCELLER, or BYPASSER). Introspection only; never used for authorization.

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

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>

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