> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Destination calls

> Embed arbitrary onchain actions on the destination chain into an intent, bridge AND deposit, bridge AND swap, bridge AND stake, all atomically.

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](/routes/architecture/executor) 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.

```solidity theme={null}
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](/routes/architecture/executor) for the security model.

## Examples

### Bridge and deposit

```solidity theme={null}
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

```solidity theme={null}
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

| Constraint                                | Reason                        |
| ----------------------------------------- | ----------------------------- |
| Calls execute sequentially in array order | Deterministic execution       |
| Any failure reverts the whole intent      | Atomicity, no partial states  |
| Calls to EOAs with calldata are blocked   | Phishing-pattern protection   |
| The Executor has no persistent state      | Isolation from Portal storage |
