Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Oct 19, 2023
1 parent aa03095 commit 7260cea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7260cea

Please sign in to comment.