Bridge USDC from Stellar to an EVM chain via CCTP V2. Single-tx: user signs once, contract handles approve + burn atomically.
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 mintedmax_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,
)