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

fix premint uid bug #376

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tame-chairs-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": patch
---

Fixed setting uid when doing a premint v1
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ library DelegatedTokenCreation {
) private view returns (DelegatedTokenSetup memory params, bytes[] memory tokenSetupActions) {
validatePremint(premintConfig.tokenConfig.mintStart, premintConfig.deleted);

params.uid = premintConfig.uid;

tokenSetupActions = PremintTokenSetup.makeSetupNewTokenCalls(nextTokenId, premintConfig.tokenConfig);

params.tokenURI = premintConfig.tokenConfig.tokenURI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ contract ZoraCreator1155PreminterTest is Test {
IZoraCreator1155 created1155Contract = IZoraCreator1155(contractAddress);
// get the created contract, and make sure that tokens have been minted to the address
assertEq(created1155Contract.balanceOf(premintExecutor, tokenId), quantityToMint);
assertEq(ZoraCreator1155Impl(address(created1155Contract)).delegatedTokenId(premintConfig.uid), tokenId);
}

function test_successfullyMintsTokens() external {
Expand Down
Loading