Mellow Protocol
  • 💡Overview
  • 🎛️MELLOW LRT (LST) PRIMITIVE
    • Overview
    • Simple-LRT
    • LRT Contracts
      • 🏦Vault
      • 🔧VaultConfigurator
      • ⚖️Validators
        • ManagedValidator
        • ERC20SwapValidator
        • DefaultBondValidator
        • AllowAllValidator
      • 🧬Strategies
        • DefaultBondStrategy
        • SimpleDVTStakingStrategy
      • 🔎Oracles
        • ChainlinkOracle
        • ManagedRatiosOracle
      • 🧱Modules
        • DelegateModules
          • ERC20SwapModule
          • DefaultBondModule
          • StakingModule
        • ExternalModules
        • TvlModules
          • DefaultBondTvlModule
          • ERC20TvlModule
          • ManagedTvlModule
      • 🪛Utils
        • DepositWrapper
        • DefaultAccessControl
      • 🔐Security
        • AdminProxy
    • DVstETH vault overview
    • Interoperable vaults
    • Contract deployments
    • Security
    • Loyalty Points
      • Points in Symbiotic pre-deposit contracts
      • DeFi points integration instructions
    • User Tutorials
      • Deposit guide
      • Withdrawal guide
      • Emergency withdrawal guide (advanced)
    • API
  • 🤖MELLOW ALM
    • Mellow ALM Toolkit
      • Overview
      • 📘Domain objects
      • 🧩Components
      • 🍜Processes
      • 💎Core
      • 🔮Oracles
        • VeloOracle
      • 🎯Strategy
        • PulseStrategyModule
      • 🔌AMM Adapters
        • VeloAmmModule
      • 🚙Utility contracts
        • AmmDepositWithdrawModule
        • Counter
        • LpWrapper
        • VeloDeployFactory
    • Mellow permissionless vaults
      • Overview
      • Core
      • Contracts API
      • Strategies
        • Fearless Gearbox strategy
        • LStrategy
        • Uni V3 Boosted strategy
        • Pulse strategy
        • Pulse strategy V2
        • Tamper strategy
      • Governance parameters
      • Contracts specs
      • Tutorials
        • Contracts deployments
        • Deploy your own strategy
        • wstETH strategies deposit guide
      • Mellow contracts addresses
        • Mellow Protocol Addresses (Polygon)
        • Mellow Protocol Addresses (Mainnet)
        • Gearbox Fearless Strategy
        • Tamper Strategy
        • UniV3 Pulse wstETH-USDC
        • UniV3 Pulse V2 wstETH-USDC
        • Velodrome CL strategies
        • Aerodrome CL strategies
      • Glossary
      • FAQ
    • Mellow Backtesting SDK
  • 🗄️Resources
    • Media kit
    • Twitter
    • Discord
Powered by GitBook
On this page
  • Deployment requirements
  • Set up the local environment
  • Deploying
  • Verifying
  1. MELLOW ALM
  2. Mellow permissionless vaults
  3. Tutorials

Contracts deployments

PreviousTutorialsNextDeploy your own strategy

Last updated 2 years ago

Deployment requirements

To follow this guide, you must have the following installed:

Set up the local environment

At first, you have to pull the and checkout on the actual main branch.

git clone https://github.com/mellow-finance/mellow-vaults.git

Secondly, you should install all necessary dependencies, including .

yarn

Then you have to set up environment variables. You can do it by creating .env file and set the required variables there.

// .env
MAINNET_RPC=<ethereum RPC endpoint>
MAINNET_DEPLOYER_PK=0x... # for mainnet deploy

MAINNET_PROTOCOL_ADMIN_ADDRESS=0x...
MAINNET_STRATEGY_ADMIN_ADDRESS=0x...
MAINNET_PROTOCOL_TREASURY_ADDRESS=0x...
MAINNET_STRATEGY_TREASURY_ADDRESS=0x...

<CHAIN_NAME>_RPC=<ethereum RPC endpoint>
<CHAIN_NAME>_DEPLOYER_PK=0x... # for specific chain deploy

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.

yarn deploy:mainnet

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

yarn verify:mainnet

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.

🤖
nodejs >= v12.x & npm >= 6.x
yarn >= 1.x
mellow vaults repository
hardhat