# Bridge

## Overview

Bridge transfers assets between Ethereum Sepolia and Goliath Testnet.

**Access:** <https://slingshot.goliath.net/#/bridge>

## Supported Bridge Assets

| Asset   | Sepolia -> Goliath | Goliath -> Sepolia | Notes                                               |
| ------- | :----------------: | :----------------: | --------------------------------------------------- |
| **ETH** |        Live        |        Live        | Sepolia native ETH <-> bridged ETH token on Goliath |
| **XCN** |        Live        |        Live        | Sepolia ERC20 XCN <-> Goliath native XCN            |

## Contract Addresses

| Contract                | Network | Address                                      |
| ----------------------- | ------- | -------------------------------------------- |
| **Bridge**              | Sepolia | `0xA9FD64B5095d626F5A3A67e6DB7FB766345F8092` |
| **Bridge**              | Goliath | `0x2c1d218B5a97a26D144ffd12d5C813590f93FFEB` |
| **Sepolia XCN (ERC20)** | Sepolia | `0x7a8adc542A35c93da263A188367F4bF4c445B8E9` |
| **Bridged ETH token**   | Goliath | `0xEd02AA7dd3f105EDab8702D859781CAfF111324b` |

## User Flow

### Sepolia -> Goliath

1. Open `/#/bridge` and connect wallet to Sepolia
2. Choose token and amount
3. Confirm bridge transaction
4. Wait for required confirmations and relayer finalization
5. Switch to Goliath to verify receipt

### Goliath -> Sepolia

1. Connect wallet to Goliath
2. Approve token (ERC20 route, first time only)
3. Submit bridge/burn transaction
4. Wait for confirmations and relayer finalization
5. Switch to Sepolia and verify receipt

## Status and Monitoring

Bridge status API:

`https://testnet.mirrornode.goliath.net/bridge/api/v1`

| Endpoint               | Method | Description                  |
| ---------------------- | ------ | ---------------------------- |
| `/status/{depositId}`  | GET    | Status of deposit operation  |
| `/status/{withdrawId}` | GET    | Status of withdraw operation |
| `/history/{address}`   | GET    | Bridge history for address   |

## Developer Notes

* Typical functions exposed by bridge contracts are `depositNative`, `deposit`, and `burn`.
* Always verify ABI and addresses against explorer before deployment.
* For staking-based Sepolia to Goliath movement, use the dedicated [Migrate](https://docs.goliath.net/defi/slingshot/migrate) flow.
