Skip to main content

Documentation Index

Fetch the complete documentation index at: https://eco.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

A destination call is an arbitrary contract interaction on the destination chain, included in the intent’s route and executed atomically by the Executor contract after the solver delivers the requested asset. This turns “bridge then do something” into a single signed action with all-or-nothing execution.

When to use

  • One-click cross-chain protocol deposits (“deposit USDC into our Arbitrum vault from any chain”)
  • Bridge-and-swap into a non-stable destination asset
  • Pay an invoice that requires a specific contract call beyond a transfer
  • Cross-chain auto-stake or auto-compound flows

How it works

  1. The intent’s route.calls array contains one or more Call structs — { target, value, data } — to execute on the destination chain.
  2. The solver fronts the destination-chain tokens to the Executor.
  3. The Executor runs each call sequentially. If any call reverts, the entire intent reverts. The solver pays only gas; the user gets refunded.
struct Call {
    address target;
    uint256 value;
    bytes data;
}
The Executor is a stateless contract that isolates the user’s calls from the Portal’s storage — see Executor for the security model.

Examples

Bridge + deposit

calls[0] = Call({
    target: tokenAddress,
    value: 0,
    data: abi.encodeCall(IERC20.approve, (vaultAddress, amount))
});
calls[1] = Call({
    target: vaultAddress,
    value: 0,
    data: abi.encodeCall(IVault.deposit, (amount, beneficiary))
});

Bridge + DEX swap + transfer

calls[0] = Call({ target: tokenIn, value: 0, data: approveCalldata });
calls[1] = Call({ target: dexRouter, value: 0, data: swapCalldata });
calls[2] = Call({ target: tokenOut, value: 0, data: transferCalldata });

Constraints

ConstraintReason
Calls execute sequentially in array orderDeterministic execution
Any failure reverts the whole intentAtomicity — no partial states
Calls to EOAs with calldata are blockedPhishing-pattern protection
The Executor has no persistent stateIsolation from Portal storage