Contract c8ee03b1f4bad64e9fac19da0cb4641cf82dc2f210e139b6c70211eb12098bcb

← Back to Index 📥 Download WASM

Meta

binver 1.1.0
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.93.0

Instances

  • CB3BEYVP64RXFBJSOCMVDK27AAASDKG7OLHGPBAZ5A6WDCFKIKNL7QR2

Interface

Get authorized bot address.

fn get_bot(env: soroban_sdk::Env) -> Option

Set authorized bot address (admin-only).

The bot has least-privilege: it can ONLY call process_revenue. It cannot upgrade, set_config, set_admin, or set_bot.

fn set_bot(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    bot: soroban_sdk::Address,
)

Upgrade contract WASM (admin-only)

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

Extend contract instance TTL.

fn extend_ttl(env: soroban_sdk::Env)

Get processor config.

fn get_config(env: soroban_sdk::Env) -> ProcessorConfig

Update config (admin-only — admin can change splits, tokens, etc.)

fn set_config(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    config: ProcessorConfig,
)

Emergency pause (admin-only). Halts all process_revenue calls.

fn set_paused(env: soroban_sdk::Env, admin: soroban_sdk::Address, paused: bool)

Protocol 22+ constructor — flat args for Admin Bridge compatibility.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    aqua_token: soroban_sdk::Address,
    aquarius_router: soroban_sdk::Address,
    revenue_vault: soroban_sdk::Address,
    reward_0: soroban_sdk::Address,
    reward_1: soroban_sdk::Address,
    reward_2: soroban_sdk::Address,
    reward_3: soroban_sdk::Address,
    split_0: u32,
    split_1: u32,
    split_2: u32,
    split_3: u32,
)

Process accumulated AQUA: swap into ecosystem tokens via Aquarius AMM, then distribute to Revenue Vault.

v1.1.0: Processes AQUA already held BY this contract (deposited by admin via simple Stellar payment). No transfer from caller needed.

  • caller: Admin or authorized bot
  • swap_chains: One per reward token — Vec of (pool_tokens, pool_hash, token_out) obtained from the Aquarius Find Path API
  • out_mins: Minimum output per swap (slippage protection)

Swap chains are built off-chain via: POST https://amm-api.aqua.network/api/external/v1/find-path/

fn process_revenue(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    swap_chains: soroban_sdk::Vec<
        soroban_sdk::Vec<
            (
                soroban_sdk::Vec,
                soroban_sdk::BytesN<32>,
                soroban_sdk::Address,
            ),
        >,
    >,
    out_mins: soroban_sdk::Vec,
)

Imports

WebAssembly Text (WAT) ▶