From 96f64a90a20475dcc35527126bb2ce97a184e26f Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Mon, 6 Nov 2023 14:47:58 -0800 Subject: [PATCH] Rename payout address to payout recipient (#329) --- .changeset/violet-starfishes-visit.md | 4 ++-- .../delegation/ZoraCreator1155Attribution.sol | 19 +++++++++++-------- .../test/fixtures/Zora1155PremintFixtures.sol | 4 ++-- .../test/nft/ZoraCreator1155.t.sol | 2 +- packages/premint-sdk/src/preminter.test.ts | 2 +- packages/premint-sdk/src/preminter.ts | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.changeset/violet-starfishes-visit.md b/.changeset/violet-starfishes-visit.md index c9a3dc03a..9861cd323 100644 --- a/.changeset/violet-starfishes-visit.md +++ b/.changeset/violet-starfishes-visit.md @@ -39,8 +39,8 @@ struct TokenCreationConfigV2 { uint64 mintDuration; // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales. uint32 royaltyBPS; - // The address that will receive creatorRewards, secondary royalties, and paid mint funds. - address payoutAddress; + // The address that will receive creatorRewards, secondary royalties, and paid mint funds. This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract, which is the address that receives creator rewards and secondary royalties for the token, and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token, which is the address that receives paid mint funds for the token. + address payoutRecipient; // Fixed price minter address address fixedPriceMinter; // create referral diff --git a/packages/1155-contracts/src/delegation/ZoraCreator1155Attribution.sol b/packages/1155-contracts/src/delegation/ZoraCreator1155Attribution.sol index 3946a5993..37551d272 100644 --- a/packages/1155-contracts/src/delegation/ZoraCreator1155Attribution.sol +++ b/packages/1155-contracts/src/delegation/ZoraCreator1155Attribution.sol @@ -79,8 +79,11 @@ struct TokenCreationConfigV2 { uint64 mintDuration; // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales. uint32 royaltyBPS; - // The address that will receive creatorRewards, secondary royalties, and paid mint funds. - address payoutAddress; + // This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract, + // which is the address that receives creator rewards and secondary royalties for the token, + // and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token, + // which is the address that receives paid mint funds for the token. + address payoutRecipient; // Fixed price minter address address fixedPriceMinter; // create referral @@ -195,7 +198,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 payoutAddress,address fixedPriceMinter,address createReferral)" + "TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyBPS,address payoutRecipient,address fixedPriceMinter,address createReferral)" ); function _hashToken(TokenCreationConfigV2 memory tokenConfig) private pure returns (bytes32) { @@ -210,7 +213,7 @@ library ZoraCreator1155Attribution { tokenConfig.mintStart, tokenConfig.mintDuration, tokenConfig.royaltyBPS, - tokenConfig.payoutAddress, + tokenConfig.payoutRecipient, tokenConfig.fixedPriceMinter, tokenConfig.createReferral ) @@ -266,7 +269,7 @@ library PremintTokenSetup { maxTokensPerAddress: tokenConfig.maxTokensPerAddress, mintDuration: tokenConfig.mintDuration, royaltyBPS: tokenConfig.royaltyBPS, - payoutAddress: tokenConfig.payoutAddress + payoutRecipient: tokenConfig.payoutRecipient }); } @@ -280,7 +283,7 @@ library PremintTokenSetup { maxTokensPerAddress: tokenConfig.maxTokensPerAddress, mintDuration: tokenConfig.mintDuration, royaltyBPS: tokenConfig.royaltyBPS, - payoutAddress: tokenConfig.royaltyRecipient + payoutRecipient: tokenConfig.royaltyRecipient }); } @@ -291,7 +294,7 @@ library PremintTokenSetup { uint64 maxTokensPerAddress, uint64 mintDuration, uint32 royaltyBPS, - address payoutAddress + address payoutRecipient ) private view returns (bytes[] memory calls) { calls = new bytes[](3); @@ -318,7 +321,7 @@ library PremintTokenSetup { calls[2] = abi.encodeWithSelector( IZoraCreator1155.updateRoyaltiesForToken.selector, newTokenId, - ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: payoutAddress, royaltyMintSchedule: 0}) + ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: payoutRecipient, royaltyMintSchedule: 0}) ); } diff --git a/packages/1155-contracts/test/fixtures/Zora1155PremintFixtures.sol b/packages/1155-contracts/test/fixtures/Zora1155PremintFixtures.sol index 7847426f0..99acb2d6c 100644 --- a/packages/1155-contracts/test/fixtures/Zora1155PremintFixtures.sol +++ b/packages/1155-contracts/test/fixtures/Zora1155PremintFixtures.sol @@ -26,7 +26,7 @@ library Zora1155PremintFixtures { mintStart: 0, mintDuration: 0, fixedPriceMinter: address(fixedPriceMinter), - payoutAddress: royaltyRecipient, + payoutRecipient: royaltyRecipient, royaltyBPS: 0, createReferral: address(0) }); @@ -46,7 +46,7 @@ library Zora1155PremintFixtures { mintStart: 0, mintDuration: 0, fixedPriceMinter: address(fixedPriceMinter), - payoutAddress: royaltyRecipient, + payoutRecipient: royaltyRecipient, royaltyBPS: 10, createReferral: createReferral }); diff --git a/packages/1155-contracts/test/nft/ZoraCreator1155.t.sol b/packages/1155-contracts/test/nft/ZoraCreator1155.t.sol index e07443f82..55ba19ba2 100644 --- a/packages/1155-contracts/test/nft/ZoraCreator1155.t.sol +++ b/packages/1155-contracts/test/nft/ZoraCreator1155.t.sol @@ -1063,7 +1063,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, - payoutAddress: admin, + payoutRecipient: admin, royaltyBPS: 0, // Fixed price minter address fixedPriceMinter: address(fixedPriceMinter), diff --git a/packages/premint-sdk/src/preminter.test.ts b/packages/premint-sdk/src/preminter.test.ts index f7d137d59..d33a70222 100644 --- a/packages/premint-sdk/src/preminter.test.ts +++ b/packages/premint-sdk/src/preminter.test.ts @@ -95,7 +95,7 @@ const defaultTokenConfig = ( mintDuration: 100n, fixedPriceMinter: fixedPriceMinterAddress, royaltyBPS: 10, - royaltyRecipient: creatorAccount, + payoutRecipient: creatorAccount, createReferral: createReferralAccount, }); diff --git a/packages/premint-sdk/src/preminter.ts b/packages/premint-sdk/src/preminter.ts index ab493e353..4808d84a0 100644 --- a/packages/premint-sdk/src/preminter.ts +++ b/packages/premint-sdk/src/preminter.ts @@ -42,7 +42,7 @@ const premintV2Types = { { name: "mintStart", type: "uint64" }, { name: "mintDuration", type: "uint64" }, { name: "royaltyBPS", type: "uint32" }, - { name: "royaltyRecipient", type: "address" }, + { name: "payoutRecipient", type: "address" }, { name: "fixedPriceMinter", type: "address" }, { name: "createReferral", type: "address" }, ],