DeploymentsAll pages

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.

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 ChainRobinhood Chain Testnet
Chain ID466346630
RPChttps://rpc.mainnet.chain.robinhood.comhttps://rpc.testnet.chain.robinhood.com
Explorerrobinhoodchain.blockscout.comexplorer.testnet.chain.robinhood.com
EntryPoint v0.70x0000000071727De22E5E9d8BAf0edAc6f37da032Same address

Deploying the contracts

  1. Pick a seed and derive the alarm points. The constructor re-checks the derivation, so the file cannot be edited by hand.

    bash
    SEED=0x$(openssl rand -hex 32)
    npm run alarm-points -w @enquantum/tools -- $SEED --out contracts/deployments/alarm-points.json
    
  2. Deploy. The script deploys the Alarm, then the Registry, then the Vault validator, and writes contracts/deployments/<chainId>.json.

    bash
    cd 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 --verify
    
  3. Publish the addresses to the packages the site and keeper read.

    bash
    npm run export-abi && npm run build -w @enquantum/abi
    
VariableDefaultMeaning
ALARM_POINTS_FILErequiredOutput of the alarm-points tool.
GUARDIANnoneAddress allowed to trip early. Required on mainnet.
THRESHOLD_TIER1Lowest tier whose break trips the alarm.
REVEAL_DELAY20Blocks between a claim commit and its reveal.
The example points file is refused on mainnet.

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.

env
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() and VaultValidator.alarm() must both return the Alarm address, and VaultValidator.registry() the Registry address.
  • Re-run the alarm-points tool with the published seed and compare the points with Alarm.getTier.