diff --git a/README.md b/README.md index 551a1f4..44c5e79 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,21 @@ Run tests make test ``` +### Deployment + +Deployment of periphery contracts such as the [Apr Oracle](https://github.com/yearn/tokenized-strategy-periphery/blob/master/src/AprOracle/AprOracle.sol) or [Common Report Trigger](https://github.com/yearn/tokenized-strategy-periphery/blob/master/src/ReportTrigger/CommonReportTrigger.sol) are done using a create2 factory in order to get a deterministic address that is the same on each EVM chain. + +This can be done permissionlessly if the most recent contract has not yet been deployed on a chain you would like to use it on. + +1. Add your deployers Private key under PRIVATE_KEY in your .env file. + - NOTE: make sure to add `0x` to the beginning of the key. +2. Run the deployment script + ```sh + forge script script/Deploy.s.sol:Deploy --broadcast --rpc-url YOUR_RPC + ``` + - You can do a dry run before officially deploying by removing the `--broadcast` flag. + - For chains that don't support 1559 tx's you may need to add a `--legacy` flag. +3. The address the contract was deployed at will print in the console and should match any other chain the same version has been deployed on. ## Swapper helper contracts For strategies that need to swap reward tokens back into 'asset' a series of 'swapper' contracts have been pre-developed to make your preferred method as easy as possible to use. diff --git a/src/test/utils/Setup.sol b/src/test/utils/Setup.sol index 5c0708c..201f4d8 100644 --- a/src/test/utils/Setup.sol +++ b/src/test/utils/Setup.sol @@ -13,7 +13,6 @@ import {VaultConstants, Roles} from "@yearn-vaults/interfaces/VaultConstants.sol import {IVaultFactory} from "@yearn-vaults/interfaces/IVaultFactory.sol"; import {MockStrategy} from "../mocks/MockStrategy.sol"; -import {Governance} from "../../utils/Governance.sol"; contract Setup is ExtendedTest { VyperDeployer public vyperDeployer = new VyperDeployer(); @@ -189,7 +188,7 @@ contract Setup is ExtendedTest { } function setFees(uint16 _protocolFee, uint16 _performanceFee) public { - address gov = Governance(address(vaultFactory)).governance(); + address gov = vaultFactory.governance(); // Need to make sure there is a protocol fee recipient to set the fee. vm.prank(gov);