Scripts
The scripts/ directory contains Hardhat and Foundry scripts for deployment, verification, testing, operations, and debugging.
Script Organization
| Directory | Purpose |
|---|---|
scripts/deploy/ | Deploy individual contracts or the full protocol. |
scripts/verify/ | Verify contracts on block explorers. |
scripts/e2e/ | End-to-end integration tests. |
scripts/ops/ | Operational and maintenance scripts. |
scripts/test/ | Test and simulation helpers. |
scripts/debug/ | One-off debug and inspection scripts. |
Common Commands
Deploy the Full Protocol
bash
npx hardhat run scripts/deploy/deployFull.js --network <network>Verify on Robinhood Chain
bash
npx hardhat run scripts/verify/verifyBlockscout.js --network robinhoodRun the E2E Suite
bash
npx hardhat test test/e2e.jsEnvironment
Most scripts require environment variables from .env:
PRIVATE_KEY— Deployer wallet private key.ROBINHOOD_BLOCKSCOUT_API_KEY— API key for verification.
WARNING
scripts/verify/verifyHardhat.sh and scripts/verify/verifyBlockscout.js no longer contain hardcoded keys; they read from environment variables.
Adding New Scripts
Place scripts in the directory that matches their purpose:
- Deployment scripts go in
scripts/deploy/. - One-off maintenance scripts go in
scripts/ops/. - Debug scripts go in
scripts/debug/.
Each script directory has a README.md describing its contents.