Skip to content

Commit

Permalink
extracted v1 and v2 into interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Oct 24, 2023
1 parent 763ff69 commit a112ddf
Showing 1 changed file with 35 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,41 @@ interface ILegacyZoraCreator1155PremintExecutor {
) external payable returns (uint256 newTokenId);
}

interface IZoraCreator1155PremintExecutor {
interface IZoraCreator1155PremintExecutorV1 {
function premintV1(
ContractCreationConfig calldata contractConfig,
PremintConfig calldata premintConfig,
bytes calldata signature,
uint256 quantityToMint,
IZoraCreator1155PremintExecutor.MintArguments calldata mintArguments
) external payable returns (IZoraCreator1155PremintExecutor.PremintResult memory);

function isValidSignatureV1(
address originalContractAdmin,
address contractAddress,
PremintConfig calldata premintConfig,
bytes calldata signature
) external view returns (bool isValid, address recoveredSigner);
}

interface IZoraCreator1155PremintExecutorV2 {
function premintV2(
ContractCreationConfig calldata contractConfig,
PremintConfigV2 calldata premintConfig,
bytes calldata signature,
uint256 quantityToMint,
IZoraCreator1155PremintExecutor.MintArguments calldata mintArguments
) external payable returns (IZoraCreator1155PremintExecutor.PremintResult memory);

function isValidSignatureV2(
address originalContractAdmin,
address contractAddress,
PremintConfigV2 calldata premintConfig,
bytes calldata signature
) external view returns (bool isValid, address recoveredSigner);
}

interface IZoraCreator1155PremintExecutor is IZoraCreator1155PremintExecutorV1, IZoraCreator1155PremintExecutorV2 {
struct MintArguments {
address mintRecipient;
string mintComment;
Expand All @@ -53,12 +87,4 @@ interface IZoraCreator1155PremintExecutor {
function zora1155Factory() external view returns (IZoraCreator1155Factory);

function getContractAddress(ContractCreationConfig calldata contractConfig) external view returns (address);

function premintV2(
ContractCreationConfig calldata contractConfig,
PremintConfigV2 calldata premintConfig,
bytes calldata signature,
uint256 quantityToMint,
MintArguments calldata mintArguments
) external payable returns (PremintResult memory);
}

0 comments on commit a112ddf

Please sign in to comment.