@artblocks/contracts 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -38
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +201 -0
- package/artifacts/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +144 -14
- package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +2493 -0
- package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +311 -0
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +15 -2
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +15 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV4.sol/MinterDALinV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV4.sol/MinterHolderV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +37 -0
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSEA/MinterSEAV0.sol/MinterSEAV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +20 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +48 -12
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +76 -40
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +15 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +15 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +37 -0
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
- package/artifacts/contracts/generator/AddressChunks.sol/AddressChunks.json +10 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +333 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/ILegacyGenArt721CoreV2_PBAB_Flex.json +47 -0
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol/IBytecodeStorageReader_Base.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +13 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +170 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol/IGenArt721CoreProjectScriptV0.json +59 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol/IGenArt721CoreProjectScriptV1.json +64 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol/IGenArt721CoreTokenHashProviderV0.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol/IGenArt721CoreTokenHashProviderV1.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol/IGenArt721GeneratorV0.json +63 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol/IUniversalBytecodeStorageReader.json +56 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol/ERC721SeaDropStructsErrorsAndEvents.json +43 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol/INonFungibleSeaDropToken.json +715 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol/ISeaDrop.json +1571 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol/ISeaDropTokenContractMetadata.json +345 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol/SeaDropErrorsAndEvents.json +717 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +9 -22
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol/MinPriceLib.json +24 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +664 -0
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +387 -0
- package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +1206 -0
- package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -0
- package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +2 -2
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -0
- package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
- package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
- package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
- package/contracts/BytecodeStorageV2Writer.sol +69 -0
- package/contracts/DependencyRegistryV0.sol +229 -60
- package/contracts/GenArt721CoreV3_Curated.sol +133 -0
- package/contracts/OwnedCreate2FactoryV0.sol +173 -0
- package/contracts/engine/V3/EngineFactoryV0.sol +10 -2
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +139 -70
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +141 -71
- package/contracts/generator/AddressChunks.sol +106 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +1094 -0
- package/contracts/generator/scripty-support/Scripty.sol +5 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +5 -3
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol +20 -0
- package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +5 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +94 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +13 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +3 -1
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol +23 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol +11 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol +9 -0
- package/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol +14 -0
- package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +10 -4
- package/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol +28 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol +58 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol +186 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol +337 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol +152 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol +320 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol +146 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +11 -3
- package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +9 -3
- package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +107 -0
- package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
- package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
- package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
- package/contracts/mock/MockFileStore.sol +22 -0
- package/package.json +20 -18
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// @dev file is sourced from OpenSea's repository: https://github.com/ProjectOpenSea/seadrop/blob/main/src/interfaces/INonFungibleSeaDropToken.sol
|
|
3
|
+
// @dev modified to not lock to specific version, as well as updated imports for this repository
|
|
4
|
+
pragma solidity ^0.8.17;
|
|
5
|
+
|
|
6
|
+
import {ISeaDropTokenContractMetadata} from "./ISeaDropTokenContractMetadata.sol";
|
|
7
|
+
|
|
8
|
+
import {AllowListData, PublicDrop, TokenGatedDropStage, SignedMintValidationParams} from "./SeaDropStructs.sol";
|
|
9
|
+
|
|
10
|
+
interface INonFungibleSeaDropToken is ISeaDropTokenContractMetadata {
|
|
11
|
+
/**
|
|
12
|
+
* @dev Revert with an error if a contract is not an allowed
|
|
13
|
+
* SeaDrop address.
|
|
14
|
+
*/
|
|
15
|
+
error OnlyAllowedSeaDrop();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @dev Emit an event when allowed SeaDrop contracts are updated.
|
|
19
|
+
*/
|
|
20
|
+
event AllowedSeaDropUpdated(address[] allowedSeaDrop);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @notice Update the allowed SeaDrop contracts.
|
|
24
|
+
* Only the owner can use this function.
|
|
25
|
+
*
|
|
26
|
+
* @param allowedSeaDrop The allowed SeaDrop addresses.
|
|
27
|
+
*/
|
|
28
|
+
function updateAllowedSeaDrop(address[] calldata allowedSeaDrop) external;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @notice Mint tokens, restricted to the SeaDrop contract.
|
|
32
|
+
*
|
|
33
|
+
* @dev NOTE: If a token registers itself with multiple SeaDrop
|
|
34
|
+
* contracts, the implementation of this function should guard
|
|
35
|
+
* against reentrancy. If the implementing token uses
|
|
36
|
+
* _safeMint(), or a feeRecipient with a malicious receive() hook
|
|
37
|
+
* is specified, the token or fee recipients may be able to execute
|
|
38
|
+
* another mint in the same transaction via a separate SeaDrop
|
|
39
|
+
* contract.
|
|
40
|
+
* This is dangerous if an implementing token does not correctly
|
|
41
|
+
* update the minterNumMinted and currentTotalSupply values before
|
|
42
|
+
* transferring minted tokens, as SeaDrop references these values
|
|
43
|
+
* to enforce token limits on a per-wallet and per-stage basis.
|
|
44
|
+
*
|
|
45
|
+
* @param minter The address to mint to.
|
|
46
|
+
* @param quantity The number of tokens to mint.
|
|
47
|
+
*/
|
|
48
|
+
function mintSeaDrop(address minter, uint256 quantity) external;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @notice Returns a set of mint stats for the address.
|
|
52
|
+
* This assists SeaDrop in enforcing maxSupply,
|
|
53
|
+
* maxTotalMintableByWallet, and maxTokenSupplyForStage checks.
|
|
54
|
+
*
|
|
55
|
+
* @dev NOTE: Implementing contracts should always update these numbers
|
|
56
|
+
* before transferring any tokens with _safeMint() to mitigate
|
|
57
|
+
* consequences of malicious onERC721Received() hooks.
|
|
58
|
+
*
|
|
59
|
+
* @param minter The minter address.
|
|
60
|
+
*/
|
|
61
|
+
function getMintStats(
|
|
62
|
+
address minter
|
|
63
|
+
)
|
|
64
|
+
external
|
|
65
|
+
view
|
|
66
|
+
returns (
|
|
67
|
+
uint256 minterNumMinted,
|
|
68
|
+
uint256 currentTotalSupply,
|
|
69
|
+
uint256 maxSupply
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @notice Update the public drop data for this nft contract on SeaDrop.
|
|
74
|
+
* Only the owner can use this function.
|
|
75
|
+
*
|
|
76
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
77
|
+
* @param publicDrop The public drop data.
|
|
78
|
+
*/
|
|
79
|
+
function updatePublicDrop(
|
|
80
|
+
address seaDropImpl,
|
|
81
|
+
PublicDrop calldata publicDrop
|
|
82
|
+
) external;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @notice Update the allow list data for this nft contract on SeaDrop.
|
|
86
|
+
* Only the owner can use this function.
|
|
87
|
+
*
|
|
88
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
89
|
+
* @param allowListData The allow list data.
|
|
90
|
+
*/
|
|
91
|
+
function updateAllowList(
|
|
92
|
+
address seaDropImpl,
|
|
93
|
+
AllowListData calldata allowListData
|
|
94
|
+
) external;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @notice Update the token gated drop stage data for this nft contract
|
|
98
|
+
* on SeaDrop.
|
|
99
|
+
* Only the owner can use this function.
|
|
100
|
+
*
|
|
101
|
+
* Note: If two INonFungibleSeaDropToken tokens are doing
|
|
102
|
+
* simultaneous token gated drop promotions for each other,
|
|
103
|
+
* they can be minted by the same actor until
|
|
104
|
+
* `maxTokenSupplyForStage` is reached. Please ensure the
|
|
105
|
+
* `allowedNftToken` is not running an active drop during the
|
|
106
|
+
* `dropStage` time period.
|
|
107
|
+
*
|
|
108
|
+
*
|
|
109
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
110
|
+
* @param allowedNftToken The allowed nft token.
|
|
111
|
+
* @param dropStage The token gated drop stage data.
|
|
112
|
+
*/
|
|
113
|
+
function updateTokenGatedDrop(
|
|
114
|
+
address seaDropImpl,
|
|
115
|
+
address allowedNftToken,
|
|
116
|
+
TokenGatedDropStage calldata dropStage
|
|
117
|
+
) external;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @notice Update the drop URI for this nft contract on SeaDrop.
|
|
121
|
+
* Only the owner can use this function.
|
|
122
|
+
*
|
|
123
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
124
|
+
* @param dropURI The new drop URI.
|
|
125
|
+
*/
|
|
126
|
+
function updateDropURI(
|
|
127
|
+
address seaDropImpl,
|
|
128
|
+
string calldata dropURI
|
|
129
|
+
) external;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @notice Update the creator payout address for this nft contract on
|
|
133
|
+
* SeaDrop.
|
|
134
|
+
* Only the owner can set the creator payout address.
|
|
135
|
+
*
|
|
136
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
137
|
+
* @param payoutAddress The new payout address.
|
|
138
|
+
*/
|
|
139
|
+
function updateCreatorPayoutAddress(
|
|
140
|
+
address seaDropImpl,
|
|
141
|
+
address payoutAddress
|
|
142
|
+
) external;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @notice Update the allowed fee recipient for this nft contract
|
|
146
|
+
* on SeaDrop.
|
|
147
|
+
*
|
|
148
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
149
|
+
* @param feeRecipient The new fee recipient.
|
|
150
|
+
*/
|
|
151
|
+
function updateAllowedFeeRecipient(
|
|
152
|
+
address seaDropImpl,
|
|
153
|
+
address feeRecipient,
|
|
154
|
+
bool allowed
|
|
155
|
+
) external;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @notice Update the server-side signers for this nft contract
|
|
159
|
+
* on SeaDrop.
|
|
160
|
+
* Only the owner can use this function.
|
|
161
|
+
*
|
|
162
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
163
|
+
* @param signer The signer to update.
|
|
164
|
+
* @param signedMintValidationParams Minimum and maximum parameters
|
|
165
|
+
* to enforce for signed mints.
|
|
166
|
+
*/
|
|
167
|
+
function updateSignedMintValidationParams(
|
|
168
|
+
address seaDropImpl,
|
|
169
|
+
address signer,
|
|
170
|
+
SignedMintValidationParams memory signedMintValidationParams
|
|
171
|
+
) external;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @notice Update the allowed payers for this nft contract on SeaDrop.
|
|
175
|
+
* Only the owner can use this function.
|
|
176
|
+
*
|
|
177
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
178
|
+
* @param payer The payer to update.
|
|
179
|
+
* @param allowed Whether the payer is allowed.
|
|
180
|
+
*/
|
|
181
|
+
function updatePayer(
|
|
182
|
+
address seaDropImpl,
|
|
183
|
+
address payer,
|
|
184
|
+
bool allowed
|
|
185
|
+
) external;
|
|
186
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// @dev file is sourced from OpenSea's repository: https://github.com/ProjectOpenSea/seadrop/blob/main/src/interfaces/ISeaDrop.sol
|
|
3
|
+
// @dev modified to not lock to specific version, as well as updated imports for this repository
|
|
4
|
+
pragma solidity ^0.8.17;
|
|
5
|
+
|
|
6
|
+
import {AllowListData, MintParams, PublicDrop, TokenGatedDropStage, TokenGatedMintParams, SignedMintValidationParams} from "./SeaDropStructs.sol";
|
|
7
|
+
|
|
8
|
+
import {SeaDropErrorsAndEvents} from "./SeaDropErrorsAndEvents.sol";
|
|
9
|
+
|
|
10
|
+
interface ISeaDrop is SeaDropErrorsAndEvents {
|
|
11
|
+
/**
|
|
12
|
+
* @notice Mint a public drop.
|
|
13
|
+
*
|
|
14
|
+
* @param nftContract The nft contract to mint.
|
|
15
|
+
* @param feeRecipient The fee recipient.
|
|
16
|
+
* @param minterIfNotPayer The mint recipient if different than the payer.
|
|
17
|
+
* @param quantity The number of tokens to mint.
|
|
18
|
+
*/
|
|
19
|
+
function mintPublic(
|
|
20
|
+
address nftContract,
|
|
21
|
+
address feeRecipient,
|
|
22
|
+
address minterIfNotPayer,
|
|
23
|
+
uint256 quantity
|
|
24
|
+
) external payable;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @notice Mint from an allow list.
|
|
28
|
+
*
|
|
29
|
+
* @param nftContract The nft contract to mint.
|
|
30
|
+
* @param feeRecipient The fee recipient.
|
|
31
|
+
* @param minterIfNotPayer The mint recipient if different than the payer.
|
|
32
|
+
* @param quantity The number of tokens to mint.
|
|
33
|
+
* @param mintParams The mint parameters.
|
|
34
|
+
* @param proof The proof for the leaf of the allow list.
|
|
35
|
+
*/
|
|
36
|
+
function mintAllowList(
|
|
37
|
+
address nftContract,
|
|
38
|
+
address feeRecipient,
|
|
39
|
+
address minterIfNotPayer,
|
|
40
|
+
uint256 quantity,
|
|
41
|
+
MintParams calldata mintParams,
|
|
42
|
+
bytes32[] calldata proof
|
|
43
|
+
) external payable;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Mint with a server-side signature.
|
|
47
|
+
* Note that a signature can only be used once.
|
|
48
|
+
*
|
|
49
|
+
* @param nftContract The nft contract to mint.
|
|
50
|
+
* @param feeRecipient The fee recipient.
|
|
51
|
+
* @param minterIfNotPayer The mint recipient if different than the payer.
|
|
52
|
+
* @param quantity The number of tokens to mint.
|
|
53
|
+
* @param mintParams The mint parameters.
|
|
54
|
+
* @param salt The sale for the signed mint.
|
|
55
|
+
* @param signature The server-side signature, must be an allowed
|
|
56
|
+
* signer.
|
|
57
|
+
*/
|
|
58
|
+
function mintSigned(
|
|
59
|
+
address nftContract,
|
|
60
|
+
address feeRecipient,
|
|
61
|
+
address minterIfNotPayer,
|
|
62
|
+
uint256 quantity,
|
|
63
|
+
MintParams calldata mintParams,
|
|
64
|
+
uint256 salt,
|
|
65
|
+
bytes calldata signature
|
|
66
|
+
) external payable;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @notice Mint as an allowed token holder.
|
|
70
|
+
* This will mark the token id as redeemed and will revert if the
|
|
71
|
+
* same token id is attempted to be redeemed twice.
|
|
72
|
+
*
|
|
73
|
+
* @param nftContract The nft contract to mint.
|
|
74
|
+
* @param feeRecipient The fee recipient.
|
|
75
|
+
* @param minterIfNotPayer The mint recipient if different than the payer.
|
|
76
|
+
* @param mintParams The token gated mint params.
|
|
77
|
+
*/
|
|
78
|
+
function mintAllowedTokenHolder(
|
|
79
|
+
address nftContract,
|
|
80
|
+
address feeRecipient,
|
|
81
|
+
address minterIfNotPayer,
|
|
82
|
+
TokenGatedMintParams calldata mintParams
|
|
83
|
+
) external payable;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @notice Emits an event to notify update of the drop URI.
|
|
87
|
+
*
|
|
88
|
+
* This method assume msg.sender is an nft contract and its
|
|
89
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
90
|
+
*
|
|
91
|
+
* Note: Be sure only authorized users can call this from
|
|
92
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
93
|
+
*
|
|
94
|
+
* @param dropURI The new drop URI.
|
|
95
|
+
*/
|
|
96
|
+
function updateDropURI(string calldata dropURI) external;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @notice Updates the public drop data for the nft contract
|
|
100
|
+
* and emits an event.
|
|
101
|
+
*
|
|
102
|
+
* This method assume msg.sender is an nft contract and its
|
|
103
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
104
|
+
*
|
|
105
|
+
* Note: Be sure only authorized users can call this from
|
|
106
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
107
|
+
*
|
|
108
|
+
* @param publicDrop The public drop data.
|
|
109
|
+
*/
|
|
110
|
+
function updatePublicDrop(PublicDrop calldata publicDrop) external;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @notice Updates the allow list merkle root for the nft contract
|
|
114
|
+
* and emits an event.
|
|
115
|
+
*
|
|
116
|
+
* This method assume msg.sender is an nft contract and its
|
|
117
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
118
|
+
*
|
|
119
|
+
* Note: Be sure only authorized users can call this from
|
|
120
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
121
|
+
*
|
|
122
|
+
* @param allowListData The allow list data.
|
|
123
|
+
*/
|
|
124
|
+
function updateAllowList(AllowListData calldata allowListData) external;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @notice Updates the token gated drop stage for the nft contract
|
|
128
|
+
* and emits an event.
|
|
129
|
+
*
|
|
130
|
+
* This method assume msg.sender is an nft contract and its
|
|
131
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
132
|
+
*
|
|
133
|
+
* Note: Be sure only authorized users can call this from
|
|
134
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
135
|
+
*
|
|
136
|
+
* Note: If two INonFungibleSeaDropToken tokens are doing
|
|
137
|
+
* simultaneous token gated drop promotions for each other,
|
|
138
|
+
* they can be minted by the same actor until
|
|
139
|
+
* `maxTokenSupplyForStage` is reached. Please ensure the
|
|
140
|
+
* `allowedNftToken` is not running an active drop during
|
|
141
|
+
* the `dropStage` time period.
|
|
142
|
+
*
|
|
143
|
+
* @param allowedNftToken The token gated nft token.
|
|
144
|
+
* @param dropStage The token gated drop stage data.
|
|
145
|
+
*/
|
|
146
|
+
function updateTokenGatedDrop(
|
|
147
|
+
address allowedNftToken,
|
|
148
|
+
TokenGatedDropStage calldata dropStage
|
|
149
|
+
) external;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @notice Updates the creator payout address and emits an event.
|
|
153
|
+
*
|
|
154
|
+
* This method assume msg.sender is an nft contract and its
|
|
155
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
156
|
+
*
|
|
157
|
+
* Note: Be sure only authorized users can call this from
|
|
158
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
159
|
+
*
|
|
160
|
+
* @param payoutAddress The creator payout address.
|
|
161
|
+
*/
|
|
162
|
+
function updateCreatorPayoutAddress(address payoutAddress) external;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @notice Updates the allowed fee recipient and emits an event.
|
|
166
|
+
*
|
|
167
|
+
* This method assume msg.sender is an nft contract and its
|
|
168
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
169
|
+
*
|
|
170
|
+
* Note: Be sure only authorized users can call this from
|
|
171
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
172
|
+
*
|
|
173
|
+
* @param feeRecipient The fee recipient.
|
|
174
|
+
* @param allowed If the fee recipient is allowed.
|
|
175
|
+
*/
|
|
176
|
+
function updateAllowedFeeRecipient(
|
|
177
|
+
address feeRecipient,
|
|
178
|
+
bool allowed
|
|
179
|
+
) external;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @notice Updates the allowed server-side signers and emits an event.
|
|
183
|
+
*
|
|
184
|
+
* This method assume msg.sender is an nft contract and its
|
|
185
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
186
|
+
*
|
|
187
|
+
* Note: Be sure only authorized users can call this from
|
|
188
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
189
|
+
*
|
|
190
|
+
* @param signer The signer to update.
|
|
191
|
+
* @param signedMintValidationParams Minimum and maximum parameters
|
|
192
|
+
* to enforce for signed mints.
|
|
193
|
+
*/
|
|
194
|
+
function updateSignedMintValidationParams(
|
|
195
|
+
address signer,
|
|
196
|
+
SignedMintValidationParams calldata signedMintValidationParams
|
|
197
|
+
) external;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @notice Updates the allowed payer and emits an event.
|
|
201
|
+
*
|
|
202
|
+
* This method assume msg.sender is an nft contract and its
|
|
203
|
+
* ERC165 interface id matches INonFungibleSeaDropToken.
|
|
204
|
+
*
|
|
205
|
+
* Note: Be sure only authorized users can call this from
|
|
206
|
+
* token contracts that implement INonFungibleSeaDropToken.
|
|
207
|
+
*
|
|
208
|
+
* @param payer The payer to add or remove.
|
|
209
|
+
* @param allowed Whether to add or remove the payer.
|
|
210
|
+
*/
|
|
211
|
+
function updatePayer(address payer, bool allowed) external;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @notice Returns the public drop data for the nft contract.
|
|
215
|
+
*
|
|
216
|
+
* @param nftContract The nft contract.
|
|
217
|
+
*/
|
|
218
|
+
function getPublicDrop(
|
|
219
|
+
address nftContract
|
|
220
|
+
) external view returns (PublicDrop memory);
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @notice Returns the creator payout address for the nft contract.
|
|
224
|
+
*
|
|
225
|
+
* @param nftContract The nft contract.
|
|
226
|
+
*/
|
|
227
|
+
function getCreatorPayoutAddress(
|
|
228
|
+
address nftContract
|
|
229
|
+
) external view returns (address);
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @notice Returns the allow list merkle root for the nft contract.
|
|
233
|
+
*
|
|
234
|
+
* @param nftContract The nft contract.
|
|
235
|
+
*/
|
|
236
|
+
function getAllowListMerkleRoot(
|
|
237
|
+
address nftContract
|
|
238
|
+
) external view returns (bytes32);
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @notice Returns if the specified fee recipient is allowed
|
|
242
|
+
* for the nft contract.
|
|
243
|
+
*
|
|
244
|
+
* @param nftContract The nft contract.
|
|
245
|
+
* @param feeRecipient The fee recipient.
|
|
246
|
+
*/
|
|
247
|
+
function getFeeRecipientIsAllowed(
|
|
248
|
+
address nftContract,
|
|
249
|
+
address feeRecipient
|
|
250
|
+
) external view returns (bool);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @notice Returns an enumeration of allowed fee recipients for an
|
|
254
|
+
* nft contract when fee recipients are enforced
|
|
255
|
+
*
|
|
256
|
+
* @param nftContract The nft contract.
|
|
257
|
+
*/
|
|
258
|
+
function getAllowedFeeRecipients(
|
|
259
|
+
address nftContract
|
|
260
|
+
) external view returns (address[] memory);
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @notice Returns the server-side signers for the nft contract.
|
|
264
|
+
*
|
|
265
|
+
* @param nftContract The nft contract.
|
|
266
|
+
*/
|
|
267
|
+
function getSigners(
|
|
268
|
+
address nftContract
|
|
269
|
+
) external view returns (address[] memory);
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @notice Returns the struct of SignedMintValidationParams for a signer.
|
|
273
|
+
*
|
|
274
|
+
* @param nftContract The nft contract.
|
|
275
|
+
* @param signer The signer.
|
|
276
|
+
*/
|
|
277
|
+
function getSignedMintValidationParams(
|
|
278
|
+
address nftContract,
|
|
279
|
+
address signer
|
|
280
|
+
) external view returns (SignedMintValidationParams memory);
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @notice Returns the payers for the nft contract.
|
|
284
|
+
*
|
|
285
|
+
* @param nftContract The nft contract.
|
|
286
|
+
*/
|
|
287
|
+
function getPayers(
|
|
288
|
+
address nftContract
|
|
289
|
+
) external view returns (address[] memory);
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @notice Returns if the specified payer is allowed
|
|
293
|
+
* for the nft contract.
|
|
294
|
+
*
|
|
295
|
+
* @param nftContract The nft contract.
|
|
296
|
+
* @param payer The payer.
|
|
297
|
+
*/
|
|
298
|
+
function getPayerIsAllowed(
|
|
299
|
+
address nftContract,
|
|
300
|
+
address payer
|
|
301
|
+
) external view returns (bool);
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @notice Returns the allowed token gated drop tokens for the nft contract.
|
|
305
|
+
*
|
|
306
|
+
* @param nftContract The nft contract.
|
|
307
|
+
*/
|
|
308
|
+
function getTokenGatedAllowedTokens(
|
|
309
|
+
address nftContract
|
|
310
|
+
) external view returns (address[] memory);
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @notice Returns the token gated drop data for the nft contract
|
|
314
|
+
* and token gated nft.
|
|
315
|
+
*
|
|
316
|
+
* @param nftContract The nft contract.
|
|
317
|
+
* @param allowedNftToken The token gated nft token.
|
|
318
|
+
*/
|
|
319
|
+
function getTokenGatedDrop(
|
|
320
|
+
address nftContract,
|
|
321
|
+
address allowedNftToken
|
|
322
|
+
) external view returns (TokenGatedDropStage memory);
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @notice Returns whether the token id for a token gated drop has been
|
|
326
|
+
* redeemed.
|
|
327
|
+
*
|
|
328
|
+
* @param nftContract The nft contract.
|
|
329
|
+
* @param allowedNftToken The token gated nft token.
|
|
330
|
+
* @param allowedNftTokenId The token gated nft token id to check.
|
|
331
|
+
*/
|
|
332
|
+
function getAllowedNftTokenIdIsRedeemed(
|
|
333
|
+
address nftContract,
|
|
334
|
+
address allowedNftToken,
|
|
335
|
+
uint256 allowedNftTokenId
|
|
336
|
+
) external view returns (bool);
|
|
337
|
+
}
|
package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
// @dev file is sourced from OpenSea's repository: https://github.com/ProjectOpenSea/seadrop/blob/main/src/interfaces/ISeaDropTokenContractMetadata.sol
|
|
4
|
+
// @dev modified to not lock to specific version, as well as updated imports for this repository
|
|
5
|
+
|
|
6
|
+
// @dev OpenSea's repo referenced v4.7 of OpenZeppelin, so importing from that version here
|
|
7
|
+
import {IERC2981} from "@openzeppelin-4.7/contracts/interfaces/IERC2981.sol";
|
|
8
|
+
|
|
9
|
+
interface ISeaDropTokenContractMetadata is IERC2981 {
|
|
10
|
+
/**
|
|
11
|
+
* @notice Throw if the max supply exceeds uint64, a limit
|
|
12
|
+
* due to the storage of bit-packed variables in ERC721A.
|
|
13
|
+
*/
|
|
14
|
+
error CannotExceedMaxSupplyOfUint64(uint256 newMaxSupply);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @notice Throw if the max supply exceeds the total minted.
|
|
18
|
+
*/
|
|
19
|
+
error NewMaxSupplyCannotBeLessThenTotalMinted(
|
|
20
|
+
uint256 got,
|
|
21
|
+
uint256 totalMinted
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @dev Revert with an error when attempting to set the provenance
|
|
26
|
+
* hash after the mint has started.
|
|
27
|
+
*/
|
|
28
|
+
error ProvenanceHashCannotBeSetAfterMintStarted();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @dev Revert if the royalty basis points is greater than 10_000.
|
|
32
|
+
*/
|
|
33
|
+
error InvalidRoyaltyBasisPoints(uint256 basisPoints);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @dev Revert if the royalty address is being set to the zero address.
|
|
37
|
+
*/
|
|
38
|
+
error RoyaltyAddressCannotBeZeroAddress();
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @dev Emit an event for token metadata reveals/updates,
|
|
42
|
+
* according to EIP-4906.
|
|
43
|
+
*
|
|
44
|
+
* @param _fromTokenId The start token id.
|
|
45
|
+
* @param _toTokenId The end token id.
|
|
46
|
+
*/
|
|
47
|
+
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @dev Emit an event when the URI for the collection-level metadata
|
|
51
|
+
* is updated.
|
|
52
|
+
*/
|
|
53
|
+
event ContractURIUpdated(string newContractURI);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @dev Emit an event when the max token supply is updated.
|
|
57
|
+
*/
|
|
58
|
+
event MaxSupplyUpdated(uint256 newMaxSupply);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @dev Emit an event with the previous and new provenance hash after
|
|
62
|
+
* being updated.
|
|
63
|
+
*/
|
|
64
|
+
event ProvenanceHashUpdated(bytes32 previousHash, bytes32 newHash);
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @dev Emit an event when the royalties info is updated.
|
|
68
|
+
*/
|
|
69
|
+
event RoyaltyInfoUpdated(address receiver, uint256 bps);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @notice A struct defining royalty info for the contract.
|
|
73
|
+
*/
|
|
74
|
+
struct RoyaltyInfo {
|
|
75
|
+
address royaltyAddress;
|
|
76
|
+
uint96 royaltyBps;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @notice Sets the base URI for the token metadata and emits an event.
|
|
81
|
+
*
|
|
82
|
+
* @param tokenURI The new base URI to set.
|
|
83
|
+
*/
|
|
84
|
+
function setBaseURI(string calldata tokenURI) external;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @notice Sets the contract URI for contract metadata.
|
|
88
|
+
*
|
|
89
|
+
* @param newContractURI The new contract URI.
|
|
90
|
+
*/
|
|
91
|
+
function setContractURI(string calldata newContractURI) external;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @notice Sets the max supply and emits an event.
|
|
95
|
+
*
|
|
96
|
+
* @param newMaxSupply The new max supply to set.
|
|
97
|
+
*/
|
|
98
|
+
function setMaxSupply(uint256 newMaxSupply) external;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @notice Sets the provenance hash and emits an event.
|
|
102
|
+
*
|
|
103
|
+
* The provenance hash is used for random reveals, which
|
|
104
|
+
* is a hash of the ordered metadata to show it has not been
|
|
105
|
+
* modified after mint started.
|
|
106
|
+
*
|
|
107
|
+
* This function will revert after the first item has been minted.
|
|
108
|
+
*
|
|
109
|
+
* @param newProvenanceHash The new provenance hash to set.
|
|
110
|
+
*/
|
|
111
|
+
function setProvenanceHash(bytes32 newProvenanceHash) external;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @notice Sets the address and basis points for royalties.
|
|
115
|
+
*
|
|
116
|
+
* @param newInfo The struct to configure royalties.
|
|
117
|
+
*/
|
|
118
|
+
function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @notice Returns the base URI for token metadata.
|
|
122
|
+
*/
|
|
123
|
+
function baseURI() external view returns (string memory);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @notice Returns the contract URI.
|
|
127
|
+
*/
|
|
128
|
+
function contractURI() external view returns (string memory);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @notice Returns the max token supply.
|
|
132
|
+
*/
|
|
133
|
+
function maxSupply() external view returns (uint256);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @notice Returns the provenance hash.
|
|
137
|
+
* The provenance hash is used for random reveals, which
|
|
138
|
+
* is a hash of the ordered metadata to show it is unmodified
|
|
139
|
+
* after mint has started.
|
|
140
|
+
*/
|
|
141
|
+
function provenanceHash() external view returns (bytes32);
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @notice Returns the address that receives royalties.
|
|
145
|
+
*/
|
|
146
|
+
function royaltyAddress() external view returns (address);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @notice Returns the royalty basis points out of 10_000.
|
|
150
|
+
*/
|
|
151
|
+
function royaltyBasisPoints() external view returns (uint256);
|
|
152
|
+
}
|