Contracts deployments
Deployment requirements
To follow this guide, you must have the following installed:
Set up the local environment
At first, you have to pull the mellow vaults repository and checkout on the actual main branch.
Secondly, you should install all necessary dependencies, including hardhat.
Then you have to set up environment variables. You can do it by creating .env
file and set the required variables there.
Make sure, that all necessary constants in hardhat.config.js
file is set.
Congratulations! You are ready to deploy.
Deploying
You must check the gas value on chain block explorer for smooth deployment and update TRANSACTION_GAS_LIMITS
constant at deploy/0000_utils.ts
file with actual values.
Hardhat sometimes couldn't estimate base and priority fees correctly, so we set maxFeePerGas
and maxPriorityFeePerGas
manually in weis to prevent transaction execution from failing.
Everything we have to do now is to only run one command in the shell to deploy the system.
You can also use yarn deploy:<CHAIN_NAME>
for deploying on any other chain, but make sure that this command is initialized in package.json
.
In case of the command failing check, that you've set all necessary env variables, and re-run it. The command won't redeploy contracts, that have already been deployed, except strategies.
Verifying
You can verify contracts after deployment using the following command
You can also use yarn verify:<CHAIN_NAME>
for deploying on any other chain, but make sure that this command is initialized in package.json
.
Last updated