Contract 494fe72239eb9c065cbe8d98368a0641d6ce7df78b230d6426a8fa1cb667f04b

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.95.0

Instances

  • CAF2CCGNH5GQBOQP4NQQKYCT6MCAUZVU4JPSBIIT4426GFV2RQ74C32G

Interface

Burns PT tokens from the designated address.

Strictly restricted to the Tokenizer contract. Called when users redeem their PT for underlying assets at maturity.

Arguments

  • from - The address burning the tokens.
  • amount - The amount of tokens to burn.

Errors

Returns Unauthorized, Paused, InvalidAmount, InsufficientBalance, or MathUnderflow.

fn burn(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    amount: i128,
) -> Result<(), NovairePtError>

Mints new PT tokens to the designated address.

Strictly restricted to the Tokenizer contract. This ensures PT is only issued when underlying yield-bearing assets are securely locked.

Arguments

  • to - The address receiving the minted tokens.
  • amount - The amount of tokens to mint.

Errors

Returns Unauthorized, Paused, InvalidAmount, or MathOverflow.

fn mint(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), NovairePtError>

Hardcoded to save storage gas costs.

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

Pauses Tokenizer integrations (mint/burn), freezing core issuance.

fn pause(env: soroban_sdk::Env) -> Result<(), NovairePtError>

Hardcoded to save storage gas costs.

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

Approves a spender to transfer up to amount of the caller's tokens.

Arguments

  • from - The token owner (requires auth).
  • spender - The address granted allowance.
  • amount - The maximum amount the spender can transfer.
  • expiration_ledger - Unused parameter to maintain standard token interface compatibility.
fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    _expiration_ledger: u32,
) -> Result<(), NovairePtError>

Returns the exact balance of a specific user.

fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128

Unpauses Tokenizer integrations.

fn unpause(env: soroban_sdk::Env) -> Result<(), NovairePtError>

Returns the protocol version.

fn version(env: soroban_sdk::Env) -> u32

Hardcoded to 7 decimals, consistent with Stellar assets.

fn decimals(env: soroban_sdk::Env) -> u32

Returns a comprehensive struct containing the PT Token's configuration and health metadata.

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

Transfers tokens from the caller to a recipient.

Note: Transfers intentionally bypass the pause mechanism to preserve secondary market liquidity as an escape valve during protocol emergencies.

Arguments

  • from - The caller sending the tokens (requires auth).
  • to - The recipient of the tokens.
  • amount - The amount to transfer.

Errors

Returns InvalidAmount, InsufficientBalance, MathOverflow, or MathUnderflow.

fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), NovairePtError>

Returns the approved allowance for a spender.

fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128

Returns true if issuance/redemption is paused.

fn is_paused(env: soroban_sdk::Env) -> bool

Initializes the Novaire Principal Token (PT).

Arguments

  • admin - Protocol administrator responsible for pausing and upgrades.
  • tokenizer - The exclusive authority allowed to mint and burn PT tokens.

Errors

Returns AlreadyInitialized if called more than once.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    tokenizer: soroban_sdk::Address,
) -> Result<(), NovairePtError>

Accepts a pending admin transfer, finalizing the change of administration.

fn accept_admin(env: soroban_sdk::Env) -> Result<(), NovairePtError>

Returns the total supply of PT tokens in circulation.

fn total_supply(env: soroban_sdk::Env) -> i128

Updates the trusted Tokenizer contract address.

fn set_tokenizer(
    env: soroban_sdk::Env,
    new_tokenizer: soroban_sdk::Address,
) -> Result<(), NovairePtError>

Transfers tokens from one address to another using an allowance.

Arguments

  • spender - The address initiating the transfer (requires auth).
  • from - The owner of the tokens.
  • to - The recipient of the tokens.
  • amount - The amount to transfer.
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), NovairePtError>

Initiates a two-step admin transfer to a new address.

fn transfer_admin(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
) -> Result<(), NovairePtError>

Imports

WebAssembly Text (WAT) ▶