Contract deb9cf0db4e2f51965c674d3fc94d048652b5a51abdfb94c5eb2ae1922f5f3a2

← Back to Index 📥 Download WASM

Meta

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

Instances

  • CDJIHR67ZNUNAKMQ2KJ5GYNG3UQAF4V6PPWT7F7M5L7HIJUU3REKSL76

Interface

Pauses the Vault, freezing all deposits, withdrawals, and share transfers.

Arguments

  • env - The environment.

Errors

Returns StorageMissing if not initialized, traps if caller is not admin.

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

Deposits underlying tokens into the Vault and mints Vault shares to the depositor.

Internally transfers the underlying tokens to the Vault, and then deposits them directly into the downstream SY Wrapper.

Arguments

  • depositor - The address initiating the deposit (requires auth).
  • amount - The amount of underlying tokens to deposit.

Returns

The exact amount of Vault shares (1:1 with SY shares) minted to the depositor.

Errors

Returns Paused, InvalidAmount, StorageMissing, or MathOverflow.

fn deposit(
    env: soroban_sdk::Env,
    depositor: soroban_sdk::Address,
    amount: i128,
) -> Result

Unpauses the Vault, restoring normal operations.

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

Returns the current protocol version.

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

Returns a comprehensive struct containing the Vault's current configuration and health metadata.

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

Withdraws underlying tokens by burning Vault shares.

Internally withdraws from the downstream SY Wrapper and transfers the underlying tokens back to the withdrawer.

Arguments

  • withdrawer - The address initiating the withdrawal (requires auth).
  • shares - The amount of Vault shares to burn.

Returns

The exact amount of underlying tokens returned to the withdrawer.

Errors

Returns Paused, InvalidAmount, InsufficientShares, StorageMissing, or MathUnderflow.

fn withdraw(
    env: soroban_sdk::Env,
    withdrawer: soroban_sdk::Address,
    shares: i128,
) -> Result

Returns true if the Vault is currently paused.

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

Returns the exact share balance of a specific user.

fn balance_of(env: soroban_sdk::Env, user: soroban_sdk::Address) -> i128

Initializes the Novaire Yield Vault.

Arguments

  • admin - The address of the protocol administrator.
  • sy_wrapper - The address of the hardened SY Wrapper contract.
  • underlying - The address of the underlying asset token (e.g., USDC).

Errors

Returns AlreadyInitialized if called more than once.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    sy_wrapper: soroban_sdk::Address,
    underlying: soroban_sdk::Address,
) -> Result<(), NovaireVaultError>

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

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

Withdraws underlying tokens by burning Vault shares, but sends the tokens to a specific receiver.

Arguments

  • withdrawer - The address initiating the withdrawal (requires auth).
  • receiver - The address that will receive the underlying tokens.
  • shares - The amount of Vault shares to burn.

Returns

The exact amount of underlying tokens returned to the receiver.

Errors

Returns Paused, InvalidAmount, InsufficientShares, StorageMissing, or MathUnderflow.

fn withdraw_for(
    env: soroban_sdk::Env,
    withdrawer: soroban_sdk::Address,
    receiver: soroban_sdk::Address,
    shares: i128,
) -> Result

Returns the downstream SY Wrapper Address.

fn get_sy_wrapper(
    env: soroban_sdk::Env,
) -> Result

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

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

Transfers Vault shares directly to another address.

Arguments

  • from - The address sending the shares (requires auth).
  • to - The address receiving the shares.
  • amount - The amount of shares to transfer.

Errors

Returns Paused, InvalidAmount, InsufficientShares, MathOverflow, or MathUnderflow.

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

Returns the total amount of Vault shares in circulation.

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

Imports

WebAssembly Text (WAT) ▶