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

Adding burn capabilities to subscription NFTs #460

Merged
merged 12 commits into from
Mar 30, 2023
Merged

Conversation

aaitor
Copy link
Member

@aaitor aaitor commented Mar 29, 2023

Description

The motivation of this change is to enable burn capabilities on the subscription NFT tokens. It will allow them to work a a subscription with credit (using their balance) where tokens are consumed after usage.

Is this PR related with an open issue?

Related to Issue #

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Follows the code style of this project.
  • Tests Cover Changes
  • Documentation

Funny gif

Put a link of a funny gif inside the parenthesis-->

@aaitor aaitor requested review from a team as code owners March 29, 2023 15:17

uint256 _pendingToBurn = amount;
for (uint index = 0; index < _tokens[_key].length; index++) {
if (_pendingToBurn <= _tokens[_key][index].amountMinted) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There probably should be some kind of upper limit for how many mints per key there can be. Then when they are burned or outdated, the storage slots can be reused...

@aaitor aaitor enabled auto-merge March 30, 2023 13:25
@aaitor aaitor disabled auto-merge March 30, 2023 13:25
@aaitor aaitor merged commit 95a52e1 into main Mar 30, 2023
2 checks passed
@aaitor aaitor deleted the feature/nft_with_credits branch March 30, 2023 13:26
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.

None yet

2 participants