Check the repository prerequisites
If deploying to a brand new network, make sure the network is added to the repo network configuration and explorer verification configuration. Files:
The flow is:
- Prepare configs.
- Generate contracts (only for a brand-new product).
- Generate per-network deployment config.
- Compile + test.
- Run deployment scripts in order.
- Run post-deployment scripts.
- After runing the deployment command, add the deployed proxy address to the addresses file (
config/constants/addresses.ts) - Always check if contract was properly verified, if not - verify it in a separate command (check Troubleshooting)
Run:
yarn deploy:generate:contractsFollow the interactive prompts (token name, symbol, contract prefix, roles prefix, etc.).
After generation:
- Review the git diff and ensure the generated contracts/config look correct.
If a new payment token is introduced, add:
- Token enum entry
- Deployment config for the payment token
- Token address data
Run (case sensitive):
yarn deploy:generate:config --network <network_name> --mtoken <mToken_name>Notes:
- Provide values from the deployment ticket.
- If the command does not ask for a value you need, edit the generated config manually.
- If the product already exists, this will update/extend the existing config for the new network.
yarn compile
yarn test
Also confirm verification settings in .env are correct if you expect automatic verification to run.
--network <network_name>: required for all scripts--mtoken <mToken_name>: required for product deployment scripts--ptoken <pToken_name>: required for payment-token specific scripts
After each step, the script prints proxy and implementation addresses.
Add new addresses to the repo configuration before proceeding to the next step. Skipping this typically causes later validation to fail.
Deploy access control:
yarn deploy:ac --network <network>Post steps:
yarn deploy:post:grant:admin --network <network>
yarn deploy:post:revoke:roles --network <network>For each command below, include --network and --mtoken:
yarn deploy:token
yarn deploy:aggregator
yarn deploy:feed
# Deposit vault (pick the one that matches your vault type)
yarn deploy:dv
# or
yarn deploy:dv:ustb
# Redemption vault (pick the one that matches your vault type)
yarn deploy:rv
# or
yarn deploy:rv:swapperIf introducing a new payment token, deploy its feed components:
yarn deploy:aggregator:ptoken --network <network> --ptoken <ptoken>
yarn deploy:feed:ptoken --network <network> --ptoken <ptoken>yarn deploy:post:grant:roles --network <network_name> --mtoken <mToken>
yarn deploy:post:set:price --network <network_name> --mtoken <mToken>
yarn deploy:post:add:ptokens --network <network_name> --mtoken <mToken>- Waive vault fee for an address
- Pause selected functions on vaults
- If contract verification failed, you can retry it using
verifycommand. Example:
yarn hardhat verify 0xfc8ac00c85cced29304c37727f525860039b852c --network monad <here you can incert constructor parameters if needed>