Contract 31689fddf77002ba1507c865b98878b34674ba09ded1dcbae2eee3607c18b946

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.88.0

Instances

  • CBFUFU3MSTN5WCGCEOMWJQ26B6MCKQOTUAEG2JZYRMDRWKGGN5CTFYTN
  • CC3F7U7Y47V4SRPY4W5OPPLJZIDGTZYSPYGZEYI2ZM3BYWHVVACLMBYE

Interface

Construct.

Note: __constructor (no double-underscore in Soroban 22) runs automatically at deploy. We store the immutable display/metadata fields here. The minter is set in a follow-up call from the Factory (or YieldStripping) via [Self::initialize_minter].

fn __constructor(env: soroban_sdk::Env, args: PtInitArgs)

Set the minter exactly once. The factory calls this immediately after deployment with the address of the parent YieldStripping contract. Subsequent calls revert with AlreadyInitialized.

No require_auth here — calling this address is the bootstrap privilege. In production deployments the factory wraps the entire deploy + init pair in one transaction so no other principal can race the call.

fn initialize_minter(env: soroban_sdk::Env, minter: soroban_sdk::Address)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn decimals(env: soroban_sdk::Env) -> u32

Maturity timestamp (Unix seconds). Display-only.

fn maturity(env: soroban_sdk::Env) -> u64

The minter address, or panics if not yet initialized.

fn minter(env: soroban_sdk::Env) -> soroban_sdk::Address

Total supply.

fn total_supply(env: soroban_sdk::Env) -> i128
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    expiration_ledger: u32,
)
fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128

Mint amount PT to to. Callable only by the configured minter.

fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)

Burn amount PT from from. Callable only by the configured minter; bypasses allowance because the minter is the protocol.

fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)

Imports

WebAssembly Text (WAT) ▶