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

Create referral - premint executor acccepts both v1 and v2 signatures #273

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

oveddan
Copy link
Collaborator

@oveddan oveddan commented Oct 17, 2023

Updated premint executor to take both v1 and v2 of premint signatures, and call the pass it to the erc1155 to execute premint.
Erc1155 now takes both v1 and v2 of premint and signatures, and passes them to an external library to decode the signatures and setup actions from the premints

@oveddan
Copy link
Collaborator Author

oveddan commented Oct 17, 2023

@oveddan oveddan force-pushed the fix-create-referral-sig branch from 59db8c0 to 1f16b4b Compare October 17, 2023 22:03
@oveddan
Copy link
Collaborator Author

oveddan commented Oct 17, 2023

todo:

  • fork tests that show upgrading a contract to use new signatures, and existing premint signatures not working on the upgraded contract
  • fork tests that show creating premint with v1 signature, upgrading premint executor, and executing v1 premint, both on existing contract created before the upgrade and new contract after the upgrade
  • js-sdk updates, with examples
  • require signature versions to be compatible in contracts (premint executor validation)
  • example js sdk code that shows how to "upgrade" a signature to v2
  • to allow premints to be executed against contracts not created via premint, add premint functions that take in just a contract address instead of contract creation configs

import {ZoraCreator1155PremintExecutorImplLib } from './ZoraCreator1155PremintExecutorImplLib.sol';
import {ZoraCreator1155Attribution, ContractCreationConfig, PremintConfig, PremintConfigV2, TokenCreationConfig, TokenCreationConfigV2} from "./ZoraCreator1155Attribution.sol";

interface IZoraCreator1155PremintV1Signatures {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add natspec description

uint256 quantityMinted
);

function premint(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add natspec description

tokenContract = IZoraCreator1155(newContractAddresss);
}

function isValidSignature(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add overload that lets you pass in contract creation config

@oveddan oveddan force-pushed the premint_create_referral branch from 5ca081e to 414ea11 Compare October 17, 2023 23:58
@oveddan oveddan force-pushed the fix-create-referral-sig branch from 25cbf64 to 5b58361 Compare October 17, 2023 23:58
@oveddan oveddan force-pushed the premint_create_referral branch from 414ea11 to 584f563 Compare October 18, 2023 00:06
@oveddan oveddan force-pushed the fix-create-referral-sig branch 3 times, most recently from fb9ebc7 to 66d7bd1 Compare October 18, 2023 15:58
@oveddan oveddan force-pushed the premint_create_referral branch from 584f563 to 6abc607 Compare October 18, 2023 16:39
@oveddan oveddan force-pushed the fix-create-referral-sig branch from 66d7bd1 to 003a91b Compare October 18, 2023 16:39
@oveddan oveddan force-pushed the premint_create_referral branch from 6abc607 to 3145165 Compare October 18, 2023 19:38
@oveddan oveddan force-pushed the fix-create-referral-sig branch from 003a91b to 2288400 Compare October 18, 2023 19:38
@oveddan oveddan mentioned this pull request Oct 18, 2023
@oveddan oveddan force-pushed the premint_create_referral branch from 3145165 to 640736f Compare October 19, 2023 20:18
@oveddan oveddan force-pushed the fix-create-referral-sig branch from 2288400 to 6d90ee0 Compare October 19, 2023 20:18
@iainnash iainnash deleted the fix-create-referral-sig branch January 11, 2024 15:37
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.

1 participant