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

Added platform referral field, which is not currently supported but is in the sig #336

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ struct TokenCreationConfigV2 {
address fixedPriceMinter;
// create referral
address createReferral;
// platform referral
address platformReferral;
}

library ZoraCreator1155Attribution {
Expand Down Expand Up @@ -201,7 +203,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 payoutRecipient,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,address platformReferral)"
);

function _hashToken(TokenCreationConfigV2 memory tokenConfig) private pure returns (bytes32) {
Expand All @@ -218,7 +220,8 @@ library ZoraCreator1155Attribution {
tokenConfig.royaltyBPS,
tokenConfig.payoutRecipient,
tokenConfig.fixedPriceMinter,
tokenConfig.createReferral
tokenConfig.createReferral,
tokenConfig.platformReferral
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ library Zora1155PremintFixtures {
fixedPriceMinter: address(fixedPriceMinter),
payoutRecipient: royaltyRecipient,
royaltyBPS: 0,
createReferral: address(0)
createReferral: address(0),
platformReferral: address(0)
});
}

Expand All @@ -48,7 +49,8 @@ library Zora1155PremintFixtures {
fixedPriceMinter: address(fixedPriceMinter),
payoutRecipient: royaltyRecipient,
royaltyBPS: 10,
createReferral: createReferral
createReferral: createReferral,
platformReferral: address(0)
});
}

Expand Down
4 changes: 3 additions & 1 deletion packages/1155-contracts/test/nft/ZoraCreator1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,9 @@ contract ZoraCreator1155Test is Test {
// Fixed price minter address
fixedPriceMinter: address(fixedPriceMinter),
// Default create referral
createReferral: address(0)
createReferral: address(0),
// Default platform referral
platformReferral: address(0)
}),
// Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.
// only one signature per token id, scoped to the contract hash can be executed.
Expand Down