Contract 7e071a804d69c891b17e1ab5a9599ef86e8b700e926318405f217ab65acd3b7f

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdk_spec_shaking 2
rssdkver 25.3.0#dcbea44513feb7734af6b6c4aced2c4a7a2715d0
rsver 1.92.0
source_repo github:Templar-Protocol/contracts

Instances

  • CBJFYCJRUBUVMEWK3ZT6EI75W2JOLULGH6VMITUJKHRNWQXNPLYI3M3P
  • CDVBQNM4FTILMRR3VT46WYHBPOFW2VPSHKONDOEKX7SC35GZEDFGJVKV

Interface

fn execute(
    env: soroban_sdk::Env,
    payload: soroban_sdk::Bytes,
) -> Result
fn migrate(
    env: soroban_sdk::Env,
    operator: soroban_sdk::Address,
) -> Result<(), ContractError>
fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
    operator: soroban_sdk::Address,
) -> Result<(), ContractError>

Return the package version and capabilities compiled into this runtime.

fn version(env: soroban_sdk::Env) -> (soroban_sdk::String, u64)
fn initialize(
    env: soroban_sdk::Env,
    curator: soroban_sdk::Address,
    governance: soroban_sdk::Address,
    asset_token: soroban_sdk::Address,
    share_token: soroban_sdk::Address,
    virtual_shares: i128,
    virtual_assets: i128,
) -> Result<(), ContractError>

Return the compact proxy view used by clients and tests.

maxWithdraw and maxRedeem values in the preview tuple are bounded by current idle assets and return zero when the vault is non-idle or paused. This is intentional: Soroban withdraw / redeem are atomic idle exits, while market-backed exits must use request_withdraw and allocator-driven queue execution.

fn proxy_view(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    assets: i128,
    shares: i128,
) -> Result<
    (
        (
            (
                soroban_sdk::Address,
                soroban_sdk::Address,
                soroban_sdk::Address,
                soroban_sdk::Address,
            ),
            (i128, i128, bool),
            (i128, i128, i128, i128),
            (i128, u64, i128, i128, i128),
        ),
        (soroban_sdk::Vec, soroban_sdk::Vec<(soroban_sdk::String, i128, i128)>),
        (i128, i128, i128, i128, i128, i128, i128, i128),
    ),
    ContractError,
>
fn execute_governance(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    payload: soroban_sdk::Bytes,
) -> Result<(), ContractError>
fn initialize_with_config(
    env: soroban_sdk::Env,
    curator: soroban_sdk::Address,
    governance: soroban_sdk::Address,
    asset_token: soroban_sdk::Address,
    share_token: soroban_sdk::Address,
    virtual_shares: i128,
    virtual_assets: i128,
    withdrawal_cooldown_ns: u64,
) -> Result<(), ContractError>
fn initialize_with_full_config(
    env: soroban_sdk::Env,
    curator: soroban_sdk::Address,
    governance: soroban_sdk::Address,
    asset_token: soroban_sdk::Address,
    share_token: soroban_sdk::Address,
    virtual_shares: i128,
    virtual_assets: i128,
    withdrawal_cooldown_ns: u64,
    idle_resync_cooldown_ns: u64,
) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶