Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Make
ERC4626
Module-Friendly (#236)
### 🕓 Changelog This PR refactors the `ERC4626` contract to make it module-friendly and ready for the breaking `0.4.0` release. Please note that due to an open issue (see vyperlang/vyper#3954) on how to handle public getters of interface types in conjunction with `implements`, we fix this issue by storing the interface object as an `immutable` variable called `_ASSET` and assigning `asset` a `public` `immutable` `address` type, which gets assigned at contract creation time via the `.address` member of `_ASSET`: ```vy asset: public(immutable(address)) _ASSET: immutable(IERC20) @Deploy @payable def __init__(..., asset_: IERC20, ...): _ASSET = asset_ asset = _ASSET.address .... ``` --------- Signed-off-by: Pascal Marco Caversaccio <[email protected]>
- Loading branch information