Files
smom-dbis-138/services/etherlink-relay/README.md
2026-03-02 12:14:09 -08:00

29 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Etherlink Relay Service
Custom relay for **Etherlink** (chain 42793) when CCIP does not support Etherlink. Receives messages (e.g. from source chain bridge events) and calls `EtherlinkRelayReceiver.relayMintOrUnlock(messageId, token, recipient, amount)` on Etherlink.
## Env
- `ETHERLINK_RELAY_BRIDGE` EtherlinkRelayReceiver contract on Etherlink
- `ETHERLINK_RPC_URL` Etherlink RPC
- `ETHERLINK_RELAY_PRIVATE_KEY` or `PRIVATE_KEY` relayer key (RELAYER_ROLE on receiver)
- `ETHERLINK_RELAY_MAX_CONCURRENT` max in-flight submissions (default 5)
- `ETHERLINK_RELAY_QUEUE_DEPTH` max queue depth (default 100)
- `POLL_INTERVAL_MS` queue process interval (default 5000)
## Run
```bash
npm install && npm start
```
Messages are pushed via `service.pushMessage(messageId, token, recipient, amount)`; wire this to your source-chain event monitor.
## Metrics
In-memory metrics: `etherlink_relay_messages_detected_total`, `etherlink_relay_submissions_success_total`, `etherlink_relay_submissions_failed_total`, `etherlink_relay_queue_depth`.
## Runbook
See [ETHERLINK_RELAY_RUNBOOK](../../docs/bridge/ETHERLINK_RELAY_RUNBOOK.md).