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

Rename payout address to payout recipient #329

Merged
merged 1 commit into from
Nov 6, 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
4 changes: 2 additions & 2 deletions .changeset/violet-starfishes-visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -210,7 +213,7 @@ library ZoraCreator1155Attribution {
tokenConfig.mintStart,
tokenConfig.mintDuration,
tokenConfig.royaltyBPS,
tokenConfig.payoutAddress,
tokenConfig.payoutRecipient,
tokenConfig.fixedPriceMinter,
tokenConfig.createReferral
)
Expand Down Expand Up @@ -266,7 +269,7 @@ library PremintTokenSetup {
maxTokensPerAddress: tokenConfig.maxTokensPerAddress,
mintDuration: tokenConfig.mintDuration,
royaltyBPS: tokenConfig.royaltyBPS,
payoutAddress: tokenConfig.payoutAddress
payoutRecipient: tokenConfig.payoutRecipient
});
}

Expand All @@ -280,7 +283,7 @@ library PremintTokenSetup {
maxTokensPerAddress: tokenConfig.maxTokensPerAddress,
mintDuration: tokenConfig.mintDuration,
royaltyBPS: tokenConfig.royaltyBPS,
payoutAddress: tokenConfig.royaltyRecipient
payoutRecipient: tokenConfig.royaltyRecipient
});
}

Expand All @@ -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);

Expand All @@ -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})
);
}

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),
payoutAddress: royaltyRecipient,
payoutRecipient: royaltyRecipient,
royaltyBPS: 0,
createReferral: address(0)
});
Expand All @@ -46,7 +46,7 @@ library Zora1155PremintFixtures {
mintStart: 0,
mintDuration: 0,
fixedPriceMinter: address(fixedPriceMinter),
payoutAddress: royaltyRecipient,
payoutRecipient: 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 @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion packages/premint-sdk/src/preminter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const defaultTokenConfig = (
mintDuration: 100n,
fixedPriceMinter: fixedPriceMinterAddress,
royaltyBPS: 10,
royaltyRecipient: creatorAccount,
payoutRecipient: creatorAccount,
createReferral: createReferralAccount,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/premint-sdk/src/preminter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
],
Expand Down
Loading