From cb9be33989dd0f482462c3ee429dff6900e05dfd Mon Sep 17 00:00:00 2001 From: Schlag <89420541+Schlagonia@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:17:19 -0700 Subject: [PATCH] feat: 302 release (#199) * feat: 302 release * chore: update branch * fix: foundry remapping --- README.md | 2 ++ TECH_SPEC.md | 2 +- ape-config.yaml | 4 ++-- contracts/interfaces/IVault.sol | 10 ++++++++++ contracts/interfaces/IVaultFactory.sol | 4 ++++ foundry.toml | 2 +- 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4960ebce..a78d1e42 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ Deployments on new chains can be done permissionlessly by anyone using the inclu ape run scripts/deploy.py --network YOUR_RPC_URL ``` +If the deployments do not end at the same address you can also manually send the calldata used in the previous deployments on other chains. + ### To make a contribution please follow the [guidelines](https://github.com/yearn/yearn-vaults-v3/bloc/master/CONTRIBUTING.md) See the ApeWorx [documentation](https://docs.apeworx.io/ape/stable/) and [github](https://github.com/ApeWorX/ape) for more information. diff --git a/TECH_SPEC.md b/TECH_SPEC.md index 8d2051d0..a6d8b008 100644 --- a/TECH_SPEC.md +++ b/TECH_SPEC.md @@ -183,7 +183,7 @@ The DEPOSIT_LIMIT_MANAGER is in charge of setting the deposit_limit or a deposit On deployment deposit_limit defaults to 0 and will need to be increased to make the vault functional -The deposit_limit will have to be set to MAX_UINT256 in order to set a deposit_limit_module, and the module will have to be address 0 to adjust the deposit_limit. +The deposit_limit will have to be set to MAX_UINT256 in order to set a deposit_limit_module, and the module will have to be address 0 to adjust the deposit_limit. Or the DEPOSIT_LIMIT_MANAGER can use the option `override` flags to do this in one step. #### Setting the withdraw limit module The WITHDRAW_LIMIT_MANAGER is in charge of setting the withdraw_limit_module for the vault diff --git a/ape-config.yaml b/ape-config.yaml index f7230301..f29ebbf2 100644 --- a/ape-config.yaml +++ b/ape-config.yaml @@ -12,13 +12,13 @@ dependencies: ref: 4.9.5 - name: tokenized-strategy github: yearn/tokenized-strategy - ref: master + ref: v3.0.2 contracts_folder: src solidity: import_remapping: - "@openzeppelin/contracts=openzeppelin/v4.9.5" - - "@tokenized-strategy=tokenized-strategy/master" + - "@tokenized-strategy=tokenized-strategy/v3.0.2" ethereum: local: diff --git a/contracts/interfaces/IVault.sol b/contracts/interfaces/IVault.sol index 5e5c49aa..b65d6068 100644 --- a/contracts/interfaces/IVault.sol +++ b/contracts/interfaces/IVault.sol @@ -90,10 +90,20 @@ interface IVault is IERC4626 { function set_deposit_limit(uint256 deposit_limit) external; + function set_deposit_limit( + uint256 deposit_limit, + bool should_override + ) external; + function set_deposit_limit_module( address new_deposit_limit_module ) external; + function set_deposit_limit_module( + address new_deposit_limit_module, + bool should_override + ) external; + function set_withdraw_limit_module( address new_withdraw_limit_module ) external; diff --git a/contracts/interfaces/IVaultFactory.sol b/contracts/interfaces/IVaultFactory.sol index 88e196ad..4dc2d8c2 100644 --- a/contracts/interfaces/IVaultFactory.sol +++ b/contracts/interfaces/IVaultFactory.sol @@ -50,6 +50,10 @@ interface IVaultFactory { view returns (uint16 fee_bps, address fee_recipient); + function protocol_fee_config( + address vault + ) external view returns (uint16 fee_bps, address fee_recipient); + function set_protocol_fee_bps(uint16 new_protocol_fee_bps) external; function set_protocol_fee_recipient( diff --git a/foundry.toml b/foundry.toml index 99ebea0b..03c29393 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,7 +7,7 @@ libs = ['lib'] remappings = [ 'forge-std/=lib/forge-std/src/', 'erc4626-tests/=lib/erc4626-tests/', - "@tokenized-strategy=contracts/.cache/tokenized-strategy/master", + "@tokenized-strategy=contracts/.cache/tokenized-strategy/v3.0.2", '@openzeppelin/contracts=contracts/.cache/openzeppelin/v4.9.5/', ] fs_permissions = [{ access = "read", path = "./"}]