Contract 3dcd913e4583eb1bf5cf5dc0de197c5a77d944057cc7b4d7faf0379c2cb1b348

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdk_spec_shaking 2
rssdkver 25.3.2#076083c6fe32ab89660da9eb90f34445eea46079
rsver 1.99.0
source_repo github:zenith-protocols/pool-status-admin

Instances

  • CDGQFAOSQXRZEEVAXL4CIWNJZJINYOHYRGFRUCWSNIMW2LBOVLUC3CPK

Interface

Returns Some(Address) if ownership is set, or None if ownership has been renounced.

Arguments

  • e - Access to the Soroban environment.
fn get_owner(env: soroban_sdk::Env) -> Option

Sets the status of pool. Owner only.

Arguments

  • pool - A pool this contract is the admin of.
  • pool_status - 0 admin active, 2 admin on-ice, 3 on-ice under permissionless status updates, 4 admin frozen.

Errors

  • refer to the pool's set_status errors.
fn set_status(env: soroban_sdk::Env, pool: soroban_sdk::Address, pool_status: u32)

Accepts the admin role on pool, once the pool's admin has proposed this contract. Owner only.

Errors

  • refer to the pool's accept_admin errors.
fn accept_admin(env: soroban_sdk::Env, pool: soroban_sdk::Address)

Sets the owner.

Arguments

  • owner - The owner account.
fn __constructor(env: soroban_sdk::Env, owner: soroban_sdk::Address)

Accepts a pending ownership transfer.

Arguments

  • e - Access to the Soroban environment.

Errors

  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If there is no pending transfer to accept.

Events

  • topics - ["ownership_transfer_completed"]
  • data - [new_owner: Address]
fn accept_ownership(env: soroban_sdk::Env)

Renounces ownership of the contract.

Permanently removes the owner, disabling all functions gated by #[only_owner].

Arguments

  • e - Access to the Soroban environment.

Errors

  • [OwnableError::TransferInProgress] - If there is a pending ownership transfer.
  • [OwnableError::OwnerNotSet] - If the owner is not set.

Notes

  • Authorization for the current owner is required.
fn renounce_ownership(env: soroban_sdk::Env)

Initiates a 2-step ownership transfer to a new address.

Requires authorization from the current owner. The new owner must later call accept_ownership() to complete the transfer.

Arguments

  • e - Access to the Soroban environment.
  • new_owner - The proposed new owner.
  • live_until_ledger - Ledger number until which the new owner can accept. A value of 0 cancels any pending transfer.

Errors

  • [OwnableError::OwnerNotSet] - If the owner is not set.
  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If trying to cancel a transfer that doesn't exist.
  • [crate::role_transfer::RoleTransferError::InvalidLiveUntilLedger] - If the specified ledger is in the past.
  • [crate::role_transfer::RoleTransferError::InvalidPendingAccount] - If the specified pending account is not the same as the provided new address.

Notes

  • Authorization for the current owner is required.
fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    live_until_ledger: u32,
)

Imports

WebAssembly Text (WAT) ▶