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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENS Libraries #261

Closed
guidanoli opened this issue Apr 4, 2024 · 0 comments 路 Fixed by #273
Closed

ENS Libraries #261

guidanoli opened this issue Apr 4, 2024 · 0 comments 路 Fixed by #273
Assignees
Labels
A-contracts Area: contracts T-feature Type: feature
Milestone

Comments

@guidanoli
Copy link
Collaborator

guidanoli commented Apr 4, 2024

馃摎 Context

Following the context of #260, users of applications that authenticate through their ENS names might want to withdraw assets from the execution layer to the base layer. To do so, there has to be some ENS name resolution logic running at output execution time.

鉁旓笍 Solution

Through DELEGATECALL vouchers (#258), we can create libraries that perform very specific tasks in the context of the application contract. In our case, we'd like to withdraw assets to addresses identified by their ENS names. The supported assets are:

  • Ether
  • ERC-20 tokens
  • ERC-721 tokens
  • ERC-1155 tokens

For each of these assets, there will be an associated library that takes the ENS name of the recipient and transfer function arguments (except the recipient address). The library will then resolve the ENS name to an Ethereum address, and perform the transfer safely (*).

(*) In the particular case of ERC-20 tokens, it will check whether transfer returns true.

They will be called:

  • LibEtherForENS
  • LibERC20ForENS
  • LibERC721ForENS
  • LibERC1155ForENS
@guidanoli guidanoli added T-feature Type: feature A-contracts Area: contracts labels Apr 4, 2024
@guidanoli guidanoli added this to the 2.0.0 milestone Apr 18, 2024
@ZzzzHui ZzzzHui self-assigned this Apr 22, 2024
@ZzzzHui ZzzzHui linked a pull request Apr 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contracts Area: contracts T-feature Type: feature
Projects
Status: 馃殌 Done
Development

Successfully merging a pull request may close this issue.

2 participants