Deployment
This guide covers how to deploy the Rugdrome protocol to a local network, testnet, or mainnet.
Prerequisites
- A funded wallet private key set in
.envasPRIVATE_KEY. - A Blockscout API key set as
ROBINHOOD_BLOCKSCOUT_API_KEYif deploying to Robinhood Chain. - The target network configured in
hardhat.config.js.
Local Deployment
Run the full deployment against a local Hardhat node:
bash
npx hardhat node
npx hardhat run scripts/deploy/deployFull.js --network localhostTestnet Deployment
Replace robinhood_testnet with the network name from hardhat.config.js:
bash
npx hardhat run scripts/deploy/deployFull.js --network robinhood_testnetDeployment Scripts
All deployment scripts live in scripts/deploy/:
| Script | Purpose |
|---|---|
deployFull.js | Deploys the entire protocol in one run. |
deployRugd.js | Deploys the RUGD token contract. |
deployVotingEscrow.js | Deploys the voting escrow and veNFT. |
deployVoter.js | Deploys the voter. |
deployRouter.js | Deploys the swap router. |
deployMinter.js | Deploys the emission minter. |
deployZapHelper.js | Deploys the zap helper. |
Deployment Outputs
After deployment, addresses are recorded in:
deployments.json— canonical deployment manifest..openzeppelin/— Hardhat-upgrades manifests (if using proxies).
Verification
Verify contracts on Robinhood Chain:
bash
# Via Hardhat
npx hardhat run scripts/verify/verifyBlockscout.js --network robinhood
# Or via the bash wrapper
./scripts/verify/verifyHardhat.shTIP
Make sure ROBINHOOD_BLOCKSCOUT_API_KEY is set before verifying.
Post-Deployment Checklist
- Transfer
PairFactoryand other upgradeable admin rights to the Timelock or a multisig. - Update the frontend contract address mappings in
frontend/src/lib/contracts.ts. - Verify all contracts on the block explorer.
- Run the E2E test against the deployed contracts.