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

feat: adds royalty support for IERC2981 lookup addresses #35

Merged
merged 2 commits into from
Sep 12, 2022

Conversation

wei3erHase
Copy link
Contributor

This PR adds a separate Router that issues royalties querying:

  • it supports all LSSVMRouter functionalities
  • it queries lookupAddress from the Manifold.xyz Royalty Registry
  • it supports ERC2981 implementations of royalty information querying
  • it doesn't require any redeployment on Sudoswap pairs
  • users may choose to use this router to swap nft's issuing the correspondent royalties to the recipient
  • users may need to generate ERC20 and ERC721 approvals for this router
  • royalties ARE NOT calculated per tokenId but rather fallback in the default royalty set
  • collection owners are able to set a particular royalty calculation for this router

* chore: copy LSSVMRouter.sol

* feat: creating router with royalties + integrating tests

* feat: adds robust swaps implementation with royalties

* feat: improves tests with royalty issuance checks

* feat: adds gas optimizations and event emission on royalty issuance

* feat: adds event emission on internal issuances

* feat: gas optimization on issueTokenRoyalties

* feat: rms double substraction

* feat: improved comments

* feat: avoids double transfers when no royalty

Co-authored-by: 0xng <87835144+0xng@users.noreply.github.com>
Co-authored-by: 0xGorilla <0xGorilla@defi.sucks>
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.

2 participants