> ## 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.

# Socket (socket)

> Cross-chain bridge aggregator that routes token transfers across multiple bridges and DEXes.

Cross-chain bridge aggregator that routes token transfers across multiple bridges and DEXes.

| Fact | Value |
| - | - |
| Category | Bridges |
| Family | none |
| Namespace | `Socket` on ethereum, optimism, bsc, polygon, base, arbitrum, avalanche |
| Chains | ethereum, optimism, bsc, polygon, base, arbitrum, avalanche |

## Notes

* Socket is a bridge **aggregator** -- routes through underlying bridges (Across, Stargate, Hop, cBridge, Connext, etc.)
* Two-step process: (1) call Socket API to get a route + encoded `bridgeData`, (2) execute on-chain via `executeRoute()`
* There is no separate `bridge()` entry point: `executeRoute()` handles bridge, swap, and combined routes
* Same Gateway address (`0x3a23F9...`) deployed across all supported chains
* `routeId` identifies the specific bridge integration (each bridge has its own route handler contract)
* The `bridgeData` is opaque -- generated by the Socket API based on token, amount, source/destination chains
* Requires ERC-20 approval to the Socket Gateway address
* Finality depends on the underlying bridge selected

## Its names in a program

On Ethereum, `Socket` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Ethereum's socketGateway, `0x3a23F943181408EAC424116Af7b7790c94Cb97a5`.
  require(Socket.SocketGateway != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [Optimism](https://docs.eco.com/sauce-sdk/reference/chains/optimism.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [BNB Chain](https://docs.eco.com/sauce-sdk/reference/chains/bsc.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [Polygon](https://docs.eco.com/sauce-sdk/reference/chains/polygon.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [Base](https://docs.eco.com/sauce-sdk/reference/chains/base.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [Arbitrum One](https://docs.eco.com/sauce-sdk/reference/chains/arbitrum.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |
| [Avalanche C-Chain](https://docs.eco.com/sauce-sdk/reference/chains/avalanche.md) | socketGateway | `0x3a23F943181408EAC424116Af7b7790c94Cb97a5` | `Socket.SocketGateway` |

## ABI

### `SocketGatewayABI`

`import SocketGatewayABI from "./protocols/socket/SocketGatewayABI.json";` Speaks for: socketGateway.

* `executeRoute(uint32 routeId, bytes routeData) payable returns (bytes result)`

## Next steps

* [Protocols](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.