Deploy to Testnet
Reproducing the Phase 1 testnet deployment on 46630.
Implemented
The live testnet deployment is documented in the repo's Phase 1 live runbook. This page is the procedure.
Prerequisites
make installcompleted.- A funded testnet key (ETH for gas).
.envconfigured:
env
RH_TESTNET_RPC_URL=<your-testnet-rpc-url>
PRIVATE_KEY=<your-private-key>
USDG_ADDRESS=0x7E955252E15c84f5768B83c41a71F9eba181802F
OWNER=<your-deployer-address>
LEADER_ADDRESS=<opted-in-leader-address>
KEEPER_ADDRESS=<keeper-address>
PROTOCOL_FEE_RECIPIENT=<treasury-address> # defaults to OWNERDeploy
bash
make deploy-testnetWhat it does, in order:
- Deploys
NavLib,FeeModule,RiskModule,SwapAdapter(router unset),DeskFactory. - Calls
factory.createDesk(LEADER_ADDRESS)→ bootstrapDeskVault. - Sets the vault's keeper to
KEEPER_ADDRESS. - Never calls
setRouter, never deploysSeatToken, and skipsconfigureDeskunless theMAX_*env vars are set.
Record the addresses
bash
make write-addressesThis regenerates app/src/lib/addresses.ts from contracts/broadcast/**/run-latest.json. Commit the result — it is the address source of truth.
Verify
bash
# factory produced one desk
cast call $FACTORY "allDesks(uint256)(address)" 0 --rpc-url $RH_TESTNET_RPC_URL
# vault is cash-only: router must be zero
cast call $ADAPTER "router()(address)" --rpc-url $RH_TESTNET_RPC_URL
# → 0x0000000000000000000000000000000000000000Run the keeper against it
bash
make keeper-testnetPaper executor, chain 46630, fixture fills. Live execution is impossible on testnet by design (isTradeEligible is false for every 46630 asset).