Contract 441b327cf89c9f137a9736e03fdd1ac4cc9fc659934e75af645cde820d62d183

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.95.0

Instances

  • CCA7GRI7EOWRTWVG6MDF6N6BH54TC4X2FFHAJ4ULQUAS5AXUOQZEGGXO

Interface

Bridge USDC from Stellar to an EVM chain via CCTP V2. Single-tx: user signs once, contract handles approve + burn atomically.

Arguments

  • user - Stellar address of the sender (require_auth)
  • amount - USDC amount in 7-decimal local units (e.g. 50_000_000 = 5 USDC)
  • dest_domain - CCTP destination domain (6 = Base, 0 = Ethereum, 3 = Arbitrum, etc.)
  • mint_recipient - 32-byte EVM address (left-padded with zeros) where USDC will be minted
  • max_fee - Max fee in 7-decimal local units (2x Circle minimum recommended)
fn bridge(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    amount: i128,
    dest_domain: u32,
    mint_recipient: soroban_sdk::BytesN<32>,
    max_fee: i128,
)

Constructor — called atomically at deploy time by the Soroban runtime. Sets the official USDC SAC and Circle TokenMessenger addresses. Cannot be front-run: deploy + constructor execute in a single host invocation. Cannot be called again after deploy (Soroban enforces single-shot constructor).

v16 P1-1 fix: replaced separate init() with __constructor to eliminate the deploy-init race window where an attacker could call init() first with a malicious token_messenger address.

fn __constructor(
    env: soroban_sdk::Env,
    usdc_sac: soroban_sdk::Address,
    token_messenger: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶