@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,427 @@
|
|
|
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 {AdminACLV0} from "../../AdminACLV0.sol";
|
|
9
|
+
import {IGenArt721CoreContractV3_Engine, EngineConfiguration} from "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol";
|
|
10
|
+
import {ICoreRegistryV1} from "../../interfaces/v0.8.x/ICoreRegistryV1.sol";
|
|
11
|
+
import {IEngineFactoryV0} from "../../interfaces/v0.8.x/IEngineFactoryV0.sol";
|
|
12
|
+
import {IAdminACLV0_Extended} from "../../interfaces/v0.8.x/IAdminACLV0_Extended.sol";
|
|
13
|
+
|
|
14
|
+
import "@openzeppelin-5.0/contracts/access/Ownable.sol";
|
|
15
|
+
import {Clones} from "@openzeppelin-5.0/contracts/proxy/Clones.sol";
|
|
16
|
+
import {IERC20} from "@openzeppelin-5.0/contracts/token/ERC20/IERC20.sol";
|
|
17
|
+
import {SafeERC20} from "@openzeppelin-5.0/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
18
|
+
import {Create2} from "@openzeppelin-5.0/contracts/utils/Create2.sol";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @title EngineFactoryV0
|
|
22
|
+
* @author Art Blocks Inc.
|
|
23
|
+
* @notice Factory contract for creating new Engine and Engine Flex Core contracts.
|
|
24
|
+
* @dev This contract is deployed once, and then used to create new Engine and Engine
|
|
25
|
+
* Flex Core contracts. The contract may be abandoned once it is no longer needed.
|
|
26
|
+
* Once abandoned, the contract can no longer be used to create new Engine and Engine
|
|
27
|
+
* Flex Core contracts.
|
|
28
|
+
* The contract is initialized with a required contract type.
|
|
29
|
+
* The contract is initialized with an Engine and Engine Flex implementation contract, which is cloned
|
|
30
|
+
* when creating new Engine and Engine Flex Core contracts.
|
|
31
|
+
*/
|
|
32
|
+
contract EngineFactoryV0 is Ownable, IEngineFactoryV0 {
|
|
33
|
+
// public type
|
|
34
|
+
bytes32 public constant type_ = "EngineFactoryV0";
|
|
35
|
+
|
|
36
|
+
// base URI host for all Engine contracts on this network/chainID
|
|
37
|
+
string public defaultBaseURIHost;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The implementation contract that is cloned when creating new Engine
|
|
41
|
+
* contracts.
|
|
42
|
+
*/
|
|
43
|
+
address public immutable engineImplementation;
|
|
44
|
+
/**
|
|
45
|
+
* The implementation contract that is cloned when creating new Engine
|
|
46
|
+
* Flex contracts.
|
|
47
|
+
*/
|
|
48
|
+
address public immutable engineFlexImplementation;
|
|
49
|
+
|
|
50
|
+
// Address of core registry contract.
|
|
51
|
+
address public immutable coreRegistry;
|
|
52
|
+
|
|
53
|
+
/// version and type of Engine implementation contract
|
|
54
|
+
string public engineCoreType;
|
|
55
|
+
string public engineCoreVersion;
|
|
56
|
+
|
|
57
|
+
/// version and type of Engine Flex implementation contract
|
|
58
|
+
string public flexCoreType;
|
|
59
|
+
string public flexCoreVersion;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Indicates whether the contract is abandoned.
|
|
63
|
+
* Once abandoned, the contract can no longer be used to create new Engine
|
|
64
|
+
* and Engine Flex contracts.
|
|
65
|
+
*/
|
|
66
|
+
bool public isAbandoned; // default false
|
|
67
|
+
|
|
68
|
+
/// Universal Bytecode Storage Reader contract address, which all core contracts are initialized to use
|
|
69
|
+
address public immutable universalBytecodeStorageReader;
|
|
70
|
+
|
|
71
|
+
// pseudorandom salt nonce to prevent collisions for multiple contract deployments in single block
|
|
72
|
+
uint256 private _pseudorandomSaltNonce;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Represents a generic call operation.
|
|
76
|
+
*/
|
|
77
|
+
struct Call {
|
|
78
|
+
address to;
|
|
79
|
+
bytes data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @notice validates and assigns immutable configuration variables and
|
|
84
|
+
* sets state variables
|
|
85
|
+
* @param engineImplementation_ address of the Engine
|
|
86
|
+
* implementation contract
|
|
87
|
+
* @param engineFlexImplementation_ address of the Engine Flex
|
|
88
|
+
* implementation contract
|
|
89
|
+
* @param coreRegistry_ address of the core registry contract
|
|
90
|
+
* @param owner_ address of the initial owner
|
|
91
|
+
* @param defaultBaseURIHost_ default base URI prefix for all Engine contracts,
|
|
92
|
+
* e.g. "https://token.artblocks.io/" for mainnet, "https://token.arbitrum.artblocks.io/" for arbitrum, etc.
|
|
93
|
+
* @param universalBytecodeStorageReader_ address of the UniversalBytecodeStorageReader contract
|
|
94
|
+
*/
|
|
95
|
+
constructor(
|
|
96
|
+
address engineImplementation_,
|
|
97
|
+
address engineFlexImplementation_,
|
|
98
|
+
address coreRegistry_,
|
|
99
|
+
address owner_,
|
|
100
|
+
string memory defaultBaseURIHost_,
|
|
101
|
+
address universalBytecodeStorageReader_
|
|
102
|
+
) Ownable(owner_) {
|
|
103
|
+
_onlyNonZeroAddress(engineImplementation_);
|
|
104
|
+
_onlyNonZeroAddress(engineFlexImplementation_);
|
|
105
|
+
_onlyNonZeroAddress(coreRegistry_);
|
|
106
|
+
_onlyNonZeroAddress(owner_);
|
|
107
|
+
|
|
108
|
+
defaultBaseURIHost = defaultBaseURIHost_;
|
|
109
|
+
|
|
110
|
+
engineImplementation = engineImplementation_;
|
|
111
|
+
engineFlexImplementation = engineFlexImplementation_;
|
|
112
|
+
coreRegistry = coreRegistry_;
|
|
113
|
+
|
|
114
|
+
engineCoreType = IGenArt721CoreContractV3_Engine(engineImplementation)
|
|
115
|
+
.coreType();
|
|
116
|
+
engineCoreVersion = IGenArt721CoreContractV3_Engine(
|
|
117
|
+
engineImplementation
|
|
118
|
+
).coreVersion();
|
|
119
|
+
flexCoreType = IGenArt721CoreContractV3_Engine(engineFlexImplementation)
|
|
120
|
+
.coreType();
|
|
121
|
+
flexCoreVersion = IGenArt721CoreContractV3_Engine(
|
|
122
|
+
engineFlexImplementation
|
|
123
|
+
).coreVersion();
|
|
124
|
+
|
|
125
|
+
universalBytecodeStorageReader = universalBytecodeStorageReader_;
|
|
126
|
+
|
|
127
|
+
// emit event
|
|
128
|
+
emit Deployed({
|
|
129
|
+
engineImplementation: engineImplementation_,
|
|
130
|
+
engineFlexImplementation: engineFlexImplementation_,
|
|
131
|
+
type_: type_
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @notice Creates a new Engine or Engine Flex contract with the provided
|
|
137
|
+
* `engineConfiguration`, depending on the `engineCoreContractType`.
|
|
138
|
+
* Reverts if invalid configuration is provided, or if in an invalid deployment
|
|
139
|
+
* state (e.g. if the contract is abandoned or does not own the core registry).
|
|
140
|
+
* @param engineCoreContractType Type of Engine Core contract.
|
|
141
|
+
* @param engineConfiguration EngineConfiguration data to configure the
|
|
142
|
+
* contract with.
|
|
143
|
+
* @param adminACLContract Address of admin access control contract, to be
|
|
144
|
+
* set as contract owner. A new contract will be deployed if address is null.
|
|
145
|
+
* @param salt Salt used to deterministically deploy the clone. If null, a
|
|
146
|
+
* pseudorandom salt is generated.
|
|
147
|
+
* @return engineContract The address of the newly created Engine or Engine Flex
|
|
148
|
+
* contract. The address is also emitted in the `EngineContractCreated` event.
|
|
149
|
+
*/
|
|
150
|
+
function createEngineContract(
|
|
151
|
+
IEngineFactoryV0.EngineCoreType engineCoreContractType,
|
|
152
|
+
EngineConfiguration calldata engineConfiguration,
|
|
153
|
+
address adminACLContract,
|
|
154
|
+
bytes32 salt
|
|
155
|
+
) external onlyOwner returns (address engineContract) {
|
|
156
|
+
require(!isAbandoned, "factory is abandoned");
|
|
157
|
+
// validate engine contract configuration
|
|
158
|
+
_onlyNonZeroAddress(engineConfiguration.renderProviderAddress);
|
|
159
|
+
_onlyNonZeroAddress(engineConfiguration.randomizerContract);
|
|
160
|
+
|
|
161
|
+
// check if salt is empty and generate a pseudorandom one if so
|
|
162
|
+
if (salt == bytes32(0)) {
|
|
163
|
+
salt = _generatePseudorandomSalt();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (adminACLContract == address(0)) {
|
|
167
|
+
_onlyNonZeroAddress(engineConfiguration.newSuperAdminAddress);
|
|
168
|
+
// deploy new AdminACLV0 contract and update super admin
|
|
169
|
+
adminACLContract = Create2.deploy({
|
|
170
|
+
amount: 0,
|
|
171
|
+
salt: _generatePseudorandomSalt(),
|
|
172
|
+
bytecode: type(AdminACLV0).creationCode
|
|
173
|
+
});
|
|
174
|
+
address[] memory tmpEmptyArray = new address[](0);
|
|
175
|
+
|
|
176
|
+
IAdminACLV0_Extended(adminACLContract).changeSuperAdmin(
|
|
177
|
+
engineConfiguration.newSuperAdminAddress,
|
|
178
|
+
tmpEmptyArray
|
|
179
|
+
);
|
|
180
|
+
} else {
|
|
181
|
+
// Use existing Admin ACL Contract, newSuperAdminAddress should not be populated
|
|
182
|
+
require(
|
|
183
|
+
engineConfiguration.newSuperAdminAddress == address(0),
|
|
184
|
+
"AdminACL already exists"
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
address implementation = engineCoreContractType ==
|
|
189
|
+
IEngineFactoryV0.EngineCoreType.Engine
|
|
190
|
+
? engineImplementation
|
|
191
|
+
: engineFlexImplementation;
|
|
192
|
+
|
|
193
|
+
engineContract = Clones.cloneDeterministic({
|
|
194
|
+
implementation: implementation,
|
|
195
|
+
salt: salt
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
IGenArt721CoreContractV3_Engine(engineContract).initialize({
|
|
199
|
+
engineConfiguration: engineConfiguration,
|
|
200
|
+
adminACLContract_: adminACLContract,
|
|
201
|
+
defaultBaseURIHost: defaultBaseURIHost,
|
|
202
|
+
bytecodeStorageReaderContract_: universalBytecodeStorageReader
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
(
|
|
206
|
+
string memory coreContractType,
|
|
207
|
+
string memory coreContractVersion
|
|
208
|
+
) = engineCoreContractType == IEngineFactoryV0.EngineCoreType.Engine
|
|
209
|
+
? (engineCoreType, engineCoreVersion)
|
|
210
|
+
: (flexCoreType, flexCoreVersion);
|
|
211
|
+
|
|
212
|
+
// register the new Engine contract
|
|
213
|
+
ICoreRegistryV1(coreRegistry).registerContract(
|
|
214
|
+
engineContract,
|
|
215
|
+
_stringToBytes32(coreContractVersion),
|
|
216
|
+
_stringToBytes32(coreContractType)
|
|
217
|
+
);
|
|
218
|
+
// emit event
|
|
219
|
+
emit EngineContractCreated(engineContract);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @notice Calls transferOwnership on the core registry.
|
|
224
|
+
* Useful for updating the owner of the core registry contract.
|
|
225
|
+
* @param _owner address of the new owner
|
|
226
|
+
*/
|
|
227
|
+
function transferCoreRegistryOwnership(address _owner) external onlyOwner {
|
|
228
|
+
Ownable(coreRegistry).transferOwnership(_owner);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @notice Registers multiple contracts with the core registry.
|
|
233
|
+
* @param contractAddresses An array of contract addresses to register.
|
|
234
|
+
* @param coreVersions An array of versions corresponding to the contract addresses.
|
|
235
|
+
* @param coreTypes An array of types corresponding to the contract addresses.
|
|
236
|
+
*/
|
|
237
|
+
function registerMultipleContracts(
|
|
238
|
+
address[] calldata contractAddresses,
|
|
239
|
+
bytes32[] calldata coreVersions,
|
|
240
|
+
bytes32[] calldata coreTypes
|
|
241
|
+
) external onlyOwner {
|
|
242
|
+
// @dev pure forwarding - input validation is done in the core registry
|
|
243
|
+
ICoreRegistryV1(coreRegistry).registerContracts({
|
|
244
|
+
contractAddresses: contractAddresses,
|
|
245
|
+
coreVersions: coreVersions,
|
|
246
|
+
coreTypes: coreTypes
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @notice Unregisters multiple contracts from the core registry.
|
|
252
|
+
* @param contractAddresses An array of contract addresses to unregister.
|
|
253
|
+
*/
|
|
254
|
+
function unregisterMultipleContracts(
|
|
255
|
+
address[] calldata contractAddresses
|
|
256
|
+
) external onlyOwner {
|
|
257
|
+
// @dev pure forwarding - input validation is done in the core registry
|
|
258
|
+
ICoreRegistryV1(coreRegistry).unregisterContracts(contractAddresses);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @notice Abandons the contract, preventing it from being used to create
|
|
263
|
+
* new Engine and Engine Flex contracts.
|
|
264
|
+
* Only callable by the owner, and only once; reverts otherwise.
|
|
265
|
+
*/
|
|
266
|
+
function abandon() external onlyOwner {
|
|
267
|
+
require(!isAbandoned, "factory is abandoned");
|
|
268
|
+
// set isAbandoned to true
|
|
269
|
+
isAbandoned = true;
|
|
270
|
+
// emit event
|
|
271
|
+
emit Abandoned();
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @dev This contract is not intended to hold funds. This function,
|
|
276
|
+
* `drainETH`, and `drainERC20` are implemented to prevent the loss
|
|
277
|
+
* of funds that might be sent to this contract inadvertently.
|
|
278
|
+
*/
|
|
279
|
+
receive() external payable {}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @notice Drains the contract's balance to the `recipient`.
|
|
283
|
+
* @param recipient The address to send funds to.
|
|
284
|
+
* Only callable by the owner.
|
|
285
|
+
*/
|
|
286
|
+
function drainETH(address payable recipient) external onlyOwner {
|
|
287
|
+
uint256 balance = address(this).balance;
|
|
288
|
+
if (balance > 0) {
|
|
289
|
+
(bool success, ) = recipient.call{value: balance}("");
|
|
290
|
+
require(success, "Payment failed");
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @notice Drains the contract's balance of an input ERC20 token to
|
|
296
|
+
* the `recipient`.
|
|
297
|
+
* @param ERC20TokenAddress The address of the ERC20 token to withdraw.
|
|
298
|
+
* @param recipient The address to send ERC20 tokens to.
|
|
299
|
+
* Only callable by the owner.
|
|
300
|
+
*/
|
|
301
|
+
function drainERC20(
|
|
302
|
+
address ERC20TokenAddress,
|
|
303
|
+
address recipient
|
|
304
|
+
) external onlyOwner {
|
|
305
|
+
IERC20 token = IERC20(ERC20TokenAddress);
|
|
306
|
+
uint256 balance = token.balanceOf(address(this));
|
|
307
|
+
if (balance > 0) {
|
|
308
|
+
SafeERC20.safeTransfer({
|
|
309
|
+
token: token,
|
|
310
|
+
to: recipient,
|
|
311
|
+
value: balance
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @notice Execute a batch of calls.
|
|
318
|
+
* @dev The calls are executed in order, reverting if any of them fails. Can
|
|
319
|
+
* only be called by the owner. It is safe to check ownership only once here
|
|
320
|
+
* because the owner status is only used to gate access to the function, not
|
|
321
|
+
* to validate each individual call. Even if ownership is transferred during
|
|
322
|
+
* the sequence of calls, it does not affect the execution logic or security,
|
|
323
|
+
* as ownership is solely used to prevent unauthorized use of this batch
|
|
324
|
+
* execution capability. This is particularly useful to safely interact
|
|
325
|
+
* with contracts or addresses that might deem this contract eligible for
|
|
326
|
+
* airdrops, thereby avoiding loss of funds.
|
|
327
|
+
* @param _calls The calls to execute
|
|
328
|
+
*/
|
|
329
|
+
function execCalls(
|
|
330
|
+
Call[] calldata _calls
|
|
331
|
+
)
|
|
332
|
+
external
|
|
333
|
+
onlyOwner
|
|
334
|
+
returns (uint256 blockNumber, bytes[] memory returnData)
|
|
335
|
+
{
|
|
336
|
+
blockNumber = block.number;
|
|
337
|
+
uint256 length = _calls.length;
|
|
338
|
+
returnData = new bytes[](length);
|
|
339
|
+
|
|
340
|
+
for (uint256 i = 0; i < length; ++i) {
|
|
341
|
+
Call calldata calli = _calls[i];
|
|
342
|
+
|
|
343
|
+
// check for existence of code at the target address
|
|
344
|
+
if (calli.to.code.length == 0) {
|
|
345
|
+
// when the call is to an EOA, the calldata must be empty.
|
|
346
|
+
require(calli.data.length == 0, "Invalid call data");
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
(bool success, bytes memory data) = calli.to.call(calli.data);
|
|
350
|
+
require(success, string(data));
|
|
351
|
+
returnData[i] = data;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @dev Predict the deterministic address for a new core contract of type
|
|
357
|
+
* `engineCoreContractType` and salt `salt`, deployed using the function
|
|
358
|
+
* `createEngineContract`.
|
|
359
|
+
* Reverts if `salt` is null, because the factory generates a pseudorandom
|
|
360
|
+
* salt in that case.
|
|
361
|
+
* @param engineCoreContractType Type of Engine Core contract.
|
|
362
|
+
* @param salt Salt used to deterministically deploy the clone.
|
|
363
|
+
*/
|
|
364
|
+
function predictDeterministicAddress(
|
|
365
|
+
IEngineFactoryV0.EngineCoreType engineCoreContractType,
|
|
366
|
+
bytes32 salt
|
|
367
|
+
) external view returns (address predicted) {
|
|
368
|
+
// cannot predict if salt is null, because factory generates pseudorandom salt
|
|
369
|
+
if (salt == bytes32(0)) {
|
|
370
|
+
revert("null salt = pseudorandom addr");
|
|
371
|
+
}
|
|
372
|
+
return
|
|
373
|
+
Clones.predictDeterministicAddress({
|
|
374
|
+
implementation: engineCoreContractType ==
|
|
375
|
+
IEngineFactoryV0.EngineCoreType.Engine
|
|
376
|
+
? engineImplementation
|
|
377
|
+
: engineFlexImplementation,
|
|
378
|
+
salt: salt
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* @notice helper function to generate a pseudorandom salt
|
|
384
|
+
* @return result pseudorandom salt
|
|
385
|
+
*/
|
|
386
|
+
function _generatePseudorandomSalt() internal returns (bytes32 result) {
|
|
387
|
+
// get and increment nonce to prevent same-block collisions
|
|
388
|
+
uint256 nonce = _pseudorandomSaltNonce++;
|
|
389
|
+
return
|
|
390
|
+
keccak256(
|
|
391
|
+
abi.encodePacked(
|
|
392
|
+
nonce,
|
|
393
|
+
block.timestamp,
|
|
394
|
+
block.number,
|
|
395
|
+
address(this)
|
|
396
|
+
)
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @notice helper function to convert a string to a bytes32.
|
|
402
|
+
* Caution: This function only works properly for short strings.
|
|
403
|
+
* @param source string to convert
|
|
404
|
+
* @return result bytes32 representation of the string
|
|
405
|
+
*/
|
|
406
|
+
function _stringToBytes32(
|
|
407
|
+
string memory source
|
|
408
|
+
) internal pure returns (bytes32 result) {
|
|
409
|
+
bytes memory tempString = bytes(source);
|
|
410
|
+
if (tempString.length == 0) {
|
|
411
|
+
return 0x0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
assembly {
|
|
415
|
+
result := mload(add(source, 32))
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @notice helper function to validate that an address is non-zero.
|
|
421
|
+
* Reverts if the address is zero.
|
|
422
|
+
* @param address_ address to validate
|
|
423
|
+
*/
|
|
424
|
+
function _onlyNonZeroAddress(address address_) internal pure {
|
|
425
|
+
require(address_ != address(0), "Must input non-zero address");
|
|
426
|
+
}
|
|
427
|
+
}
|