Skip to content

Commit

Permalink
fix premint uid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Nov 21, 2023
1 parent 453c869 commit 22142e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
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

0 comments on commit 22142e0

Please sign in to comment.