Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erc4626 extension #465

Draft
wants to merge 136 commits into
base: main
Choose a base branch
from

Conversation

Ifechukwudaniel
Copy link
Contributor

@Ifechukwudaniel Ifechukwudaniel commented Dec 19, 2024

Resolves #356

PR Checklist

  • Tests
  • Documentation
  • Changelog

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for contracts-stylus canceled.

Name Link
🔨 Latest commit fc553f2
🔍 Latest deploy log https://app.netlify.com/sites/contracts-stylus/deploys/6793d7af9fb09800083509ae

@Ifechukwudaniel
Copy link
Contributor Author

I just stared this

@0xNeshi
Copy link
Collaborator

0xNeshi commented Dec 19, 2024

I'll convert this to a draft, so that the team does not invest time reviewing a WIP

@0xNeshi 0xNeshi marked this pull request as draft December 19, 2024 07:38
@0xNeshi 0xNeshi self-requested a review December 19, 2024 09:26
@Ifechukwudaniel
Copy link
Contributor Author

@0xNeshi
The Solidity implementation uses safe transfer

SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);

In the Solidity implementation, SafeERC20 is a utility library. However, in the Stylus implementation, SafeTransfer is a contract. What do you think

@0xNeshi
Copy link
Collaborator

0xNeshi commented Dec 19, 2024

@0xNeshi The Solidity implementation uses safe transfer

SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);

In the Solidity implementation, SafeERC20 is a utility library. However, in the Stylus implementation, SafeTransfer is a contract. What do you think

See how VestingWallet handles this

@Ifechukwudaniel
Copy link
Contributor Author

@bidzyyys for us to implement something like
ERC4626

 function decimals() public view virtual override(IERC20Metadata, ERC20) returns (uint8) {
        return _underlyingDecimals + _decimalsOffset();
    }

Erc4626 storage values should be public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: ERC4626 extension
3 participants