Contract 55e06e7adcc03fe69642f02d836a137a755c439c4d4816304b346e9040346383

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdk_spec_shaking 2
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.95.0

Instances

  • CCADOP7HEBDIILNWQFKNMFR7S5PHKDLFU6F6PHQ54YYO465OH7VDP5HQ

Interface

fn plusd(env: soroban_sdk::Env) -> soroban_sdk::Address
fn treasury(env: soroban_sdk::Env) -> soroban_sdk::Address

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

Mints the yield for a recorded repayment: senior interest to the staked vault, fees to the treasury, then marks it minted on the registry.

fn mint_yield(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    loan_id: u32,
    repayment_id: u32,
)

Updates the treasury address. Access controlled via the access-manager.

fn set_treasury(env: soroban_sdk::Env, new_treasury: soroban_sdk::Address)
fn staked_plusd(env: soroban_sdk::Env) -> soroban_sdk::Address

Arguments

  • access_manager - The manager that controls access to this contract's methods and owns PLUSD and the loan registry.
  • staked_plusd - The sPLUSD vault; its underlying asset is taken as PLUSD.
  • loan_registry - The loan registry to read repayments from and mark minted.
  • treasury - Recipient of the fee portion of minted yield.
fn __constructor(
    env: soroban_sdk::Env,
    access_manager: soroban_sdk::Address,
    staked_plusd: soroban_sdk::Address,
    loan_registry: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
)
fn loan_registry(env: soroban_sdk::Env) -> 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) ▶