git clone https://github.com/erenjaegar77/beefy-workshop-eth-arg.git
NODE Version 16.12.0
git clone https://github.com/beefyfinance/beefy-v2.git
NODE Version 20.5.0
git clone https://github.com/beefyfinance/beefy-api.git
yarn install
Deploy Script
-
Import from addressbook the platform and tokens
-
Update Vault Params
-
Update Strategy Params
Automated testing
- run
yarn installForge
- open new terminal to fork optimism(or choosed chain) with
yarn fork https://rpc.ankr.com/optimism/
- deploy the vault/strat on the local host with
yarn deploy localhost
- copy the vault address and paste on the line 19 on
ProdVaultTest.t.sol
- test the strart with
yarn forgeTest:vault
- deploy to mainnet
Manual Testing Is Required for All Live Vaults
- Give vault approval to spend your want tokens.
- Deposit a small amount to test deposit functionality.
- Withdraw, to test withdraw functionality.
- Deposit a larger amount wait 30 seconds to a minute and harvest. Check harvest transaction to make sure things are going to the right places.
- Panic the vault. Funds should be in the strategy.
- Withdraw 50%.
- Try to deposit, once you recieve the error message pop up in metamask you can stop. No need to send the transaction through.
- Unpause.
- Deposit the withdrawn amount.
- Harvest again.
- Switch harvest-on-deposit to
true
for low-cost chains. (L2's, Zk's, Polygon, BNB Chain, Fantom, etc..) - Check that
callReward
is not 0, if needed setpendingRewardsFunctionName
to the relevant function name from the masterchef. - Transfer ownership of the vault and strategy contracts to the owner addresses for the respective chains found in the address book.
- Leave some funds in the vault until users have deposited after going live, empty vaults will fail validation checks.
- Run
yarn validate
to ensure that the validation checks will succeed when opening a pull request.
This is required so that maintainers can review everything before the vault is actually live on the app and manage it after its live.