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

Premint V2 - Creator Attribution #128

Merged

Conversation

oveddan
Copy link
Collaborator

@oveddan oveddan commented Aug 3, 2023

Premint V2 - follow creator attribution standard and move signature validation logic into erc1155 contract.

New features/capabilities:

  • Follows creator attribution standard; signature validation has been moved from the premint contract to the erc1155 contract, and the erc1155 contract now emits the CreatorAttribution event which can be used to verify that a creator was the one that signaled intent to create the token
  • Multiple creators can sign a premint on a contract, as long as they have mint new token permissions on it.
  • Creators can sign a signature against a 1155 contract before it's been created, since the contract's address is known ahead of time, deterministically.
  • Signature is now created using the erc1155 contract's address as the verifying contract address (before it was the premint contract's address); this can be known before the contract is created, since it is determinstic.

Underlying changes:

  • Signature validation logic now happens in erc1155 contract
  • Created library with signature validation logic, which is consumed externally from the erc1155 to reduce contract size.
  • New Erc1155 needs to be deployed for this to work.
  • New js jsdk is updated in a separate pr - and updated way to create signatures is defined there.
  • Signature changes:
    • Full contract creation config is no longer included in the signature; since we can derive the contract address from the contract creation parameters (using the deterministic address) we can treat the erc1155 contract address as an already hashed derivation of that; and given that the signature is now created against that address, we don't need to include that superluisly in the contract.
    • deterministic erc1155 address is now the verifying contract address
    • we need to include the fixed priced minter address in the premint config

@oveddan
Copy link
Collaborator Author

oveddan commented Aug 3, 2023

@oveddan oveddan mentioned this pull request Aug 3, 2023
@oveddan oveddan changed the title wip on move premint to creator attribution style creator attribution Aug 9, 2023
_requireAdminOrRole(recoveredSigner, CONTRACT_BASE_ID, PERMISSION_BIT_MINTER);

// temporarily grant msg sender admin permission to create new tokens
_addPermission(CONTRACT_BASE_ID, msg.sender, PERMISSION_BIT_MINTER);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't you just call _setupNewToken directly that skips the admin check passing in the user as the signer?

@oveddan oveddan force-pushed the creator-attribution branch 2 times, most recently from 6998c66 to ef23a6a Compare August 11, 2023 21:49
@oveddan oveddan mentioned this pull request Aug 11, 2023
@oveddan oveddan changed the base branch from gasless to gasless_deployment August 11, 2023 22:52
@oveddan oveddan mentioned this pull request Aug 11, 2023
@oveddan oveddan mentioned this pull request Aug 11, 2023
@oveddan oveddan changed the title Premint V2 with Creator Attribution Premint V2 - Creator Attribution Aug 18, 2023
@@ -722,4 +723,46 @@ contract ZoraCreator1155Impl is
revert();
}
}

/* start eip712 functionality */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

move these into their own contracts to be consistent

@oveddan oveddan merged commit 2f0c2d7 into creator-attribution-reduce-optimizer-runs Aug 22, 2023
2 of 6 checks passed
@oveddan oveddan deleted the creator-attribution branch August 22, 2023 17:36
oveddan added a commit that referenced this pull request Aug 22, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
@kulkarohan kulkarohan mentioned this pull request Aug 29, 2023
oveddan added a commit that referenced this pull request Sep 11, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 11, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 11, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 12, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 19, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 20, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 21, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 21, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
oveddan added a commit that referenced this pull request Sep 21, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
iainnash pushed a commit that referenced this pull request Sep 26, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
iainnash pushed a commit that referenced this pull request Sep 27, 2023
…#144)

* reduce optimizer runs to get contracts to build

* Premint V2 - Creator Attribution (#128)

* wip on move premint to creator attribution style

* updated readme to reflect new contracts

* Revert "undo changes to js sdk"

This reverts commit 4deabf5.

* better comments

* Added methods to get status of creator attribution, and validate signatures, useful for the backend

* better comments

* fixed back fork test

* slightly more comments
iainnash added a commit that referenced this pull request Mar 11, 2024
* feat: Boosted Minter factory and implementation

* remove rpc endpoints (#203)

* feat: Deploy Scripts (#128)

* feat: Withdraw Gas for frame minter (#132)

* multichain deploy scripts (#143)

* feat: upgradeable factory (#144)

feat: upgradeable factory

[fix] fees

multichain deploy

* update fee and upgrade (#145)

* fix: upgrade script (#147)

* Update upgrades to standard pattern (#154)

Update deployment scripts to use standard multichain patterns.

---------

Co-authored-by: Dan Oved <[email protected]>
Co-authored-by: Iain Nash <[email protected]>
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.

2 participants