Skip to content

Commit

Permalink
Rename royaltyRecipient to funds recipient on premint v2 signature, t…
Browse files Browse the repository at this point in the history
…o better imply what it means
  • Loading branch information
oveddan committed Oct 23, 2023
1 parent dff91cb commit acd8c1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct TokenCreationConfigV2 {
uint64 mintDuration;
// RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.
uint32 royaltyBPS;
// RoyaltyRecipient for created tokens. The address that will receive the royalty payments.
address royaltyRecipient;
// creator rewards recipient for created tokens. The address that will receive the creator rewards and royalty payments.
address creatorRewardsAndRoyaltyRecipient;
// Fixed price minter address
address fixedPriceMinter;
// create referral
Expand Down Expand Up @@ -196,7 +196,7 @@ library ZoraCreator1155Attribution {

bytes32 constant TOKEN_DOMAIN_V2 =
keccak256(
"TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyBPS,address royaltyRecipient,address fixedPriceMinter,address createReferral)"
"TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyBPS,address creatorRewardsAndRoyaltyRecipient,address fixedPriceMinter,address createReferral)"
);

function _hashToken(TokenCreationConfigV2 memory tokenConfig) private pure returns (bytes32) {
Expand All @@ -211,7 +211,7 @@ library ZoraCreator1155Attribution {
tokenConfig.mintStart,
tokenConfig.mintDuration,
tokenConfig.royaltyBPS,
tokenConfig.royaltyRecipient,
tokenConfig.creatorRewardsAndRoyaltyRecipient,
tokenConfig.fixedPriceMinter,
tokenConfig.createReferral
)
Expand Down Expand Up @@ -266,7 +266,7 @@ library PremintTokenSetup {
maxTokensPerAddress: tokenConfig.maxTokensPerAddress,
mintDuration: tokenConfig.mintDuration,
royaltyBPS: tokenConfig.royaltyBPS,
royaltyRecipient: tokenConfig.royaltyRecipient
creatorRewardsAndRoyaltyRecipient: tokenConfig.creatorRewardsAndRoyaltyRecipient
});
}

Expand All @@ -279,7 +279,7 @@ library PremintTokenSetup {
maxTokensPerAddress: tokenConfig.maxTokensPerAddress,
mintDuration: tokenConfig.mintDuration,
royaltyBPS: tokenConfig.royaltyBPS,
royaltyRecipient: tokenConfig.royaltyRecipient
creatorRewardsAndRoyaltyRecipient: tokenConfig.royaltyRecipient
});
}

Expand All @@ -290,7 +290,7 @@ library PremintTokenSetup {
uint64 maxTokensPerAddress,
uint64 mintDuration,
uint32 royaltyBPS,
address royaltyRecipient
address creatorRewardsAndRoyaltyRecipient
) private view returns (bytes[] memory calls) {
calls = new bytes[](3);

Expand All @@ -317,7 +317,7 @@ library PremintTokenSetup {
calls[2] = abi.encodeWithSelector(
IZoraCreator1155.updateRoyaltiesForToken.selector,
newTokenId,
ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: royaltyRecipient, royaltyMintSchedule: 0})
ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: creatorRewardsAndRoyaltyRecipient, royaltyMintSchedule: 0})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ library Zora1155PremintFixtures {
mintStart: 0,
mintDuration: 0,
fixedPriceMinter: address(fixedPriceMinter),
royaltyRecipient: royaltyRecipient,
creatorRewardsAndRoyaltyRecipient: royaltyRecipient,
royaltyBPS: 0,
createReferral: address(0)
});
Expand All @@ -46,7 +46,7 @@ library Zora1155PremintFixtures {
mintStart: 0,
mintDuration: 0,
fixedPriceMinter: address(fixedPriceMinter),
royaltyRecipient: royaltyRecipient,
creatorRewardsAndRoyaltyRecipient: royaltyRecipient,
royaltyBPS: 10,
createReferral: createReferral
});
Expand Down
2 changes: 1 addition & 1 deletion packages/1155-contracts/test/nft/ZoraCreator1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ contract ZoraCreator1155Test is Test {
mintStart: 0,
// The duration of the mint, starting from the first mint of this token. 0 for infinite
mintDuration: type(uint64).max - 1,
royaltyRecipient: admin,
creatorRewardsAndRoyaltyRecipient: admin,
royaltyBPS: 0,
// Fixed price minter address
fixedPriceMinter: address(fixedPriceMinter),
Expand Down

0 comments on commit acd8c1e

Please sign in to comment.