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

Referral mints #8

Open
vikiival opened this issue Aug 22, 2024 · 0 comments
Open

Referral mints #8

vikiival opened this issue Aug 22, 2024 · 0 comments

Comments

@vikiival
Copy link
Member

vikiival commented Aug 22, 2024

Context

We would like a way for people to obtain a small reward for referring someone to mint.

Task

  1. create a new function called function mintWithReferral(address to, uint256 quantity, address referrer) public payable (basically functionaliy of safeBachMint)
  2. with the payment splitter enabled - the referral amount will be deducted from the owner's part (therefore _receiver's part is untouched)
  3. referral amount is equal to royalty price - that is calculated with royaltyInfo
  4. if referrer is equal to _receiver || address(0) referral bounty cannot be applied (do not throw error just code should ignore that)
  5. if royaltyInfo also returns 0 the referral bounty cannot be applied.
  6. Extend tests to ensure the stuff works

Links

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

No branches or pull requests

1 participant