Contract 635179f2c7ba2f618f63fa0e4fa10baf83e0dd66fb6806a35c76aec30c05fd10

← Back to Index 📥 Download WASM

Meta

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

Instances

  • CBH7TKSKKYF2AXSMRUCM5RATSB22PVZPBVWN6ZDCHCH37TKR3DKE4XAA

Interface

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>
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>
fn execute(
    env: soroban_sdk::Env,
    payload: soroban_sdk::Bytes,
) -> Result
fn execute_governance(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    payload: soroban_sdk::Bytes,
) -> 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 upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
    operator: soroban_sdk::Address,
) -> Result<(), ContractError>
fn migrate(
    env: soroban_sdk::Env,
    operator: soroban_sdk::Address,
) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶