Contract ca6091eb3eeb8048051ce7920437e6bd4330785c347a62515f90e59b0fcd8ec1

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.96.0

Instances

  • CAFXV5QMFWBBX37ZSZ4RTIZQMUEKX7YYF3AOVH7YTYJSS6GBF44KWNI2

Interface

fn owner(env: soroban_sdk::Env) -> Result
fn pause(env: soroban_sdk::Env) -> Result<(), ExecutorError>
fn rescue(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), ExecutorError>
fn unpause(env: soroban_sdk::Env) -> Result<(), ExecutorError>
fn protocol(
    env: soroban_sdk::Env,
    protocol: soroban_sdk::Symbol,
) -> Result
fn is_paused(env: soroban_sdk::Env) -> bool
fn protocols(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn initialize(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
) -> Result<(), ExecutorError>
fn accept_owner(env: soroban_sdk::Env) -> Result<(), ExecutorError>
fn propose_owner(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), ExecutorError>
fn queue_upgrade(
    env: soroban_sdk::Env,
    wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ExecutorError>
fn execute_upgrade(
    env: soroban_sdk::Env,
    wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ExecutorError>
fn remove_protocol(
    env: soroban_sdk::Env,
    protocol: soroban_sdk::Symbol,
) -> Result<(), ExecutorError>

Runs steps in order, then returns everything left to the user.

seed_token and seed_amount are what the user puts in — pulled once, up front, so the first step has something to read. extra_sweep names tokens the caller expects to appear that no step declares: an adapter that pays a reward in a third asset, for instance.

fn execute_strategy(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    seed_token: soroban_sdk::Address,
    seed_amount: i128,
    steps: soroban_sdk::Vec,
    extra_sweep: soroban_sdk::Vec,
    deadline: u64,
) -> Result
fn register_protocol(
    env: soroban_sdk::Env,
    protocol: soroban_sdk::Symbol,
    adapter: soroban_sdk::Address,
) -> Result<(), ExecutorError>
fn set_protocol_enabled(
    env: soroban_sdk::Env,
    protocol: soroban_sdk::Symbol,
    enabled: bool,
) -> Result<(), ExecutorError>

Same as [Self::execute_strategy] but pulls multiple seed tokens from the user before running any step.

Why this exists

A constant-product LP deposit (Aquarius) requires both pool tokens present in the executor before the AddLiquidity step runs. The existing execute_strategy pulls exactly one seed token, which forces a prior swap step — but routing a Soroswap swap through the executor exceeds the 100M CPU instruction budget (~105M measured). Splitting into a direct Soroswap call (~35M) followed by this multi-seed entry point (~55M) keeps both transactions comfortably within limits.

Invariants

Identical to execute_strategy: I1, I3, I4, I8, I11. The only difference is pulling N tokens instead of 1 before step execution begins.

Seeds

Each [Seed] names a token and an amount. All are pulled from the user in one pass before the first step reads any balance. The sweep set includes every seed token, so nothing can be stranded.

fn execute_strategy_multi_seed(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    seeds: soroban_sdk::Vec,
    steps: soroban_sdk::Vec,
    extra_sweep: soroban_sdk::Vec,
    deadline: u64,
) -> Result

Imports

WebAssembly Text (WAT) ▶