@artblocks/contracts 1.1.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 +86 -34
- package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
- 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 +403 -155
- 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 +2060 -0
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +2034 -0
- package/artifacts/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol/MinterBase.json +1 -1
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol/MinterDAExpV4.json +3 -3
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +3 -3
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol/MinterDALinV4.json +3 -3
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol/MinterHolderV4.json +3 -3
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol/MinterMerkleV5.json +3 -3
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +54 -49
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/MinterPolyptychV0.json +3 -3
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol/MinterSEAV0.json +3 -3
- 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/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol/MinterSetPriceV4.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +65 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +65 -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 +807 -0
- package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +65 -2
- package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +65 -2
- package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +624 -0
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +613 -216
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +805 -206
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +51 -8
- 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 +51 -8
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +59 -54
- 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/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -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 +130 -0
- 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 +228 -45
- package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +283 -0
- package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +12 -12
- package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +12 -12
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +53 -48
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +53 -48
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +198 -90
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +198 -90
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1065 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +778 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -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/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +18 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol/ISharedMinterRAMV0.json +62 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol/ISharedMinterRequired.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol/ISplitAtomicFactoryV0.json +170 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol/ISplitAtomicV0.json +126 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISplitProviderV0.sol/ISplitProviderV0.json +98 -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/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol/ISplitFactoryV2.json +123 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BitMap.sol/BitMaps256.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV0.sol/BytecodeStorage.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +214 -0
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol/ERC721_PackedHashSeedV1.json +444 -0
- package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/PackedBools.sol/PackedBools.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/SSTORE2.sol/SSTORE2.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +195 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.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 +398 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.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/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.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 +1374 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +7 -7
- 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 +417 -0
- 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 +154 -0
- package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +428 -0
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
- package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -0
- package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +24 -0
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
- package/artifacts/contracts/mock/Mock0xSplitsV2PullFactory.sol/Mock0xSplitsV2PullFactory.json +149 -0
- package/artifacts/contracts/mock/Mock0xSplitsV2Splitter.sol/Mock0xSplitsV2Splitter.json +99 -0
- package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +20 -2
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +20 -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/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
- package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +2 -2
- package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterDrainETHMock.json +54 -0
- package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterSendETHMock.json +54 -0
- 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/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
- package/artifacts/contracts/split/SplitAtomicFactoryV0.sol/SplitAtomicFactoryV0.json +203 -0
- package/artifacts/contracts/split/SplitAtomicV0.sol/SplitAtomicV0.json +168 -0
- package/artifacts/contracts/split/split-provider/SplitProviderV0.sol/SplitProviderV0.json +141 -0
- package/contracts/AdminACLV0.sol +6 -2
- package/contracts/AdminACLV1.sol +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 +878 -430
- package/contracts/GenArt721CoreV3_Curated.sol +133 -0
- package/contracts/OwnedCreate2FactoryV0.sol +173 -0
- package/contracts/{GenArt721CoreV3.sol → archive/GenArt721CoreV3.sol} +56 -20
- package/contracts/{explorations → archive}/GenArt721CoreV3_Explorations.sol +49 -13
- package/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol +4 -4
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol +8 -8
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol +4 -4
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol +7 -7
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol +13 -13
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +82 -10
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +82 -10
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPriceERC20}/MinterSetPriceERC20V4.sol +88 -21
- package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +81 -22
- package/contracts/engine/V2/GenArt721Minter_PBAB.sol +80 -22
- package/contracts/engine/V3/EngineFactoryV0.sol +427 -0
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +977 -502
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1137 -663
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +3 -3
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +1 -1
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
- 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/IAdminACLV0_Extended.sol +20 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +25 -0
- 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 +141 -45
- package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +124 -0
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDALinV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterHolderV2.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterMerkleV2.sol +1 -3
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +126 -11
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +86 -8
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +26 -8
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol +141 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol +78 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol +47 -0
- 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/IGenArt721Minter_PBAB.sol +91 -0
- package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
- package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +26 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +1 -4
- package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +12 -6
- package/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol +81 -0
- package/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol +72 -0
- package/contracts/interfaces/v0.8.x/ISplitProviderV0.sol +49 -0
- 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/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol +62 -0
- package/contracts/libs/v0.8.x/ABHelpers.sol +18 -4
- package/contracts/libs/v0.8.x/BitMap.sol +112 -0
- package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +98 -0
- package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
- package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
- package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +597 -0
- package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +10 -12
- package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +4 -9
- package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +44 -44
- package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +64 -63
- package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +14 -10
- package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
- package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
- package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +60 -62
- package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +4 -8
- package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +92 -89
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +128 -15
- package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +5 -4
- package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +16 -10
- package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +19 -15
- package/contracts/minter-suite/Minters/MinterDAExpV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterDALinV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
- package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
- package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
- package/contracts/minter-suite/Minters/MinterSEAV1.sol +21 -32
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +17 -8
- package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +23 -9
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +2 -2
- package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +2 -2
- package/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol +446 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
- package/contracts/mock/BytecodeV2LibCallsMock.sol +128 -0
- package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -0
- package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
- package/contracts/mock/ForceSendMock.sol +22 -0
- package/contracts/mock/Mock0xSplitsV2PullFactory.sol +75 -0
- package/contracts/mock/Mock0xSplitsV2Splitter.sol +47 -0
- package/contracts/mock/MockAdminACLV0.sol +21 -0
- package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +21 -0
- package/contracts/mock/MockFileStore.sol +22 -0
- package/contracts/mock/ReentrancyGenArt721MinterMock.sol +47 -0
- package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
- package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
- package/contracts/randomizer/shared/SharedRandomizerV0.sol +1 -1
- package/contracts/split/SplitAtomicFactoryV0.sol +121 -0
- package/contracts/split/SplitAtomicV0.sol +265 -0
- package/contracts/split/split-provider/SplitProviderV0.sol +201 -0
- package/package.json +66 -36
- package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +0 -1965
- package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +0 -1939
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +0 -768
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +0 -208
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +0 -301
- package/contracts/archive/readme.md +0 -16
- package/contracts/engine/README.md +0 -21
- package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
- package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
|
@@ -0,0 +1,869 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
// @dev fixed to specific solidity version for clarity and for more clear
|
|
5
|
+
// source code verification purposes.
|
|
6
|
+
pragma solidity 0.8.22;
|
|
7
|
+
|
|
8
|
+
import {INonFungibleSeaDropToken} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol";
|
|
9
|
+
import {ISeaDropTokenContractMetadata} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol";
|
|
10
|
+
import {ISeaDrop} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol";
|
|
11
|
+
import {ERC721SeaDropStructsErrorsAndEvents} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol";
|
|
12
|
+
import {PublicDrop, AllowListData, TokenGatedDropStage, SignedMintValidationParams} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol";
|
|
13
|
+
import {ISeaDropShimForContract} from "../../../interfaces/v0.8.x/ISeaDropShimForContract.sol";
|
|
14
|
+
import {IGenArt721CoreContractV3_Base} from "../../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
15
|
+
import {IGenArt721CoreContractV3_ProjectFinance} from "../../../interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol";
|
|
16
|
+
import {IMinterFilterV1} from "../../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
17
|
+
import {ISharedMinterRequired} from "../../../interfaces/v0.8.x/ISharedMinterRequired.sol";
|
|
18
|
+
|
|
19
|
+
import {ERC165} from "@openzeppelin-4.7/contracts/utils/introspection/ERC165.sol";
|
|
20
|
+
import {IERC165} from "@openzeppelin-4.7/contracts/utils/introspection/IERC165.sol";
|
|
21
|
+
import {IERC2981} from "@openzeppelin-4.7/contracts/interfaces/IERC2981.sol";
|
|
22
|
+
import {ReentrancyGuard} from "@openzeppelin-4.7/contracts/security/ReentrancyGuard.sol";
|
|
23
|
+
import {Ownable} from "@openzeppelin-4.7/contracts/access/Ownable.sol";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @title SeaDropXArtBlocksShim
|
|
27
|
+
* @author Art Blocks Inc.
|
|
28
|
+
* @notice A shim minter to allow OpenSea's SeaDrop system to mint Art Blocks tokens.
|
|
29
|
+
* This contract is a shim layer between the SeaDrop system and the Art Blocks core contract.
|
|
30
|
+
* It allows the SeaDrop system to mint Art Blocks tokens, enforcing the max supply and max mintable
|
|
31
|
+
* by wallet restrictions.
|
|
32
|
+
* The contract is owned by the artist, and the artist can configure the SeaDrop system to mint.
|
|
33
|
+
* The contract is configured at the time of deployment to point to a single Art Blocks project, and
|
|
34
|
+
* can never be updated.
|
|
35
|
+
* A core contract is expected to set this contract as its minter, bypassing the typical Shared Minter Suite.
|
|
36
|
+
* This contract does not support setting the baseURI, or fee recipients, as these are configured on the
|
|
37
|
+
* Art Blocks core contract.
|
|
38
|
+
* maxSupply is configurable on this contract, but should be less than or equal to the project's max invocations.
|
|
39
|
+
* This contract does not support contractURI or provenanceHash, as these are not supported on Art Blocks contracts.
|
|
40
|
+
* SeaDrop must be configured to route primary sales to the appropriate creator payout address. This will likely be a
|
|
41
|
+
* splitter wallet that distributes funds to the artist and other parties such as render provider. The process is not
|
|
42
|
+
* automated and must be done manually by the artist via the SeaDrop UI.
|
|
43
|
+
* Any secondary fee recipients configured through SeaDrop will not be enforced on tokens minted through this shim,
|
|
44
|
+
* as the fees are configured on the Art Blocks core contract for the tokens that are minted.
|
|
45
|
+
*/
|
|
46
|
+
contract SeaDropXArtBlocksShim is
|
|
47
|
+
ISeaDropShimForContract,
|
|
48
|
+
INonFungibleSeaDropToken,
|
|
49
|
+
ISharedMinterRequired,
|
|
50
|
+
ERC721SeaDropStructsErrorsAndEvents,
|
|
51
|
+
ERC165,
|
|
52
|
+
Ownable,
|
|
53
|
+
ReentrancyGuard
|
|
54
|
+
{
|
|
55
|
+
/// minterType for this minter
|
|
56
|
+
// @dev no version due to no plan of indexing the minter in AB subgraph
|
|
57
|
+
string public constant minterType = "SeaDropXArtBlocksShim";
|
|
58
|
+
|
|
59
|
+
/// @notice The immutable project ID for the Art Blocks project.
|
|
60
|
+
uint256 public immutable projectId;
|
|
61
|
+
|
|
62
|
+
/// @notice The SeaDrop contract allowed to mint on this shim layer.
|
|
63
|
+
ISeaDrop public immutable allowedSeaDrop;
|
|
64
|
+
|
|
65
|
+
/// @notice The Art Blocks core contract for the project.
|
|
66
|
+
IGenArt721CoreContractV3_Base public immutable genArt721Core;
|
|
67
|
+
|
|
68
|
+
/// Minter filter this minter may interact with.
|
|
69
|
+
IMinterFilterV1 public immutable minterFilter;
|
|
70
|
+
|
|
71
|
+
/// @notice mapping of minter address to number of tokens minted on this contract
|
|
72
|
+
mapping(address => uint256) public minterNumMinted;
|
|
73
|
+
|
|
74
|
+
/// @notice local max supply for this contract, enforced by this contract. Defers to core if 0 or > core max invocations
|
|
75
|
+
uint256 public localMaxSupply;
|
|
76
|
+
|
|
77
|
+
// --- internal modifier-like functions ---
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @notice Reverts if not an allowed SeaDrop contract.
|
|
81
|
+
* This function is inlined instead of being a modifier
|
|
82
|
+
* to save contract space from being inlined N times.
|
|
83
|
+
* @param seaDrop The SeaDrop address to check if allowed.
|
|
84
|
+
*/
|
|
85
|
+
function _onlyAllowedSeaDrop(address seaDrop) internal view {
|
|
86
|
+
if (seaDrop != address(allowedSeaDrop)) {
|
|
87
|
+
revert OnlyAllowedSeaDrop();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @notice Reverts if `msgSender` is not the artist or self.
|
|
93
|
+
* This function is inlined instead of being a modifier
|
|
94
|
+
* to save contract space from being inlined N times.
|
|
95
|
+
* @param msgSender The address to check if artist or self.
|
|
96
|
+
*/
|
|
97
|
+
function _onlyArtistOrSelf(address msgSender) internal view {
|
|
98
|
+
if (
|
|
99
|
+
msgSender != address(this) &&
|
|
100
|
+
msgSender != genArt721Core.projectIdToArtistAddress(projectId)
|
|
101
|
+
) {
|
|
102
|
+
revert(
|
|
103
|
+
"SeaDropXArtBlocksShim: Only the artist or self may call this function"
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @notice Reverts if `msgSender` is not the artist.
|
|
110
|
+
* This function is inlined instead of being a modifier
|
|
111
|
+
* to save contract space from being inlined N times.
|
|
112
|
+
* @param msgSender The address to check if artist.
|
|
113
|
+
*/
|
|
114
|
+
function _onlyArtist(address msgSender) internal view {
|
|
115
|
+
if (msgSender != genArt721Core.projectIdToArtistAddress(projectId)) {
|
|
116
|
+
revert(
|
|
117
|
+
"SeaDropXArtBlocksShim: Only the artist may call this function"
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @notice Constructor for the SeaDropXArtBlocksShim contract.
|
|
124
|
+
* Transfers ownership to the artist address for the project, as indicated by the core contract.
|
|
125
|
+
* @dev The ownership of this contract only affects frontend displays, and does not affect the permissions of
|
|
126
|
+
* configuring drop settings.
|
|
127
|
+
* allowedSeaDrop, genArt721Core, and projectId are immutable and cannot be updated.
|
|
128
|
+
* @param minterFilter_ Minter filter for which this will be a filtered minter.
|
|
129
|
+
* @param allowedSeaDrop_ The SeaDrop contract allowed to mint on this shim layer.
|
|
130
|
+
* @param genArt721Core_ The core contract for the Art Blocks project.
|
|
131
|
+
* @param projectId_ The project ID for the Art Blocks project.
|
|
132
|
+
*/
|
|
133
|
+
constructor(
|
|
134
|
+
IMinterFilterV1 minterFilter_,
|
|
135
|
+
ISeaDrop allowedSeaDrop_,
|
|
136
|
+
IGenArt721CoreContractV3_Base genArt721Core_,
|
|
137
|
+
uint256 projectId_
|
|
138
|
+
) Ownable() {
|
|
139
|
+
minterFilter = minterFilter_;
|
|
140
|
+
allowedSeaDrop = allowedSeaDrop_;
|
|
141
|
+
genArt721Core = genArt721Core_;
|
|
142
|
+
projectId = projectId_;
|
|
143
|
+
// set ownership to be the artist (snapshot)
|
|
144
|
+
// @dev if artist address is updated on the core contract, use the function syncOwnerToArtistAddress to update
|
|
145
|
+
// the ownership of this contract to the new artist address. The ownership of this contract only affects
|
|
146
|
+
// frontend displays, and does not affect the permissions of configuring drop settings.
|
|
147
|
+
_transferOwnership(genArt721Core.projectIdToArtistAddress(projectId_));
|
|
148
|
+
// emit SeaDrop event for indexing purposes
|
|
149
|
+
emit SeaDropTokenDeployed();
|
|
150
|
+
// indicate this is a shim layer that mints tokens on a different contract, for OpenSea's indexing purposes
|
|
151
|
+
emit SeaDropShimForContract(address(genArt721Core_));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// -- external functions to sync ownership for UI --
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @notice Sync the ownership of this contract to the artist address on the core contract.
|
|
158
|
+
* This function is useful if the artist address is updated on the core contract.
|
|
159
|
+
* The ownership of this contract only affects frontend displays, and does not affect the permissions of
|
|
160
|
+
* configuring drop settings.
|
|
161
|
+
* @dev intentionally unpermissioned, as this function only syncs state and is not manipulatable by untrusted
|
|
162
|
+
* third parties.
|
|
163
|
+
*/
|
|
164
|
+
function syncOwnerToArtistAddress() external {
|
|
165
|
+
_transferOwnership(genArt721Core.projectIdToArtistAddress(projectId));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// --- external functions from INonFungibleSeaDropToken ---
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
* @notice Update the allowed SeaDrop contract.
|
|
173
|
+
* Reverts - not supported on this contract.
|
|
174
|
+
*/
|
|
175
|
+
function updateAllowedSeaDrop(
|
|
176
|
+
address[] calldata /*allowedSeaDrop*/
|
|
177
|
+
) external pure {
|
|
178
|
+
revert("SeaDropXArtBlocksShim: updateAllowedSeaDrop not supported");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @notice Mint tokens, restricted to the SeaDrop contract.
|
|
183
|
+
* @param minter The address to mint to.
|
|
184
|
+
* @param quantity The number of tokens to mint.
|
|
185
|
+
*/
|
|
186
|
+
function mintSeaDrop(
|
|
187
|
+
address minter,
|
|
188
|
+
uint256 quantity
|
|
189
|
+
) external virtual override nonReentrant {
|
|
190
|
+
// Ensure the caller is an allowed SeaDrop contract
|
|
191
|
+
_onlyAllowedSeaDrop(msg.sender);
|
|
192
|
+
|
|
193
|
+
// check max supply, considering the local max supply and the core project's max invocations
|
|
194
|
+
// @dev block scope to free up stack
|
|
195
|
+
{
|
|
196
|
+
(
|
|
197
|
+
uint256 invocations,
|
|
198
|
+
uint256 maxInvocations
|
|
199
|
+
) = _getInvocationsDataFromCore();
|
|
200
|
+
uint256 maxSupply_ = _calcMaxSupply({
|
|
201
|
+
coreMaxInvocations: maxInvocations,
|
|
202
|
+
localMaxSupply_: localMaxSupply
|
|
203
|
+
});
|
|
204
|
+
if (invocations + quantity > maxSupply_) {
|
|
205
|
+
revert MintQuantityExceedsMaxSupply(
|
|
206
|
+
invocations + quantity,
|
|
207
|
+
maxSupply_
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// EFFECTS
|
|
213
|
+
// track the number of tokens minted by the minter via this contract to enforce maxTotalMintableByWallet
|
|
214
|
+
minterNumMinted[minter] += quantity;
|
|
215
|
+
// @dev Art Blocks core contract updates total minted - no need to track here
|
|
216
|
+
|
|
217
|
+
// INTERACTIONS
|
|
218
|
+
// Mint the quantity of tokens to the minter
|
|
219
|
+
for (uint256 i = 0; i < quantity; i++) {
|
|
220
|
+
minterFilter.mint_joo({
|
|
221
|
+
to: minter,
|
|
222
|
+
projectId: projectId,
|
|
223
|
+
coreContract: address(genArt721Core),
|
|
224
|
+
sender: msg.sender
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @notice Update the public drop data for this nft contract on SeaDrop.
|
|
231
|
+
* Only the artist can use this function.
|
|
232
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
233
|
+
* @param publicDrop The public drop data.
|
|
234
|
+
*/
|
|
235
|
+
function updatePublicDrop(
|
|
236
|
+
address seaDropImpl,
|
|
237
|
+
PublicDrop calldata publicDrop
|
|
238
|
+
) external {
|
|
239
|
+
// CHECKS
|
|
240
|
+
// sender must be artist or contract itself
|
|
241
|
+
_onlyArtistOrSelf(msg.sender);
|
|
242
|
+
// only update the allowed SeaDrop contract
|
|
243
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
244
|
+
|
|
245
|
+
// EFFECTS
|
|
246
|
+
// update the public drop data on SeeaDrop
|
|
247
|
+
allowedSeaDrop.updatePublicDrop(publicDrop);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @notice Update the allow list data for this nft contract on SeaDrop.
|
|
252
|
+
* Only the artist can use this function.
|
|
253
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
254
|
+
* @param allowListData The allow list data.
|
|
255
|
+
*/
|
|
256
|
+
function updateAllowList(
|
|
257
|
+
address seaDropImpl,
|
|
258
|
+
AllowListData calldata allowListData
|
|
259
|
+
) external virtual override {
|
|
260
|
+
// CHECKS
|
|
261
|
+
// sender must be artist or contract itself
|
|
262
|
+
_onlyArtistOrSelf(msg.sender);
|
|
263
|
+
// only update the allowed SeaDrop contract
|
|
264
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
265
|
+
|
|
266
|
+
// EFFECTS
|
|
267
|
+
// Update the allow list on SeaDrop.
|
|
268
|
+
ISeaDrop(seaDropImpl).updateAllowList(allowListData);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @notice Update the token gated drop stage data for this nft contract on SeaDrop.
|
|
273
|
+
* Only the artist can use this function.
|
|
274
|
+
*
|
|
275
|
+
* Note: If two INonFungibleSeaDropToken tokens are doing
|
|
276
|
+
* simultaneous token gated drop promotions for each other,
|
|
277
|
+
* they can be minted by the same actor until
|
|
278
|
+
* `maxTokenSupplyForStage` is reached. Please ensure the
|
|
279
|
+
* `allowedNftToken` is not running an active drop during the
|
|
280
|
+
* `dropStage` time period.
|
|
281
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
282
|
+
* @param allowedNftToken The allowed nft token.
|
|
283
|
+
* @param dropStage The token gated drop stage data.
|
|
284
|
+
*/
|
|
285
|
+
function updateTokenGatedDrop(
|
|
286
|
+
address seaDropImpl,
|
|
287
|
+
address allowedNftToken,
|
|
288
|
+
TokenGatedDropStage calldata dropStage
|
|
289
|
+
) external virtual override {
|
|
290
|
+
// CHECKS
|
|
291
|
+
// sender must be artist or contract itself
|
|
292
|
+
_onlyArtistOrSelf(msg.sender);
|
|
293
|
+
// only update the allowed SeaDrop contract
|
|
294
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
295
|
+
|
|
296
|
+
// EFFECTS
|
|
297
|
+
// Update the token gated drop stage.
|
|
298
|
+
ISeaDrop(seaDropImpl).updateTokenGatedDrop(allowedNftToken, dropStage);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @notice Update the drop URI for this nft contract on SeaDrop.
|
|
303
|
+
* Only the artist can use this function.
|
|
304
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
305
|
+
* @param dropURI The new drop URI.
|
|
306
|
+
*/
|
|
307
|
+
function updateDropURI(
|
|
308
|
+
address seaDropImpl,
|
|
309
|
+
string calldata dropURI
|
|
310
|
+
) external virtual override {
|
|
311
|
+
// CHECKS
|
|
312
|
+
// sender must be artist or contract itself
|
|
313
|
+
_onlyArtistOrSelf(msg.sender);
|
|
314
|
+
// only update the allowed SeaDrop contract
|
|
315
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
316
|
+
|
|
317
|
+
// EFFECTS
|
|
318
|
+
// Update the drop URI.
|
|
319
|
+
ISeaDrop(seaDropImpl).updateDropURI(dropURI);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @notice Update the creator payout address for this nft contract on SeaDrop.
|
|
324
|
+
* Only the artist can set the creator payout address.
|
|
325
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
326
|
+
* @param payoutAddress The new payout address.
|
|
327
|
+
*/
|
|
328
|
+
function updateCreatorPayoutAddress(
|
|
329
|
+
address seaDropImpl,
|
|
330
|
+
address payoutAddress
|
|
331
|
+
) external virtual override {
|
|
332
|
+
// CHECKS
|
|
333
|
+
// sender must be artist or contract itself
|
|
334
|
+
_onlyArtistOrSelf(msg.sender);
|
|
335
|
+
// only update the allowed SeaDrop contract
|
|
336
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
337
|
+
|
|
338
|
+
// EFFECTS
|
|
339
|
+
// Update the creator payout address.
|
|
340
|
+
ISeaDrop(seaDropImpl).updateCreatorPayoutAddress(payoutAddress);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @notice Update the allowed fee recipient for this nft contract on SeaDrop.
|
|
345
|
+
* Note: ERC2981 fees must be configured on the Art Blocks core contract. This setting has no effect on tokens
|
|
346
|
+
* minted on the core contract that this shim layer is for.
|
|
347
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
348
|
+
* @param feeRecipient The new fee recipient.
|
|
349
|
+
* @param allowed Whether the fee recipient is allowed.
|
|
350
|
+
*/
|
|
351
|
+
function updateAllowedFeeRecipient(
|
|
352
|
+
address seaDropImpl,
|
|
353
|
+
address feeRecipient,
|
|
354
|
+
bool allowed
|
|
355
|
+
) external virtual override {
|
|
356
|
+
// CHECKS
|
|
357
|
+
// sender must be artist or contract itself
|
|
358
|
+
_onlyArtistOrSelf(msg.sender);
|
|
359
|
+
// only update the allowed SeaDrop contract
|
|
360
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
361
|
+
|
|
362
|
+
// EFFECTS
|
|
363
|
+
// Update the allowed fee recipient.
|
|
364
|
+
ISeaDrop(seaDropImpl).updateAllowedFeeRecipient(feeRecipient, allowed);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* @notice Update the server-side signers for this nft contract on SeaDrop.
|
|
369
|
+
* Only the artist can use this function.
|
|
370
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
371
|
+
* @param signer The signer to update.
|
|
372
|
+
* @param signedMintValidationParams Minimum and maximum parameters to enforce for signed mints.
|
|
373
|
+
*/
|
|
374
|
+
function updateSignedMintValidationParams(
|
|
375
|
+
address seaDropImpl,
|
|
376
|
+
address signer,
|
|
377
|
+
SignedMintValidationParams memory signedMintValidationParams
|
|
378
|
+
) external virtual override {
|
|
379
|
+
// CHECKS
|
|
380
|
+
// sender must be artist or contract itself
|
|
381
|
+
_onlyArtistOrSelf(msg.sender);
|
|
382
|
+
// only update the allowed SeaDrop contract
|
|
383
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
384
|
+
|
|
385
|
+
// EFFECTS
|
|
386
|
+
// Update the signer.
|
|
387
|
+
ISeaDrop(seaDropImpl).updateSignedMintValidationParams(
|
|
388
|
+
signer,
|
|
389
|
+
signedMintValidationParams
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @notice Update the allowed payers for this nft contract on SeaDrop.
|
|
395
|
+
* Only the artist can use this function.
|
|
396
|
+
* @param seaDropImpl The allowed SeaDrop contract.
|
|
397
|
+
* @param payer The payer to update.
|
|
398
|
+
* @param allowed Whether the payer is allowed.
|
|
399
|
+
*/
|
|
400
|
+
function updatePayer(
|
|
401
|
+
address seaDropImpl,
|
|
402
|
+
address payer,
|
|
403
|
+
bool allowed
|
|
404
|
+
) external virtual override {
|
|
405
|
+
// CHECKS
|
|
406
|
+
// sender must be artist or contract itself
|
|
407
|
+
_onlyArtistOrSelf(msg.sender);
|
|
408
|
+
// only update the allowed SeaDrop contract
|
|
409
|
+
_onlyAllowedSeaDrop(seaDropImpl);
|
|
410
|
+
|
|
411
|
+
// EFFECTS
|
|
412
|
+
// Update the payer.
|
|
413
|
+
ISeaDrop(seaDropImpl).updatePayer(payer, allowed);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// --- external functions from ISeaDropTokenContractMetadata ---
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @notice Sets the base URI for the token metadata and emits an event.
|
|
420
|
+
* Reverts - baseURI must be configured on the Art Blocks core contract.
|
|
421
|
+
*/
|
|
422
|
+
function setBaseURI(string calldata /*tokenURI*/) external pure {
|
|
423
|
+
revert(
|
|
424
|
+
"SeaDropXArtBlocksShim: baseURI must be configured on the Art Blocks core contract"
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @notice Sets the contract URI for contract metadata.
|
|
430
|
+
* Reverts - contractURI is not supported on the Art Blocks core contract.
|
|
431
|
+
*/
|
|
432
|
+
function setContractURI(string calldata /*newContractURI*/) external pure {
|
|
433
|
+
revert(
|
|
434
|
+
"SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @notice Sets the max supply and emits an event.
|
|
440
|
+
* newMaxSupply must be less than or equal to the project's maxInvocations configured on the Art Blocks core
|
|
441
|
+
* contract.
|
|
442
|
+
* @dev this function enables SeaDrop to enforce a minter-local max invocations, while still deferring to the core
|
|
443
|
+
* contract for the project's total max invocations.
|
|
444
|
+
* @param newMaxSupply The new max supply to limit this shim minter to. Stored locally - does not affect max
|
|
445
|
+
* invocations on the core contract.
|
|
446
|
+
*/
|
|
447
|
+
function setMaxSupply(uint256 newMaxSupply) external {
|
|
448
|
+
// CHECKS
|
|
449
|
+
_onlyArtistOrSelf(msg.sender);
|
|
450
|
+
|
|
451
|
+
// ensure maxSupply lte project's max invocations on core contract
|
|
452
|
+
(, uint256 maxInvocations) = _getInvocationsDataFromCore();
|
|
453
|
+
if (newMaxSupply > maxInvocations) {
|
|
454
|
+
revert(
|
|
455
|
+
"SeaDropXArtBlocksShim: Only newMaxSupply lte max invocations on the Art Blocks core contract"
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// EFFECTS
|
|
460
|
+
// set the local max supply
|
|
461
|
+
localMaxSupply = newMaxSupply;
|
|
462
|
+
emit LocalMaxSupplyUpdated(newMaxSupply);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* @notice Sets the provenance hash and emits an event.
|
|
467
|
+
* Reverts - provenanceHash is not supported on the Art Blocks core contract.
|
|
468
|
+
*/
|
|
469
|
+
function setProvenanceHash(bytes32 /*newProvenanceHash*/) external pure {
|
|
470
|
+
revert(
|
|
471
|
+
"SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @notice Sets the address and basis points for royalties.
|
|
477
|
+
* Reverts - royalties must be configured on the Art Blocks core contract.
|
|
478
|
+
*/
|
|
479
|
+
function setRoyaltyInfo(RoyaltyInfo calldata /*newInfo*/) external pure {
|
|
480
|
+
revert(
|
|
481
|
+
"SeaDropXArtBlocksShim: royalties must be configured on the Art Blocks core contract"
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// --- external functions from https://github.com/ProjectOpenSea/seadrop/blob/main/src/ERC721SeaDrop.sol ---
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @notice Configure multiple properties at a time.
|
|
489
|
+
* Note: The individual configure methods should be used to unset or reset any properties to zero, as this method
|
|
490
|
+
* will ignore zero-value properties in the config struct.
|
|
491
|
+
* The following parameters are not supported in this function, will cause revert, and should be configured on the
|
|
492
|
+
* Art Blocks core contract directly:
|
|
493
|
+
* - maxSupply
|
|
494
|
+
* - baseURI
|
|
495
|
+
* - allowedFeeRecipients
|
|
496
|
+
* - disallowedFeeRecipients
|
|
497
|
+
* The following parameters are not supported by Art Blocks contracts and will cause revert:
|
|
498
|
+
* - contractURI
|
|
499
|
+
* - provenanceHash
|
|
500
|
+
* @dev logic for supported operations is taken from example SeaDrop implementation, and was tested end-to-end, and
|
|
501
|
+
* therefore may not be covered in this repository's tests. Unsupported operations are tested for reversion.
|
|
502
|
+
* @param config The configuration struct.
|
|
503
|
+
*/
|
|
504
|
+
function multiConfigure(MultiConfigureStruct calldata config) external {
|
|
505
|
+
// CHECKS
|
|
506
|
+
_onlyArtist(msg.sender);
|
|
507
|
+
|
|
508
|
+
// INTERACTIONS w/self
|
|
509
|
+
if (config.maxSupply > 0) {
|
|
510
|
+
this.setMaxSupply(config.maxSupply);
|
|
511
|
+
}
|
|
512
|
+
if (bytes(config.baseURI).length != 0) {
|
|
513
|
+
revert(
|
|
514
|
+
"SeaDropXArtBlocksShim: baseURI must be configured on the Art Blocks core contract"
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
if (bytes(config.contractURI).length != 0) {
|
|
518
|
+
revert(
|
|
519
|
+
"SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
if (
|
|
523
|
+
config.publicDrop.startTime != 0 || config.publicDrop.endTime != 0
|
|
524
|
+
) {
|
|
525
|
+
this.updatePublicDrop(config.seaDropImpl, config.publicDrop);
|
|
526
|
+
}
|
|
527
|
+
if (bytes(config.dropURI).length != 0) {
|
|
528
|
+
this.updateDropURI(config.seaDropImpl, config.dropURI);
|
|
529
|
+
}
|
|
530
|
+
if (config.allowListData.merkleRoot != bytes32(0)) {
|
|
531
|
+
this.updateAllowList(config.seaDropImpl, config.allowListData);
|
|
532
|
+
}
|
|
533
|
+
if (config.creatorPayoutAddress != address(0)) {
|
|
534
|
+
this.updateCreatorPayoutAddress(
|
|
535
|
+
config.seaDropImpl,
|
|
536
|
+
config.creatorPayoutAddress
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
if (config.provenanceHash != bytes32(0)) {
|
|
540
|
+
revert(
|
|
541
|
+
"SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
if (config.allowedFeeRecipients.length > 0) {
|
|
545
|
+
for (uint256 i = 0; i < config.allowedFeeRecipients.length; ) {
|
|
546
|
+
this.updateAllowedFeeRecipient(
|
|
547
|
+
config.seaDropImpl,
|
|
548
|
+
config.allowedFeeRecipients[i],
|
|
549
|
+
true
|
|
550
|
+
);
|
|
551
|
+
unchecked {
|
|
552
|
+
++i;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (config.disallowedFeeRecipients.length > 0) {
|
|
557
|
+
for (uint256 i = 0; i < config.disallowedFeeRecipients.length; ) {
|
|
558
|
+
this.updateAllowedFeeRecipient(
|
|
559
|
+
config.seaDropImpl,
|
|
560
|
+
config.disallowedFeeRecipients[i],
|
|
561
|
+
false
|
|
562
|
+
);
|
|
563
|
+
unchecked {
|
|
564
|
+
++i;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
if (config.allowedPayers.length > 0) {
|
|
569
|
+
for (uint256 i = 0; i < config.allowedPayers.length; ) {
|
|
570
|
+
this.updatePayer(
|
|
571
|
+
config.seaDropImpl,
|
|
572
|
+
config.allowedPayers[i],
|
|
573
|
+
true
|
|
574
|
+
);
|
|
575
|
+
unchecked {
|
|
576
|
+
++i;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
if (config.disallowedPayers.length > 0) {
|
|
581
|
+
for (uint256 i = 0; i < config.disallowedPayers.length; ) {
|
|
582
|
+
this.updatePayer(
|
|
583
|
+
config.seaDropImpl,
|
|
584
|
+
config.disallowedPayers[i],
|
|
585
|
+
false
|
|
586
|
+
);
|
|
587
|
+
unchecked {
|
|
588
|
+
++i;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if (config.tokenGatedDropStages.length > 0) {
|
|
593
|
+
if (
|
|
594
|
+
config.tokenGatedDropStages.length !=
|
|
595
|
+
config.tokenGatedAllowedNftTokens.length
|
|
596
|
+
) {
|
|
597
|
+
revert TokenGatedMismatch();
|
|
598
|
+
}
|
|
599
|
+
for (uint256 i = 0; i < config.tokenGatedDropStages.length; ) {
|
|
600
|
+
this.updateTokenGatedDrop(
|
|
601
|
+
config.seaDropImpl,
|
|
602
|
+
config.tokenGatedAllowedNftTokens[i],
|
|
603
|
+
config.tokenGatedDropStages[i]
|
|
604
|
+
);
|
|
605
|
+
unchecked {
|
|
606
|
+
++i;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
if (config.disallowedTokenGatedAllowedNftTokens.length > 0) {
|
|
611
|
+
for (
|
|
612
|
+
uint256 i = 0;
|
|
613
|
+
i < config.disallowedTokenGatedAllowedNftTokens.length;
|
|
614
|
+
|
|
615
|
+
) {
|
|
616
|
+
TokenGatedDropStage memory emptyStage;
|
|
617
|
+
this.updateTokenGatedDrop(
|
|
618
|
+
config.seaDropImpl,
|
|
619
|
+
config.disallowedTokenGatedAllowedNftTokens[i],
|
|
620
|
+
emptyStage
|
|
621
|
+
);
|
|
622
|
+
unchecked {
|
|
623
|
+
++i;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (config.signedMintValidationParams.length > 0) {
|
|
628
|
+
if (
|
|
629
|
+
config.signedMintValidationParams.length !=
|
|
630
|
+
config.signers.length
|
|
631
|
+
) {
|
|
632
|
+
revert SignersMismatch();
|
|
633
|
+
}
|
|
634
|
+
for (
|
|
635
|
+
uint256 i = 0;
|
|
636
|
+
i < config.signedMintValidationParams.length;
|
|
637
|
+
|
|
638
|
+
) {
|
|
639
|
+
this.updateSignedMintValidationParams(
|
|
640
|
+
config.seaDropImpl,
|
|
641
|
+
config.signers[i],
|
|
642
|
+
config.signedMintValidationParams[i]
|
|
643
|
+
);
|
|
644
|
+
unchecked {
|
|
645
|
+
++i;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (config.disallowedSigners.length > 0) {
|
|
650
|
+
for (uint256 i = 0; i < config.disallowedSigners.length; ) {
|
|
651
|
+
SignedMintValidationParams memory emptyParams;
|
|
652
|
+
this.updateSignedMintValidationParams(
|
|
653
|
+
config.seaDropImpl,
|
|
654
|
+
config.disallowedSigners[i],
|
|
655
|
+
emptyParams
|
|
656
|
+
);
|
|
657
|
+
unchecked {
|
|
658
|
+
++i;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// -- required shared minter view functions for minter suite compatibility (ISharedMinterRequired) --
|
|
665
|
+
|
|
666
|
+
// @dev minterType requirement satisfied by public constant minterType
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* @notice Returns the minter's associated shared minter filter address.
|
|
670
|
+
* @dev used by subgraph indexing service for entity relation purposes.
|
|
671
|
+
* @return The minter filter address.
|
|
672
|
+
*/
|
|
673
|
+
function minterFilterAddress() external view returns (address) {
|
|
674
|
+
return address(minterFilter);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// --- public view functions from INonFungibleSeaDropToken ---
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @notice Returns a set of mint stats for the address. This assists SeaDrop in enforcing maxSupply,
|
|
681
|
+
* maxTotalMintableByWallet, and maxTokenSupplyForStage checks.
|
|
682
|
+
* @param minter The minter address.
|
|
683
|
+
* @return minterNumMinted_ The number of tokens minted by the minter.
|
|
684
|
+
* @return currentTotalSupply The current total supply of the project (sourced from the core contract).
|
|
685
|
+
* @return maxSupply_ The max supply of the project (sourced from the core contract).
|
|
686
|
+
*/
|
|
687
|
+
function getMintStats(
|
|
688
|
+
address minter
|
|
689
|
+
)
|
|
690
|
+
external
|
|
691
|
+
view
|
|
692
|
+
override
|
|
693
|
+
returns (
|
|
694
|
+
uint256 minterNumMinted_,
|
|
695
|
+
uint256 currentTotalSupply,
|
|
696
|
+
uint256 maxSupply_
|
|
697
|
+
)
|
|
698
|
+
{
|
|
699
|
+
// @dev only able to track mint qty performed via this contract; Art Blocks does not implement ERC721Enumerable
|
|
700
|
+
minterNumMinted_ = minterNumMinted[minter];
|
|
701
|
+
|
|
702
|
+
// defer to the core contract for the current supply details, for configured project
|
|
703
|
+
(
|
|
704
|
+
uint256 invocations,
|
|
705
|
+
uint256 maxInvocations
|
|
706
|
+
) = _getInvocationsDataFromCore();
|
|
707
|
+
// current supply is number of invocations for the configured project
|
|
708
|
+
currentTotalSupply = invocations;
|
|
709
|
+
// max supply depends on the local max supply and the core project's max invocations
|
|
710
|
+
maxSupply_ = _calcMaxSupply({
|
|
711
|
+
coreMaxInvocations: maxInvocations,
|
|
712
|
+
localMaxSupply_: localMaxSupply
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// --- public view functions from ISeaDropTokenContractMetadata ---
|
|
717
|
+
/**
|
|
718
|
+
* @notice Returns the base URI for token metadata.
|
|
719
|
+
* @return The base URI.
|
|
720
|
+
*/
|
|
721
|
+
function baseURI() external view returns (string memory) {
|
|
722
|
+
return genArt721Core.projectURIInfo(projectId);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* @notice Returns the contract URI.
|
|
727
|
+
* Reverts, because the contract URI is not supported on Art Blocks contracts.
|
|
728
|
+
*/
|
|
729
|
+
function contractURI() external pure returns (string memory) {
|
|
730
|
+
// return "https://external-link-url.com/my-contract-metadata.json";
|
|
731
|
+
revert(
|
|
732
|
+
"SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* @notice Returns the max token supply for the configured project.
|
|
738
|
+
*/
|
|
739
|
+
function maxSupply() external view returns (uint256) {
|
|
740
|
+
// defer to the core contract for the current supply details, for configured project
|
|
741
|
+
(, uint256 maxInvocations) = _getInvocationsDataFromCore();
|
|
742
|
+
return
|
|
743
|
+
_calcMaxSupply({
|
|
744
|
+
coreMaxInvocations: maxInvocations,
|
|
745
|
+
localMaxSupply_: localMaxSupply
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* @notice Returns the provenance hash.
|
|
751
|
+
* Reverts - provenance hash is not supported on Art Blocks contracts.
|
|
752
|
+
*/
|
|
753
|
+
function provenanceHash() external pure returns (bytes32) {
|
|
754
|
+
revert(
|
|
755
|
+
"SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* @notice Returns the address that receives royalties.
|
|
761
|
+
* @dev defers to the core contract for the royalty splitter address, for configured project.
|
|
762
|
+
* @return The address that receives royalties.
|
|
763
|
+
*/
|
|
764
|
+
function royaltyAddress() external view returns (address) {
|
|
765
|
+
// defer to the core contract for the royalty splitter address, for configured project
|
|
766
|
+
// @dev assumes v3.2 or later, where the ERC2981 royaltySplitter is stored in the project financials
|
|
767
|
+
return
|
|
768
|
+
IGenArt721CoreContractV3_ProjectFinance(address(genArt721Core))
|
|
769
|
+
.projectIdToFinancials(projectId)
|
|
770
|
+
.royaltySplitter;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @notice Returns the royalty basis points out of 10_000.
|
|
775
|
+
* @dev defers to the core contract for the royalty basis points, for configured project.
|
|
776
|
+
* @return The royalty basis points.
|
|
777
|
+
*/
|
|
778
|
+
function royaltyBasisPoints() external view returns (uint256) {
|
|
779
|
+
// defer to the core contract for the royalty basis points, for configured project
|
|
780
|
+
// @dev assumes v3.2 or later, where the ERC2981 royaltySplitter is stored in the project financials
|
|
781
|
+
IGenArt721CoreContractV3_ProjectFinance.ProjectFinance
|
|
782
|
+
memory financials = IGenArt721CoreContractV3_ProjectFinance(
|
|
783
|
+
address(genArt721Core)
|
|
784
|
+
).projectIdToFinancials(projectId);
|
|
785
|
+
// total royalty basis points is the sum of the artist's royalty percentage converted to BPS, the platform
|
|
786
|
+
// provider's secondary sales BPS, and the render provider's secondary sales BPS
|
|
787
|
+
// @dev uint256 required to avoid overflow for reasonable royalty percentages
|
|
788
|
+
return
|
|
789
|
+
(uint256(financials.secondaryMarketRoyaltyPercentage) * 100) +
|
|
790
|
+
financials.platformProviderSecondarySalesBPS +
|
|
791
|
+
financials.renderProviderSecondarySalesBPS;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// --- public view functions from IERC2981 ---
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* @notice Returns the royalty receiver and amount for a given token ID and sale price.
|
|
798
|
+
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
|
|
799
|
+
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
|
|
800
|
+
* @param tokenId The token ID for which royalty information is needed.
|
|
801
|
+
* @param salePrice The sale price of the token.
|
|
802
|
+
* @return receiver The address of the royalty receiver.
|
|
803
|
+
* @return royaltyAmount The amount of royalty that is owed.
|
|
804
|
+
*/
|
|
805
|
+
function royaltyInfo(
|
|
806
|
+
uint256 tokenId,
|
|
807
|
+
uint256 salePrice
|
|
808
|
+
) external view returns (address receiver, uint256 royaltyAmount) {
|
|
809
|
+
// defer to the core contract for the royalty receiver and amount, for the given token ID
|
|
810
|
+
// @dev assumes v3.2 or later, where ERC2981 is supported
|
|
811
|
+
return
|
|
812
|
+
IERC2981(address(genArt721Core)).royaltyInfo({
|
|
813
|
+
tokenId: tokenId,
|
|
814
|
+
salePrice: salePrice
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// --- public view functions from IERC165 ---
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* @notice Returns whether the interface is supported.
|
|
822
|
+
* @param interfaceId The interface id to check against.
|
|
823
|
+
* @return Whether the interface is supported.
|
|
824
|
+
*/
|
|
825
|
+
function supportsInterface(
|
|
826
|
+
bytes4 interfaceId
|
|
827
|
+
) public view virtual override(ERC165, IERC165) returns (bool) {
|
|
828
|
+
// @dev no coverage
|
|
829
|
+
// Note: do not support ERC721, ERC721Metadata in this shim layer
|
|
830
|
+
return
|
|
831
|
+
interfaceId == type(INonFungibleSeaDropToken).interfaceId ||
|
|
832
|
+
interfaceId == type(ISeaDropTokenContractMetadata).interfaceId ||
|
|
833
|
+
interfaceId == type(IERC2981).interfaceId ||
|
|
834
|
+
// ERC165 returns supportsInterface true for ERC165
|
|
835
|
+
super.supportsInterface(interfaceId);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @notice Returns the invocations and max invocations for the configured project, from the core contract.
|
|
840
|
+
* @return invocations The number of invocations for the configured project.
|
|
841
|
+
* @return maxInvocations The max invocations for the configured project.
|
|
842
|
+
*/
|
|
843
|
+
function _getInvocationsDataFromCore()
|
|
844
|
+
private
|
|
845
|
+
view
|
|
846
|
+
returns (uint256 invocations, uint256 maxInvocations)
|
|
847
|
+
{
|
|
848
|
+
(invocations, maxInvocations, , , , ) = genArt721Core.projectStateData(
|
|
849
|
+
projectId
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* helper function to calculate the max supply for this contract, based on the core max invocations and local max
|
|
855
|
+
* supply.
|
|
856
|
+
* @dev if localMaxSupply is 0 or > coreMaxInvocations, defers to coreMaxInvocations
|
|
857
|
+
* @param coreMaxInvocations The max invocations for the configured project on the Art Blocks core contract.
|
|
858
|
+
* @param localMaxSupply_ The local max supply for this contract (configured via setMaxSupply).
|
|
859
|
+
*/
|
|
860
|
+
function _calcMaxSupply(
|
|
861
|
+
uint256 coreMaxInvocations,
|
|
862
|
+
uint256 localMaxSupply_
|
|
863
|
+
) private pure returns (uint256) {
|
|
864
|
+
return
|
|
865
|
+
localMaxSupply_ == 0 || localMaxSupply_ > coreMaxInvocations
|
|
866
|
+
? coreMaxInvocations
|
|
867
|
+
: localMaxSupply_;
|
|
868
|
+
}
|
|
869
|
+
}
|