Skip to content

Commit

Permalink
Merge pull request #283 from ourzora/creator-reward-recipient-better-…
Browse files Browse the repository at this point in the history
…docs

creator rewards per token, better changeset/natspec
  • Loading branch information
kulkarohan authored Oct 24, 2023
2 parents 3ade5a5 + 47cc324 commit c987b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .changeset/weak-planets-love.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@zoralabs/zora-1155-contracts": minor
---

Add support for multiple creator reward recipients on a shared contract
Creator reward recipient can now be defined on a token by token basis. This allows for multiple creators to collaborate on a contract and each to receive rewards for the token they created. The royaltyRecipient storage field is now used to determine the creator reward recipient for each token. If that's not set for a token, it falls back to use the contract wide fundsRecipient.
8 changes: 4 additions & 4 deletions packages/1155-contracts/src/nft/ZoraCreator1155Impl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,11 @@ contract ZoraCreator1155Impl is
return TOTAL_REWARD_PER_MINT;
}

/// @notice Get the creator reward recipient address
/// @notice Get the creator reward recipient address for a specific token.
/// @param tokenId The token id to get the creator reward recipient for
/// @dev The creator is not enforced to set a funds recipient address for a specific token or contract-wide,
/// so in the case of both the reward recipient is set to the creator's contract,
/// which can be withdrawn by the creator via the `withdrawRewards` function.
/// @dev Returns the royalty recipient address for the token if set; otherwise uses the fundsRecipient.
/// If both are not set, this contract will be set as the recipient, and an account with
/// `PERMISSION_BIT_FUNDS_MANAGER` will be able to withdraw via the `withdrawRewards` function.
function getCreatorRewardRecipient(uint256 tokenId) public view returns (address) {
address royaltyRecipient = getRoyalties(tokenId).royaltyRecipient;

Expand Down

0 comments on commit c987b66

Please sign in to comment.