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

feat: creator reward recipient per token #278

Merged
merged 14 commits into from
Oct 25, 2023

Conversation

kulkarohan
Copy link
Contributor

@kulkarohan kulkarohan commented Oct 18, 2023

will deploy and add changeset once we're good on reviews

Copy link
Collaborator

@iainnash iainnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see 2 new tests – does the 3rd test for contract balance already exist?

Approve, but would be nice to update a few small syntax things.

/// @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.
function getCreatorRewardRecipient(uint256 tokenId) public view returns (address payable) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kulkarohan can we check the front-end and subgraph to make sure there are no calls to this function?

Would it make sense to make this internal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed - no frontend and subgraph usage of this function (yet)

i believe however frontend is planning to pin the creator reward recipient address on each token page, so i think having it public to fetch would make their lives easier, at little cost to us since we need it anyways.

but can confirm w them and if they're not can just make this internal

packages/1155-contracts/src/nft/ZoraCreator1155Impl.sol Outdated Show resolved Hide resolved
packages/1155-contracts/src/nft/ZoraCreator1155Impl.sol Outdated Show resolved Hide resolved
@kulkarohan
Copy link
Contributor Author

removed payable cast and updated tests

Copy link
Collaborator

@oveddan oveddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor suggested improvements

packages/1155-contracts/src/nft/ZoraCreator1155Impl.sol Outdated Show resolved Hide resolved
packages/1155-contracts/test/nft/ZoraCreator1155.t.sol Outdated Show resolved Hide resolved
@oveddan
Copy link
Collaborator

oveddan commented Oct 18, 2023

it's a bit confusing here that we are pulling the funds recipient from the royalty recipient; why not create a specific funds recipient per token, and just have royalty recipient read from that to determine royalty payout address?

@kulkarohan
Copy link
Contributor Author

closing & reopening as prerelease branch

@kulkarohan
Copy link
Contributor Author

jk

@oveddan
Copy link
Collaborator

oveddan commented Oct 25, 2023

Merge activity

  • Oct 25, 4:13 PM: @oveddan started a stack merge that includes this pull request via Graphite.
  • Oct 25, 4:13 PM: @oveddan merged this pull request with Graphite.

@oveddan oveddan merged commit f00bd85 into main Oct 25, 2023
4 checks passed
kulkarohan added a commit that referenced this pull request Oct 25, 2023
will deploy and add changeset once we're good on reviews
iainnash pushed a commit that referenced this pull request Jan 11, 2024
will deploy and add changeset once we're good on reviews
oveddan pushed a commit that referenced this pull request Apr 8, 2024
* feat: erc20 minter

* feat: Premint with ERC-20

* refactor: revert with custom error

* chore: run lint

* refactor: revert invalid premint version

* refactor: emit firstMinter in PremintedV2 event

* refactor: remove previous local variables

* chore: add referral fetch tests

* chore: update header url

* chore: remove .vscode

* refactor: update erc20 slippage error name

* docs: update requestMint natspec

* refactor: rename address minter in EncodedPremintConfig

* refactor: update premint with erc20 slippage error

* chore: run lint

* feat: modifiable reward recipient address & support for deterministic deploy

* refactor: group constants

* docs: update storage vars natspec

* fix: update IERC20Minter natspec for events and errors

* fix: change erc-20 to erc20

* feat: rename zoraRewardAddress to zoraRewardRecipientAddress

* docs: update natspec

* chore: add ERC20 minter

* chore: add ERC20 minter deterministic config

* Update Subgraph With Deployed ERC20 Minter Addresses (#278)

* feat: add erc20Minter deployed addresses to configs

* fix: remove abi changes

* feat: add changeset

---------

Co-authored-by: Rohan Kulkarni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants