Contract 36e881b771aa6f64bb0d96915e61e6d65a0f976bce332b4b73102ac8d228c4c9

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.92.0

Instances

  • CB2JD6GAVGU7ID2BN2U3CWMTGS3C7RWVVYJ7J3SIQ2VBJU5KDCHXYKNZ

Interface

Admin can upgrade the router logic.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Withdraw tokens from a stream using the NFT.

fn withdraw(
    env: soroban_sdk::Env,
    token_id: i128,
    caller: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

Initialize the Router with the addresses of the core contracts.

The intended admin must authorize the initialization to prevent first-caller takeover attacks.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    flow_contract: soroban_sdk::Address,
    lockup_contract: soroban_sdk::Address,
    nft_contract: soroban_sdk::Address,
)

Admin can upgrade the NFT contract logic.

fn upgrade_nft(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Accept an admin transfer.

fn accept_admin(env: soroban_sdk::Env)

Withdraw max tokens from a stream using the NFT.

fn withdraw_max(
    env: soroban_sdk::Env,
    token_id: i128,
    caller: soroban_sdk::Address,
    to: soroban_sdk::Address,
) -> i128

Propose a new admin (two-step transfer).

fn propose_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Execute a previously proposed upgrade after the timelock.

fn execute_upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Propose a timelocked upgrade.

fn propose_upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Create a Flow stream and mint an NFT.

fn create_flow_stream(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
    token: soroban_sdk::Address,
    rate_per_second: i128,
    token_decimals: u32,
    start_time: u64,
) -> i128

Create a Lockup stream and mint an NFT.

fn create_lockup_stream(env: soroban_sdk::Env, params: CreateLockupParams) -> i128

Imports

WebAssembly Text (WAT) ▶