Skip to content

Tomorrow's TODO — bridge completion + cleanup (2026-06-15)

Quick reference list for picking up where we left off tonight. Estimated total time: 3–4 hours focused work.


Status going in

✅ Chain alive at sanect_76287-1 with primary as 99.82% majority validator ✅ All 4 nodes healthy (primary + 2nd + 3rd + Vultr) ✅ Contracts redeployed (DEX, Farm, Privacy, Domain) — addresses in CLAUDE.md ✅ dex-app deployed and serving the swap UI ✅ Hyperlane core on sanect (Mailbox 0x17Af7329E8BB9DB890628F501786cF24c9f2Db1a)


Phase 1 — Deploy SanectHypAdapter (~10 min)

bash
cd /mnt/c/Github/sanect-node/dex

# Bring back the bridge contracts
ls contracts/bridge/SanectHypAdapter.sol 2>/dev/null || {
  mv /tmp/bridge-stash contracts/bridge 2>/dev/null
  git checkout -- script/DeployBridge.s.sol script/DeployHyperlaneBridge.s.sol
}

# Install Hyperlane forge deps if not already done
forge install hyperlane-xyz/hyperlane-monorepo
forge install OpenZeppelin/openzeppelin-contracts-upgradeable

Add to dex/foundry.toml (under [profile.default]):

toml
remappings = [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@hyperlane-xyz/core/=lib/hyperlane-monorepo/solidity/contracts/",
]

Deploy:

bash
export RPC=https://rpc.testnet.sanect.com
export DEPLOYER_PRIVATE_KEY=0x...
export MODE=adapter
export HYP_MAILBOX=0x17Af7329E8BB9DB890628F501786cF24c9f2Db1a
export WSNCT=0xC09473C15BE5A4B9D1a587a45dC8EF46F6872935

forge script script/DeployHyperlaneBridge.s.sol \
  --rpc-url $RPC --broadcast --private-key $DEPLOYER_PRIVATE_KEY

Save the SanectHypAdapter address.


Phase 2 — Get Sepolia testnet ETH (~15 min)

Free faucets:

Fund 0x7cB61D4117AE31a12E393a1Cfa3BaC666481D02E with at least 0.5 Sepolia ETH — enough for adapter deploy + a few test bridges.


Phase 3 — Register Sepolia in Hyperlane (~5 min)

Sepolia is already in the official Hyperlane registry (no hyperlane registry init needed). Just verify:

bash
hyperlane registry list 2>&1 | grep -i sepolia
# expect: sepolia listed

Phase 4 — Deploy WSanectHyp on Sepolia (~10 min)

bash
cd /mnt/c/Github/sanect-node/dex

export SEPOLIA_RPC=https://ethereum-sepolia.publicnode.com  # or your preferred Sepolia RPC
export MODE=synthetic
export HYP_MAILBOX=0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766  # Sepolia Mailbox

forge script script/DeployHyperlaneBridge.s.sol \
  --rpc-url $SEPOLIA_RPC --broadcast --private-key $DEPLOYER_PRIVATE_KEY

Save the WSanectHyp address on Sepolia.


Phase 5 — Enroll routers both sides (~10 min)

On sanect:

bash
cast send 0x...SanectHypAdapter... "enrollRemoteRouter(uint32,bytes32)" \
  11155111 \
  $(cast --to-bytes32 0x...WSanectHyp_on_Sepolia...) \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY
# 11155111 = Sepolia chain ID

On Sepolia:

bash
cast send 0x...WSanectHyp_on_Sepolia... "enrollRemoteRouter(uint32,bytes32)" \
  76287 \
  $(cast --to-bytes32 0x...SanectHypAdapter...) \
  --rpc-url $SEPOLIA_RPC --private-key $DEPLOYER_PRIVATE_KEY

Phase 6 — Run relayer (~30 min)

We use TrustedRelayerIsm so just the relayer needs to run (no separate validator).

bash
mkdir -p ~/.hyperlane/agent-configs

hyperlane registry agent-config --chains sanect,sepolia > ~/.hyperlane/agent-configs/agent-config.json

Run as Docker container (Hyperlane provides one):

bash
docker run -d --name hyperlane-relayer \
  --restart unless-stopped \
  -v ~/.hyperlane/agent-configs:/configs \
  -e HYP_RELAYER_RELAYCHAINS=sanect,sepolia \
  -e HYP_RELAYER_CONFIG=/configs/agent-config.json \
  -e HYP_RELAYER_DEFAULTSIGNER_KEY=$DEPLOYER_PRIVATE_KEY \
  -e HYP_RELAYER_DB=/data/hyperlane_db \
  -v hyperlane-relayer-data:/data \
  gcr.io/abacus-labs-dev/hyperlane-agent:main \
  ./relayer

Pre-fund the relayer wallet with a few cents of SNCT + Sepolia ETH (for tx submission gas).


Phase 7 — Test bridge a tiny amount (~10 min)

bash
# Wrap 1 SNCT into WSNCT
cast send 0xC09473C15BE5A4B9D1a587a45dC8EF46F6872935 "deposit()" \
  --value $(cast --to-wei 1 ether) \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY

# Approve adapter to take 1 WSNCT
cast send 0xC09473C15BE5A4B9D1a587a45dC8EF46F6872935 "approve(address,uint256)" \
  0x...SanectHypAdapter... $(cast --to-wei 1 ether) \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY

# Quote gas first
QUOTE=$(cast call 0x...SanectHypAdapter... "quoteGasPayment(uint32)(uint256)" 11155111 --rpc-url $RPC)
echo "Quoted gas: $QUOTE"

# Bridge 1 WSNCT to Sepolia recipient
cast send 0x...SanectHypAdapter... "transferRemote(uint32,bytes32,uint256)" \
  11155111 \
  $(cast --to-bytes32 0x7cB61D4117AE31a12E393a1Cfa3BaC666481D02E) \
  $(cast --to-wei 1 ether) \
  --value $QUOTE \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY

Within 2–5 minutes the recipient should have 1 wSNCT on Sepolia. Confirm:

bash
cast call 0x...WSanectHyp_on_Sepolia... "balanceOf(address)(uint256)" 0x7cB61D... --rpc-url $SEPOLIA_RPC

Phase 8 — Reverse bridge test (~5 min)

bash
# Send 1 wSNCT from Sepolia → sanect
cast send 0x...WSanectHyp... "transferRemote(uint32,bytes32,uint256)" \
  76287 \
  $(cast --to-bytes32 0x7cB61D...) \
  $(cast --to-wei 1 ether) \
  --value <quoted gas in Sepolia ETH> \
  --rpc-url $SEPOLIA_RPC --private-key $DEPLOYER_PRIVATE_KEY

Within minutes you should have 1 WSNCT back on sanect.


Phase 9 — Wrap-up (~5 min)

  1. Update CLAUDE.md with bridge addresses
  2. Submit to Squid Router: https://squidrouter.com/integrate (free polished UI)
  3. Apply to LayerZero V2 in parallel: https://layerzero.network/developers (6–12 week onboarding)

Optional: bridge widget in dex-app

Add /bridge route to dex-app that calls transferRemote from the UI. ~3 hours of frontend work — defer to next week.