{"id":50722448,"url":"https://github.com/sentrix-labs/sentrix-bridge","last_synced_at":"2026-06-10T01:30:25.837Z","repository":{"id":357240057,"uuid":"1236045338","full_name":"sentrix-labs/sentrix-bridge","owner":"sentrix-labs","description":"Hyperlane v3 bridge for Sentrix Chain — WSRX wrap path for SRX value transfer between networks.","archived":false,"fork":false,"pushed_at":"2026-05-28T06:14:48.000Z","size":390,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T08:10:09.419Z","etag":null,"topics":["bridge","cross-chain","ethereum","evm","foundry","hyperlane","sentrix-chain","solidity","wsrx"],"latest_commit_sha":null,"homepage":"https://sentrixchain.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sentrix-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://github.com/satyakwok#sponsor"]}},"created_at":"2026-05-11T22:42:04.000Z","updated_at":"2026-05-28T06:14:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sentrix-labs/sentrix-bridge","commit_stats":null,"previous_names":["sentrix-labs/sentrix-bridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sentrix-labs/sentrix-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentrix-labs%2Fsentrix-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentrix-labs%2Fsentrix-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentrix-labs%2Fsentrix-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentrix-labs%2Fsentrix-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sentrix-labs","download_url":"https://codeload.github.com/sentrix-labs/sentrix-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentrix-labs%2Fsentrix-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34133404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridge","cross-chain","ethereum","evm","foundry","hyperlane","sentrix-chain","solidity","wsrx"],"created_at":"2026-06-10T01:30:25.147Z","updated_at":"2026-06-10T01:30:25.827Z","avatar_url":"https://github.com/sentrix-labs.png","language":"Rust","funding_links":["https://github.com/satyakwok#sponsor"],"categories":["Bridges"],"sub_categories":["Deployed canonical addresses"],"readme":"# sentrix-bridge\n\nCross-chain bridge integration for Sentrix Chain. Two bridge protocols live in parallel:\n\n- **Hyperlane v3** — message-passing + warp routes (token bridging). First working route: **Sentrix Testnet ↔ Sepolia**. Status: protocol layer verified, production security pending.\n- **LayerZero V2** — endpoint stack deployed on Sentrix Testnet, awaiting LayerZero Labs chain assignment + production DVN/Executor wiring.\n\nSentrix is a Rust L1 with full EVM compatibility (Solidity contracts execute via the Rust [revm](https://github.com/bluealloy/revm) 38 engine). Bridge contracts are standard EVM bytecode; bridge infra (watcher, status API) is Rust-first — see `watcher-rs/` + `api-rs/`.\n\n---\n\n## A. Current working state\n\n- Hyperlane v3 demo route Sentrix Testnet ↔ Sepolia: message + warp-route value bridge both verified 2026-05-12 (tx evidence below).\n- LayerZero V2 endpoint stack deployed on Sentrix Testnet, placeholder eid=40998 pending LZ Labs assignment.\n- WSRX9 wrap contracts deployed both nets: testnet `0x85d5E7694AF31C2Edd0a7e66b7c6c92C59fF949A`, mainnet `0x4693b113e523A196d9579333c4ab8358e2656553`.\n- `WSRX9.deposit{value:amount}()` reverified end-to-end after [sentrix-labs/sentrix#580](https://github.com/sentrix-labs/sentrix/issues/580) close (testnet h=3,787,000 + mainnet h=1,748,900). Fresh-user wrap path works on both nets.\n\n## B. Safety status — TESTNET ONLY\n\n\u003e **Do not bridge real value through this stack today.**\n\n- All Hyperlane routes use `NoopIsm` (no signature verification — anyone can forge an inbound message). Production MultisigIsm rollout per [#3](https://github.com/sentrix-labs/sentrix-bridge/issues/3) is required first.\n- No mainnet bridge funds.\n- Manual relay only (no validator/relayer agents running 24/7).\n- LayerZero stack is on placeholder eid; cannot peer with real endpoints.\n- Production route requires MultisigIsm or stronger security on every warp contract (not just TestRecipient).\n\n`watcher-rs status --json` surfaces every route still on NoopIsm under `unsafe_flags`.\n\n## C. Production-readiness checklist\n\nMainnet rollout is gated on completing all of these. Track via `api-rs /readiness`.\n\n- [ ] MultisigIsm deployed both sides (Sentrix + Sepolia)\n- [ ] Hyperlane validator agent running per validator host\n- [ ] Hyperlane relayer agent running 24/7\n- [ ] Fresh-user bridge path reverified post-MultisigIsm swap (`scripts/runbooks/fresh-user-verify.sh`)\n- [ ] EVM payable/value flow confirmed on chain — **DONE 2026-05-13** (#580 closed)\n- [ ] Watcher running (`watcher-rs/` healthchecks every N min)\n- [ ] Status API surfaced publicly (`api-rs/`)\n- [ ] External audit pass (firm TBD — Code4rena candidate)\n- [ ] Capped mainnet beta plan written (see Section D)\n- [ ] Emergency pause runbook ready\n- [ ] Public status page deployed\n\n## D. Mainnet beta recommendation\n\nWhen mainnet expansion happens — start small.\n\n- **One route only.** Sentrix Mainnet ↔ \u003cpick one foreign mainnet\u003e. No multi-destination day-1.\n- **One asset only.** wSRX (collateral path). HypNative deferred until WSRX path proves out under load.\n- **Strict per-tx cap.** Suggest 100 SRX equivalent.\n- **Strict daily cap.** Suggest 10,000 SRX equivalent.\n- **Public status monitoring.** `api-rs /status` polled by an external uptime check; status page links from website.\n- **Incident response runbook.** Pre-written halt steps + on-call rotation; test the runbook on testnet before mainnet flip.\n\n\u003e Start with the smallest possible blast radius. Expand caps + assets + routes only after multi-week clean operation.\n\n---\n\n\u003e **Issues:** [#3 — production MultisigIsm setup](https://github.com/sentrix-labs/sentrix-bridge/issues/3) · [#5 — re-verify user-entry path](https://github.com/sentrix-labs/sentrix-bridge/issues/5).\n\n## Verified flows\n\n### Hyperlane v3 — Sentrix Testnet (7120) → Sepolia (11155111)\n\nTwo flows verified on-chain:\n\n**1. Message delivery (Hello-World demo, 2026-05-12 commit `531ff64`).** A `MessageDispatched` event on Sentrix Testnet's Mailbox landed at Sepolia's TestRecipient as `Handled(\"HELLO SEPOLIA FROM SENTRIX TESTNET via Hyperlane\", originDomain=7120)` after a manual relay (`process(...)`) from our deployer wallet.\n\n| Side | Mailbox | Our deployments |\n|---|---|---|\n| Sentrix Testnet | `0x9741D99270aF14D4baca0e387B6ac0500b9a288F` | NoopIsm `0x28834A...e56eC6` · MerkleTreeHook `0x6A192C...0F1467` · TestRecipient `0x1feBBD...CfF4c4` |\n| Sepolia | `0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766` (pre-deployed by Hyperlane Labs) | NoopIsm `0x1b11f1...246d` · TestRecipient `0x843fA9...258` |\n\n**2. Token value transfer (wSRX warp route).** `0.001 SRX` wrapped → bridged → minted as `0.001 wSRX` on Sepolia (`HypERC20.balanceOf(recipient) == 1e15` post-relay). Bridge tx `0x4e2582…f9f63` Sentrix-side, mint tx `0x0c1af7…66d56f` Sepolia-side, both `status=1`.\n\n| Component | Address | Side |\n|---|---|---|\n| `WSRX9` (wrap contract) | `0x85d5E7694AF31C2Edd0a7e66b7c6c92C59fF949A` | Sentrix Testnet |\n| `HypERC20Collateral` | `0xfb8190927034c447Fc29B1cfbF4f4F000969bb32` | Sentrix Testnet |\n| `HypERC20` (wSRX mint) | `0xC4BDE56bCAadfDbD6fBad685b65628f05994e5a8` | Sepolia |\n\n\u003e **Update 2026-05-13:** [sentrix-labs/sentrix#580](https://github.com/sentrix-labs/sentrix/issues/580) closed. EVM value-transfer + gas-fix forks activated on testnet h=3,787,000 and mainnet h=1,748,900 (binary v2.2.11). `WSRX9.deposit{value: amount}()` verified working end-to-end on both nets. Fresh users can now wrap SRX → wSRX without the workaround. Bridging is fully user-entry capable on testnet.\n\nFull deployment metadata in `deployments/hyperlane-{testnet,sepolia,warp-route}.json`.\n\n### LayerZero V2 — Sentrix Testnet endpoint stack\n\n| Contract | Address | Notes |\n|---|---|---|\n| `EndpointV2` | `0x00e47A4b45D0147fA2D23D7021b44353966943D9` | eid=40998 placeholder — awaiting LayerZero Labs assignment ([#2](https://github.com/sentrix-labs/sentrix-bridge/issues/2)) |\n| `SendUln302` | `0x507a78066d661Ddc5dfc24fd35b598B94e286A07` | registered in endpoint |\n| `ReceiveUln302` | `0x8DDDA8aac82049b39a44F0132B8A62388852f86b` | registered in endpoint |\n\nProduction stack (PriceFeed, Executor, Treasury, DVN) deferred — tracked in [#4](https://github.com/sentrix-labs/sentrix-bridge/issues/4).\n\n## Multi-chain roadmap\n\nPer-destination bridge status is tracked in [`docs/multichain-roadmap.md`](docs/multichain-roadmap.md). Current state at a glance:\n\n| Destination | Hyperlane | LayerZero V2 | Status |\n|---|---|---|---|\n| Sepolia (Ethereum testnet) | ✅ message verified | — | Phase 0 demo only |\n| BSC Testnet | — | — | Planned (Phase 1) |\n| Polygon Amoy | — | — | Planned (Phase 1) |\n| Base Sepolia | — | — | Planned (Phase 1) |\n| Arbitrum Sepolia | — | — | Planned (Phase 1) |\n| Optimism Sepolia | — | — | Planned (Phase 1) |\n\nMainnet expansion is **gated on** (a) production MultisigIsm + agent infrastructure and (b) an external audit pass. The EVM value-passing bug ([sentrix-labs/sentrix#580](https://github.com/sentrix-labs/sentrix/issues/580)) closed 2026-05-13 — gates activated on both nets and verified.\n\n## Setup\n\n```bash\n# 1. Clone LayerZero V2 upstream (third-party, not vendored)\ngit clone https://github.com/LayerZero-Labs/LayerZero-v2.git\ncd LayerZero-v2\ncorepack enable \u0026\u0026 yarn install --mode=skip-build  # PnP install, lifecycle scripts skipped\ncd ..\n\n# 2. Install forge deps (OZ v4 + forge-std as direct clones)\nmkdir -p lib \u0026\u0026 cd lib\ngit clone --depth 1 --branch v4.8.3 https://github.com/OpenZeppelin/openzeppelin-contracts.git openzeppelin-contracts-v4\ngit clone --depth 1 https://github.com/foundry-rs/forge-std.git\ncd ..\n\n# 3. Build\nforge build\n```\n\nThe `.env.example` lists every variable the scripts touch — copy to `.env` and fill in your testnet-only deployer key + RPC URLs.\n\n## Deploy + verify\n\n### LayerZero V2 core (Sentrix Testnet)\n\n```bash\nexport DEPLOYER_PK=\u003csentrix-testnet-deployer-private-key\u003e\nforge script scripts/DeployLZ-SentrixTestnet.s.sol:DeployLZSentrixTestnet \\\n  --rpc-url sentrix_testnet \\\n  --broadcast \\\n  --skip-simulation \\\n  --legacy\n```\n\nDeploys `EndpointV2(eid=40998, owner=deployer)`, `SendUln302`, `ReceiveUln302`, registers both libraries.\n\n\u003e Sentrix's `eth_getBlockByNumber(full=true)` returns short tx-hash arrays where foundry's fork-initializer expects full tx objects. If `forge script` errors on fork instantiation, fall back to direct `cast send --create` — pattern documented in [`docs/runbook-step2-broadcast.md`](docs/runbook-step2-broadcast.md).\n\n### Hyperlane testnet round-trip\n\n\u003e **Note on deploy scripts.** The Hyperlane testnet stack was bootstrapped via\n\u003e `cast send --create` per [`docs/runbook-step2-broadcast.md`](docs/runbook-step2-broadcast.md)\n\u003e (forge script forking trips on Sentrix's strict-decode RPC quirk). The\n\u003e `hyperlane/scripts/` directory is currently empty — proper foundry scripts are\n\u003e pending; until then, use the cast-send runbook patterns below. Deployed\n\u003e addresses (mailbox, ISM, hooks, warp-route contracts) are recorded in\n\u003e `deployments/hyperlane-{testnet,sepolia,warp-route}.json`.\n\nRound-trip steps once the contracts are deployed:\n\n1. **Dispatch** — call `Mailbox.dispatch(destDomain, recipient, body)` on the\n   Sentrix Testnet mailbox `0x9741D99270aF14D4baca0e387B6ac0500b9a288F`.\n2. **Manual relay** (Phase 0, no validator set yet) — call\n   `Mailbox.process(metadata, message)` on the Sepolia mailbox\n   `0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766` from the deployer wallet.\n3. Production swap to validator-relayed delivery is gated on the MultisigIsm\n   setup tracked in [`docs/multisigism-setup.md`](docs/multisigism-setup.md).\n\nBoth `Dispatch` (Sentrix side) and `Handle` (Sepolia side) emit on the canonical Mailbox contracts and are observable via tx hash + explorer URL in `deployments/hyperlane-warp-route.json`.\n\n## Layout\n\n| Path | Purpose |\n|---|---|\n| `foundry.toml` | Build config: Sentrix RPC endpoints + LZ + OZ v4 remappings (PnP store paths) |\n| `scripts/DeployLZ-SentrixTestnet.s.sol` | LZ V2 core deployment to Sentrix Testnet |\n| `hyperlane/` | Hyperlane v3 deploy scripts + monorepo submodule |\n| `deployments/*.json` | Per-network deployment metadata (addresses, tx hashes, deployer notes) |\n| `docs/` | Runbooks + LayerZero Labs application draft + multichain roadmap |\n| `subgraph/` | Source-of-truth subgraph for chain analytics (separate concern from bridge — kept here for org convenience) |\n| `watcher-rs/` | Bridge route monitor — read-only Rust watcher (NoopIsm / wSRX invariant / RPC health). See [`watcher-rs/README.md`](watcher-rs/README.md). |\n| `api-rs/` | Bridge status API — read-only HTTP endpoints: `/health`, `/status`, `/routes`, `/routes/:id`, `/messages`, `/messages/:id`, `/unsafe-config`, `/fresh-user-flow`, `/readiness`. See [`api-rs/README.md`](api-rs/README.md). Live at https://bridge-api.sentrixchain.com. |\n| `LayerZero-v2/` *(gitignored)* | Third-party clone — `github.com/LayerZero-Labs/LayerZero-v2` |\n| `lib/` *(gitignored)* | OZ v4 + forge-std clones for foundry remappings |\n\n## Open issues\n\n| # | Title | Status |\n|---|---|---|\n| [#2](https://github.com/sentrix-labs/sentrix-bridge/issues/2) | Track Sentrix EID assignment from LayerZero Labs | Application drafted, awaiting submission |\n| [#3](https://github.com/sentrix-labs/sentrix-bridge/issues/3) | Hyperlane production MultisigIsm setup | Runbook drafted, validator-set TBD |\n| [#4](https://github.com/sentrix-labs/sentrix-bridge/issues/4) | LZ — deploy PriceFeed + Executor + Treasury + DVN for production | Scoping |\n| [#5](https://github.com/sentrix-labs/sentrix-bridge/issues/5) | Re-verify cross-chain user-entry path after sentrix-labs/sentrix#580 closes | Re-verified post-#580 close — fresh-user wrap path works |\n\n## License\n\n| Path | License |\n|---|---|\n| Deploy scripts, runbooks, configs, subgraph (this repo) | BUSL-1.1 (matches the chain repo) |\n| `LayerZero-v2/` (clone-instruction in Setup; gitignored — NOT redistributed here) | LZBL-1.2 upstream (LayerZero Business License — converts to GPL v2 on Dec 14, 2027) |\n| `lib/openzeppelin-contracts-v4/` (clone-instruction in Setup; gitignored) | MIT upstream (OpenZeppelin) |\n| `lib/forge-std/` (clone-instruction in Setup; gitignored) | MIT upstream (Foundry) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsentrix-labs%2Fsentrix-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsentrix-labs%2Fsentrix-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsentrix-labs%2Fsentrix-bridge/lists"}