Docs · Build
Deployments
Where the contracts live, how to deploy your own set, and how the site and keeper find them.
Addresses
These are the addresses this site is using right now.
| Contract | Address on Robinhood Chain | |
|---|---|---|
| Registry | 0x2224166b897802B32990697B242Dec1075208767 | |
| Alarm | 0x636f2625C526Be3F497d3267fed78010DAEA384C | |
| Vault validator | 0xE82bbD7683cfA8765a2Cb6b237095E7Ea422790e |
The contracts are immutable. A new version would be a new deployment at new addresses, and existing commitments would stay where they are.
Networks
| Robinhood Chain | Robinhood Chain Testnet | |
|---|---|---|
| Chain ID | 4663 | 46630 |
| RPC | https:/ | https:/ |
| Explorer | robinhoodchain. | explorer. |
| EntryPoint v0.7 | 0x0000000071727De22E5E9d8BAf0edAc6f37da032 | Same address |
Deploying the contracts
Pick a seed and derive the alarm points. The constructor re-checks the derivation, so the file cannot be edited by hand.
bashSEED=0x$(openssl rand -hex 32) npm run alarm-points -w @enquantum/tools -- $SEED --out contracts/deployments/alarm-points.jsonDeploy. The script deploys the Alarm, then the Registry, then the Vault validator, and writes
contracts/deployments/<chainId>.json.bashcd contracts ALARM_POINTS_FILE=deployments/alarm-points.json \ GUARDIAN=0x... THRESHOLD_TIER=1 REVEAL_DELAY=20 \ ROBINHOOD_TESTNET_RPC_URL=https://rpc.testnet.chain.robinhood.com \ forge script script/Deploy.s.sol --rpc-url robinhood_testnet --broadcast --private-key $DEPLOYER_KEY --verifyPublish the addresses to the packages the site and keeper read.
bashnpm run export-abi && npm run build -w @enquantum/abi
| Variable | Default | Meaning |
|---|---|---|
ALARM_POINTS_FILE | required | Output of the alarm-points tool. |
GUARDIAN | none | Address allowed to trip early. Required on mainnet. |
THRESHOLD_TIER | 1 | Lowest tier whose break trips the alarm. |
REVEAL_DELAY | 20 | Blocks between a claim commit and its reveal. |
Its seed is public and shared by every test deployment. A mainnet deployment needs its own seed, and the guardian should be a multisig.
Configuring the site
The site reads its network and addresses from environment variables, falling back to the deployment recorded in @enquantum/abi.
NEXT_PUBLIC_CHAIN_ID=46630
NEXT_PUBLIC_RPC_URL=
NEXT_PUBLIC_REGISTRY_ADDRESS=0x...
NEXT_PUBLIC_ALARM_ADDRESS=0x...
NEXT_PUBLIC_VALIDATOR_ADDRESS=0x...
On Vercel, import the repository, set the root directory to site and add the variables above. They are read at build time, so redeploy after changing them. The keeper has its own settings.
Checking a deployment
- The Alarm page shows the seed, guardian, threshold tier and reveal delay read from the contract.
Registry.alarm()andVaultValidator.alarm()must both return the Alarm address, andVaultValidator.registry()the Registry address.- Re-run the alarm-points tool with the published seed and compare the points with
Alarm.getTier.