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

refactor: deprecate supply royalty #267

Merged
merged 6 commits into from
Oct 18, 2023
Merged

refactor: deprecate supply royalty #267

merged 6 commits into from
Oct 18, 2023

Conversation

kulkarohan
Copy link
Contributor

@kulkarohan kulkarohan commented Oct 12, 2023

before margin: 0.117 kb
available margin: 0.839 kb
available margin: 0.576 kb

_requireCanMintQuantity(id, amount + supplyRoyaltyMints);

super._mint(to, id, amount, data);
tokens[id].totalMinted += amount + supplyRoyaltyMints;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we still want to track totalMinted ? are we using that anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah good catch - @iainnash wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i just checked our frontend repo and they're using it - i'll add that back

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep we want to track this still.

@@ -388,7 +388,8 @@ contract ZoraCreator1155Impl is
_requireAdminOrRole(msg.sender, tokenIds[i], PERMISSION_BIT_MINTER);
}
}
_mintBatch(recipient, tokenIds, quantities, data);

super._mintBatch(recipient, tokenIds, quantities, data);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice!

@@ -553,63 +554,8 @@ contract ZoraCreator1155Impl is
return super.supportsInterface(interfaceId) || interfaceId == type(IZoraCreator1155).interfaceId || ERC1155Upgradeable.supportsInterface(interfaceId);
}

function _handleSupplyRoyalty(uint256 tokenId, uint256 mintAmount, bytes memory data) internal returns (uint256 totalRoyaltyMints) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we're ok removing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup got the approval!

Copy link
Collaborator

@iainnash iainnash left a comment

Choose a reason for hiding this comment

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

looks good other than dan's catch for totalMinted

@kulkarohan
Copy link
Contributor Author

sooo i forgot about the _requireCanMintQuantity check also

@kulkarohan
Copy link
Contributor Author

adding back the overrides 😭

@kulkarohan kulkarohan marked this pull request as ready for review October 13, 2023 19:12
/// @param to to mint to
/// @param id token id to mint
/// @param amount of tokens to mint
/// @param data as specified by 1155 standard
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual override {
uint256 supplyRoyaltyMints = _handleSupplyRoyalty(id, amount, data);
_requireCanMintQuantity(id, amount + supplyRoyaltyMints);
_requireCanMintQuantity(id, amount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need this check?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes for limited supply nfts.

@iainnash
Copy link
Collaborator

iainnash commented Oct 13, 2023 via email

Copy link
Collaborator

@oveddan oveddan left a comment

Choose a reason for hiding this comment

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

looks great! just please add a changeset (with npx changeset from the root of the project) and a minor change then lgtm

@oveddan
Copy link
Collaborator

oveddan commented Oct 18, 2023

Merge activity

  • Oct 18, 1:40 PM: @oveddan started a stack merge that includes this pull request via Graphite.
  • Oct 18, 1:40 PM: @oveddan merged this pull request with Graphite.

@oveddan oveddan merged commit 9495c34 into main Oct 18, 2023
9 checks passed
@oveddan oveddan mentioned this pull request Oct 18, 2023
iainnash pushed a commit that referenced this pull request Jan 11, 2024
before margin: 0.117 kb
~available margin: 0.839 kb~
available margin: 0.576 kb
@iainnash iainnash deleted the deprecate_supply_royalty branch January 11, 2024 15:37
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.

3 participants