[Vault] Remove redeem() and simplify inheritance.
#2737
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR aims:
redeem()feature fromVaultCore.soland related contracts.XXXVaultCorecontractRemove
redeem()feature.redeem()function, now all redeem will be async redeem._redeem()implementation on all relatedVaultCorecontract.calculateRedeemOutputsredeemFeeBpsvariable, as not used anymore.RedeemFeeUpdatedevent andsetRedeemFeeBps().MAX_INTonVaultCore.solas not used anymore.Simplify
VaultCoreinheritance.Because we are simplifying
VaultCore.solcontract, it is now time to simplify inheritance across allVaultCore.soland avoid nested and inheritance. AllVaultContractwill no directly inherit fromVaultContract.soland nothing else.But there in
OETHVaultCore.solthis variable_deprecated_wethAssetIndex. So all contract that are currently inheriting fromOETHVaultCore.sol, should conserve this variable at the correct slot.For the sake of simplicity, we can move
_deprecated_wethAssetIndexin theVaultStorage.sol. This is not an issue for:_deprecated_wethAssetIndex)._deprecated_wethAssetIndex)._deprecated_wethAssetIndex)._deprecated_wethAssetIndex).OETHVaultCore.sol, becauseOSonicVaultCore,OETHBaseVaultCore,OETHPlumeVaultCoredon't have any storage variable.Let's double check with a storage check: