Contract e5563daf8d18b2136500df971529af61cc68288fbc3af3465a1ac78052d31209

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.81.0

Instances

  • CAZ6W4WHVGQBGURYTUOLCUOOHW6VQGAAPSPCD72VEDZMBBPY7H43AYEC
  • CDP6DT2YU75ZMOPTTCQ563H2XZDDWHPWKRQ6N2W5LNVE5HHRSB4MMRNQ

Interface

Test-only bootstrap used to install exact deployed code without calling a constructor that does not rerun during a real on-chain WASM update.

fn install(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)

Mint attacker-controlled legacy LP in one or more stages, redeem each stage through the exact replacement-pool WASM, then sweep all modeled PHO/USDC controlled by this contract to the test attacker account.

fn mint_redeem_sweep(
    env: soroban_sdk::Env,
    old_lp: soroban_sdk::Address,
    pool: soroban_sdk::Address,
    token_a: soroban_sdk::Address,
    token_b: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
    stages: soroban_sdk::Vec,
) -> (i128, i128)

Redeem LP already custodied by this contract, then sweep the resulting reserves and any pre-existing direct balances to the test attacker.

fn redeem_held_sweep(
    env: soroban_sdk::Env,
    old_lp: soroban_sdk::Address,
    pool: soroban_sdk::Address,
    token_a: soroban_sdk::Address,
    token_b: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
    share_amount: i128,
) -> (i128, i128)
fn sweep(
    env: soroban_sdk::Env,
    token_a: soroban_sdk::Address,
    token_b: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
) -> (i128, i128)

Imports

WebAssembly Text (WAT) ▶