@artblocks/contracts 1.1.0 → 1.2.0
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 +75 -7
- package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +273 -155
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +2047 -0
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +2021 -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 +31 -63
- 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 +606 -0
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +567 -206
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +787 -224
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +38 -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 +38 -8
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +36 -68
- package/artifacts/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -0
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +130 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +58 -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 +30 -62
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +30 -62
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +170 -104
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +170 -104
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1028 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +741 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +18 -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/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/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 +208 -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/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/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/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/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/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/DependencyRegistryV0.sol +687 -408
- 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 +419 -0
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +894 -488
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1054 -650
- 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/interfaces/v0.8.x/IAdminACLV0_Extended.sol +20 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +23 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +47 -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 +115 -11
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +84 -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/IGenArt721Minter_PBAB.sol +91 -0
- package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +20 -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/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/DependencyRegistryStorageLib.sol +90 -0
- package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
- package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +591 -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/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 +21 -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/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/mock/BytecodeV2LibCallsMock.sol +128 -0
- package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -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/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 +62 -34
- 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,316 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.19;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import {BytecodeStorageWriter, BytecodeStorageReader} from "../libs/v0.8.x/BytecodeStorageV2.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Art Blocks BytecodeTextCR_DMock.
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice This contract serves as a mock client of the BytecodeStorageV2 library
|
|
12
|
+
* to allow for more granular testing of this library than is supported
|
|
13
|
+
* by the usage of the library directly by specific current Art Blocks
|
|
14
|
+
* client smart contracts, such as the `GenArt721CoreV3` contract. This
|
|
15
|
+
* mock exposes the CR_D (create, read, _not updates_, delete)
|
|
16
|
+
* operations that the underlying BytecodeStorageV2 library allows clients
|
|
17
|
+
* to support.
|
|
18
|
+
* Note that because updates can only functionally be performed by
|
|
19
|
+
* combining a "delete" and "create" operation, given that deployed
|
|
20
|
+
* contracts cannot be _updated_ directly in chain-state, this mock does
|
|
21
|
+
* not expose updates (the usual "U" in "CRUD") as they are not
|
|
22
|
+
* supported by the underlying library.
|
|
23
|
+
*/
|
|
24
|
+
contract BytecodeV2TextCR_DMock {
|
|
25
|
+
using BytecodeStorageWriter for string;
|
|
26
|
+
using BytecodeStorageReader for string;
|
|
27
|
+
using BytecodeStorageWriter for bytes;
|
|
28
|
+
|
|
29
|
+
// monotonically increasing slot counter and associated slot-storage mapping
|
|
30
|
+
uint256 public nextTextSlotId = 0;
|
|
31
|
+
mapping(uint256 => address) public storedTextBytecodeAddresses;
|
|
32
|
+
|
|
33
|
+
// save deployer address to support basic ACL checks for non-read operations
|
|
34
|
+
address public deployerAddress;
|
|
35
|
+
|
|
36
|
+
// dummy counter to implement non-view read function for gas measurements of large reads (RPC compatibility)
|
|
37
|
+
uint256 private _dummyCounter;
|
|
38
|
+
|
|
39
|
+
modifier onlyDeployer() {
|
|
40
|
+
require(msg.sender == deployerAddress, "Only deployer");
|
|
41
|
+
_;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @notice Initializes contract.
|
|
46
|
+
*/
|
|
47
|
+
constructor() {
|
|
48
|
+
deployerAddress = msg.sender;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*//////////////////////////////////////////////////////////////
|
|
52
|
+
Create Read _ Delete
|
|
53
|
+
//////////////////////////////////////////////////////////////*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @notice "Create": Adds a chunk of text to be stored to chain-state.
|
|
57
|
+
* @param _text Text to be created in chain-state.
|
|
58
|
+
* @return uint256 Slot that the written bytecode contract address was
|
|
59
|
+
* stored in.
|
|
60
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
61
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
62
|
+
*/
|
|
63
|
+
function createText(
|
|
64
|
+
string memory _text
|
|
65
|
+
) external onlyDeployer returns (uint256) {
|
|
66
|
+
// store text in contract bytecode
|
|
67
|
+
storedTextBytecodeAddresses[nextTextSlotId] = _text.writeToBytecode();
|
|
68
|
+
// record written slot before incrementing
|
|
69
|
+
uint256 textSlotId = nextTextSlotId;
|
|
70
|
+
nextTextSlotId++;
|
|
71
|
+
return textSlotId;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @notice "Create": Adds a chunk of text to be stored to chain-state.
|
|
76
|
+
* @param _textCompressed Compressed bytes representing text to be created in chain-state.
|
|
77
|
+
* @return uint256 Slot that the written bytecode contract address was
|
|
78
|
+
* stored in.
|
|
79
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
80
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
81
|
+
*/
|
|
82
|
+
function createTextCompressed(
|
|
83
|
+
bytes memory _textCompressed
|
|
84
|
+
) external onlyDeployer returns (uint256) {
|
|
85
|
+
// store compressed text in contract bytecode
|
|
86
|
+
storedTextBytecodeAddresses[nextTextSlotId] = _textCompressed
|
|
87
|
+
.writeToBytecodeCompressed();
|
|
88
|
+
// record written slot before incrementing
|
|
89
|
+
uint256 textSlotId = nextTextSlotId;
|
|
90
|
+
nextTextSlotId++;
|
|
91
|
+
return textSlotId;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @notice "Read": Reads chunk of text currently in the provided slot, from
|
|
96
|
+
* chain-state.
|
|
97
|
+
* @param _textSlotId Slot (associated with this contract) for which to
|
|
98
|
+
* read text content.
|
|
99
|
+
* @return string Content read from contract bytecode in the given slot.
|
|
100
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
101
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
102
|
+
*/
|
|
103
|
+
function readText(uint256 _textSlotId) public view returns (string memory) {
|
|
104
|
+
return
|
|
105
|
+
BytecodeStorageReader.readFromBytecode(
|
|
106
|
+
storedTextBytecodeAddresses[_textSlotId]
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @notice "Delete": Deletes chunk of text currently in the provided slot,
|
|
112
|
+
* from chain-state.
|
|
113
|
+
* @param _textSlotId Slot (associated with this contract) for which to
|
|
114
|
+
* delete text content.
|
|
115
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
116
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
117
|
+
*/
|
|
118
|
+
function deleteText(uint256 _textSlotId) external onlyDeployer {
|
|
119
|
+
// delete reference to old storage contract address
|
|
120
|
+
delete storedTextBytecodeAddresses[_textSlotId];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @notice function to assist in getting compressed text in a non-view function.
|
|
125
|
+
* Useful for measuring gas costs of large reads in RPC environments.
|
|
126
|
+
* @param _text Text to be compressed.
|
|
127
|
+
*/
|
|
128
|
+
function getCompressedNonView(
|
|
129
|
+
string memory _text
|
|
130
|
+
) external returns (bytes memory) {
|
|
131
|
+
// non-view dummy portion of the function
|
|
132
|
+
_dummyCounter++;
|
|
133
|
+
// read compressed text from chain-state
|
|
134
|
+
return _text.getCompressed();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
139
|
+
* from chain-state that lives at a given deployed address.
|
|
140
|
+
* Non-view variant to easily measure gas costs of large reads.
|
|
141
|
+
* @param _textSlotId Slot (associated with this contract) for which to
|
|
142
|
+
* read text content.
|
|
143
|
+
* @return string Content read from contract bytecode in the given slot.
|
|
144
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
145
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
146
|
+
*/
|
|
147
|
+
function readTextNonView(
|
|
148
|
+
uint256 _textSlotId
|
|
149
|
+
) external returns (string memory) {
|
|
150
|
+
// non-view dummy portion of the function
|
|
151
|
+
_dummyCounter++;
|
|
152
|
+
// read text from chain-state
|
|
153
|
+
return
|
|
154
|
+
BytecodeStorageReader.readFromBytecode(
|
|
155
|
+
storedTextBytecodeAddresses[_textSlotId]
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*//////////////////////////////////////////////////////////////
|
|
160
|
+
Additional Introspection
|
|
161
|
+
//////////////////////////////////////////////////////////////*/
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
165
|
+
* from chain-state that lives at a given deployed address.
|
|
166
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
167
|
+
* @return string Content read from contract bytecode at the given address.
|
|
168
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
169
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
170
|
+
*/
|
|
171
|
+
function readTextAtAddress(
|
|
172
|
+
address _bytecodeAddress
|
|
173
|
+
) public view returns (string memory) {
|
|
174
|
+
return BytecodeStorageReader.readFromBytecode(_bytecodeAddress);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
179
|
+
* from chain-state that lives at a given deployed address with an
|
|
180
|
+
* explicitly provided `_offset`.
|
|
181
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
182
|
+
* @param _offset Offset to read from in contract bytecode,
|
|
183
|
+
* explicitly provided (not calculated)
|
|
184
|
+
* @return string Content read from contract bytecode at the given address.
|
|
185
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
186
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
187
|
+
*/
|
|
188
|
+
function forceReadTextAtAddress(
|
|
189
|
+
address _bytecodeAddress,
|
|
190
|
+
uint256 _offset
|
|
191
|
+
) public view returns (string memory) {
|
|
192
|
+
return
|
|
193
|
+
string(
|
|
194
|
+
BytecodeStorageReader.readBytesFromBytecode(
|
|
195
|
+
_bytecodeAddress,
|
|
196
|
+
_offset
|
|
197
|
+
)
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
203
|
+
* from chain-state that lives at a given deployed address that
|
|
204
|
+
* was written with SSTORE2.
|
|
205
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
206
|
+
* @return string Content read from contract bytecode at the given address.
|
|
207
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
208
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
209
|
+
*/
|
|
210
|
+
function readSSTORE2TextAtAddress(
|
|
211
|
+
address _bytecodeAddress
|
|
212
|
+
) public view returns (string memory) {
|
|
213
|
+
return
|
|
214
|
+
string(
|
|
215
|
+
BytecodeStorageReader.readBytesFromSSTORE2Bytecode(
|
|
216
|
+
_bytecodeAddress
|
|
217
|
+
)
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @notice Allows introspection of who deployed a given contracts-as-storage
|
|
223
|
+
* contract, based on a provided `_bytecodeAddress`.
|
|
224
|
+
* @param _bytecodeAddress address for which to read the author address.
|
|
225
|
+
* @return address of the author who wrote the data contained in the
|
|
226
|
+
* given `_bytecodeAddress` contract.
|
|
227
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
228
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
229
|
+
*/
|
|
230
|
+
function readAuthorForTextAtAddress(
|
|
231
|
+
address _bytecodeAddress
|
|
232
|
+
) public view returns (address) {
|
|
233
|
+
return
|
|
234
|
+
BytecodeStorageReader.getWriterAddressForBytecode(_bytecodeAddress);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @notice Allows introspection of the version of a given contracts-as-storage
|
|
239
|
+
* contract, based on a provided `_bytecodeAddress`.
|
|
240
|
+
* @param _bytecodeAddress address for which to read the version.
|
|
241
|
+
* @return bytes32 version of the version string contained in the given `_bytecodeAddress`
|
|
242
|
+
* contract.
|
|
243
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
244
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
245
|
+
*/
|
|
246
|
+
function readLibraryVersionForTextAtAddress(
|
|
247
|
+
address _bytecodeAddress
|
|
248
|
+
) public view returns (bytes32) {
|
|
249
|
+
return
|
|
250
|
+
BytecodeStorageReader.getLibraryVersionForBytecode(
|
|
251
|
+
_bytecodeAddress
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @notice Allows introspection of if stored data are in compressed format of a given
|
|
257
|
+
* contracts-as-storage contract, based on a provided `_bytecodeAddress`.
|
|
258
|
+
* @param _bytecodeAddress address for which to read the version.
|
|
259
|
+
* @return bool indicating if data are stored in compressed format in the given
|
|
260
|
+
* `_bytecodeAddress` contract.
|
|
261
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
262
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
263
|
+
*/
|
|
264
|
+
function readIsCompressedForTextAtAddress(
|
|
265
|
+
address _bytecodeAddress
|
|
266
|
+
) public view returns (bool) {
|
|
267
|
+
return
|
|
268
|
+
BytecodeStorageReader.getIsCompressedForBytecode(_bytecodeAddress);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function getCompressed(
|
|
272
|
+
string memory _text
|
|
273
|
+
) public pure returns (bytes memory) {
|
|
274
|
+
return _text.getCompressed();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @notice Allows additional internal purge-logic introspection, by allowing
|
|
279
|
+
* for the sending of arbitrary data from this contract to the
|
|
280
|
+
* provided existing `_bytecodeAddress`.
|
|
281
|
+
* @param _bytecodeAddress address for which to send call data.
|
|
282
|
+
* @param _data aribtrary data to send as call-data for raw `.call`.
|
|
283
|
+
* @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
|
|
284
|
+
*/
|
|
285
|
+
function callWithNonsenseData(
|
|
286
|
+
address _bytecodeAddress,
|
|
287
|
+
bytes memory _data
|
|
288
|
+
) external onlyDeployer {
|
|
289
|
+
(bool success /* `data` not needed */, ) = _bytecodeAddress.call(_data);
|
|
290
|
+
if (success) {
|
|
291
|
+
// WARNING - This implementation does not make use of the low-level
|
|
292
|
+
// call return result indicating success/failure. This is
|
|
293
|
+
// contrary to best practice but is OK in this instance as
|
|
294
|
+
// this method IS NOT SECURE AND SHOULD NOT BE USED IN
|
|
295
|
+
// PRODUCTION under any normal circumstances.
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* @notice Allows additional internal purge-logic introspection, by allowing
|
|
301
|
+
* for the sending of raw calls (with no data) from this contract to
|
|
302
|
+
* the provided existing `_bytecodeAddress`.
|
|
303
|
+
* @param _bytecodeAddress address for which to send call data.
|
|
304
|
+
* @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
|
|
305
|
+
*/
|
|
306
|
+
function callWithoutData(address _bytecodeAddress) external onlyDeployer {
|
|
307
|
+
(bool success /* `data` not needed */, ) = _bytecodeAddress.call("");
|
|
308
|
+
if (success) {
|
|
309
|
+
// WARNING - This implementation does not make use of the low-level
|
|
310
|
+
// call return result indicating success/failure. This is
|
|
311
|
+
// contrary to best practice but is OK in this instance as
|
|
312
|
+
// this method IS NOT SECURE AND SHOULD NOT BE USED IN
|
|
313
|
+
// PRODUCTION under any normal circumstances.
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.19;
|
|
4
|
+
|
|
5
|
+
import {SplitFundsLib} from "../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @dev Mock contract for testing purposes.
|
|
9
|
+
* This contract exposes a payable function that force-sends ETH to a target
|
|
10
|
+
* address.
|
|
11
|
+
*/
|
|
12
|
+
contract ForceSendMock {
|
|
13
|
+
// @dev forwards msg.value to target address
|
|
14
|
+
function forceSendETH(address target) external payable {
|
|
15
|
+
SplitFundsLib.forceSafeTransferETH({
|
|
16
|
+
to: target,
|
|
17
|
+
amount: msg.value,
|
|
18
|
+
// induce force-send by having a low gas limit
|
|
19
|
+
minterRefundGasLimit: 1_000
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.22;
|
|
4
|
+
|
|
5
|
+
import "../interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol";
|
|
6
|
+
import {Mock0xSplitsV2Splitter} from "./Mock0xSplitsV2Splitter.sol";
|
|
7
|
+
|
|
8
|
+
import {Create2} from "@openzeppelin-5.0/contracts/utils/Create2.sol";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @dev Mock contract for testing purposes.
|
|
12
|
+
* This contract implements a mock version of the splitter factory deployed
|
|
13
|
+
* by 0xSplits V2.
|
|
14
|
+
* Behaviors are not exactly the same as the production version of the contract
|
|
15
|
+
* and are implemented for integration and testing purposes.
|
|
16
|
+
*/
|
|
17
|
+
contract Mock0xSplitsV2PullFactory is ISplitFactoryV2 {
|
|
18
|
+
/**
|
|
19
|
+
* @notice Create a new split with params and owner.
|
|
20
|
+
* For testing purposes only.
|
|
21
|
+
* @dev This function is not implemented exactly like 0xSplits V2 factory, but is
|
|
22
|
+
* sufficient for testing purposes.
|
|
23
|
+
* @param _splitParams Params to create split with.
|
|
24
|
+
* @param _owner Owner of created split.
|
|
25
|
+
* @param _creator Creator of created split.
|
|
26
|
+
* @param _salt Salt for create2.
|
|
27
|
+
* @return split Address of the created split.
|
|
28
|
+
*/
|
|
29
|
+
function createSplitDeterministic(
|
|
30
|
+
Split calldata _splitParams,
|
|
31
|
+
address _owner,
|
|
32
|
+
address _creator,
|
|
33
|
+
bytes32 _salt
|
|
34
|
+
) external returns (address split) {
|
|
35
|
+
require(_creator != address(0), "Invalid creator");
|
|
36
|
+
// deploy + initialize
|
|
37
|
+
address newSplitter = Create2.deploy({
|
|
38
|
+
amount: 0,
|
|
39
|
+
salt: _getFakeMockHash(_splitParams, _owner, _salt),
|
|
40
|
+
bytecode: type(Mock0xSplitsV2Splitter).creationCode
|
|
41
|
+
});
|
|
42
|
+
Mock0xSplitsV2Splitter(newSplitter).initialize(_splitParams, _owner);
|
|
43
|
+
return newSplitter;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @notice Predict the address of a new split and check if it is deployed.
|
|
48
|
+
* For testing purposes only, namely, this function is not equivalent to the
|
|
49
|
+
* implementation shipped for 0xSplits V2, and is only for testing purposes.
|
|
50
|
+
* @param _splitParams Params to create split with.
|
|
51
|
+
* @param _owner Owner of created split.
|
|
52
|
+
* @param _salt Salt for create2.
|
|
53
|
+
*/
|
|
54
|
+
function isDeployed(
|
|
55
|
+
Split calldata _splitParams,
|
|
56
|
+
address _owner,
|
|
57
|
+
bytes32 _salt
|
|
58
|
+
) external view returns (address split, bool exists) {
|
|
59
|
+
address predictedSplitter = Create2.computeAddress({
|
|
60
|
+
salt: _getFakeMockHash(_splitParams, _owner, _salt),
|
|
61
|
+
bytecodeHash: keccak256(type(Mock0xSplitsV2Splitter).creationCode)
|
|
62
|
+
});
|
|
63
|
+
return (predictedSplitter, predictedSplitter.code.length > 0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// this gets a fack hash with all split and owner params for testing purposes,
|
|
67
|
+
// and does not match 0xSplits implementation
|
|
68
|
+
function _getFakeMockHash(
|
|
69
|
+
Split memory splitParams,
|
|
70
|
+
address owner,
|
|
71
|
+
bytes32 salt
|
|
72
|
+
) private pure returns (bytes32) {
|
|
73
|
+
return keccak256(abi.encode(splitParams, owner, salt));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.22;
|
|
4
|
+
|
|
5
|
+
import "../interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @dev Mock contract for testing purposes.
|
|
9
|
+
* This contract implements a mock version of a splitter deployed
|
|
10
|
+
* by 0xSplits V2.
|
|
11
|
+
* Behaviors are not the same as the production version of the contract
|
|
12
|
+
* and are implemented for integration and testing purposes.
|
|
13
|
+
* Notably, this contract is not actually a splitter, but more of an introspection
|
|
14
|
+
* contract for testing purposes.
|
|
15
|
+
*/
|
|
16
|
+
contract Mock0xSplitsV2Splitter {
|
|
17
|
+
ISplitFactoryV2.Split private _splitParams;
|
|
18
|
+
address private _owner;
|
|
19
|
+
bool private _isInitialized;
|
|
20
|
+
|
|
21
|
+
function initialize(
|
|
22
|
+
ISplitFactoryV2.Split memory splitParams,
|
|
23
|
+
address owner
|
|
24
|
+
) external {
|
|
25
|
+
_splitParams = splitParams;
|
|
26
|
+
_owner = owner;
|
|
27
|
+
_isInitialized = true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getSplitParams()
|
|
31
|
+
external
|
|
32
|
+
view
|
|
33
|
+
returns (ISplitFactoryV2.Split memory)
|
|
34
|
+
{
|
|
35
|
+
_onlyInitialized();
|
|
36
|
+
return _splitParams;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getOwner() external view returns (address) {
|
|
40
|
+
_onlyInitialized();
|
|
41
|
+
return _owner;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _onlyInitialized() private view {
|
|
45
|
+
require(_isInitialized, "Splitter not initialized");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -54,6 +54,27 @@ contract MockAdminACLV0Events is IAdminACLV0, ERC165 {
|
|
|
54
54
|
Ownable(_contract).transferOwnership(_newAdminACL);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* @notice Allows superAdmin change the superAdmin address.
|
|
59
|
+
* @param _newSuperAdmin The new superAdmin address.
|
|
60
|
+
* @param _genArt721CoreAddressesToUpdate Array of genArt721Core
|
|
61
|
+
* addresses to update to the new superAdmin, for indexing purposes only.
|
|
62
|
+
* @dev this function is gated to only superAdmin address.
|
|
63
|
+
*/
|
|
64
|
+
function changeSuperAdmin(
|
|
65
|
+
address _newSuperAdmin,
|
|
66
|
+
address[] calldata _genArt721CoreAddressesToUpdate
|
|
67
|
+
) external {
|
|
68
|
+
require(msg.sender == superAdmin, "Only superAdmin");
|
|
69
|
+
address previousSuperAdmin = superAdmin;
|
|
70
|
+
superAdmin = _newSuperAdmin;
|
|
71
|
+
emit SuperAdminTransferred(
|
|
72
|
+
previousSuperAdmin,
|
|
73
|
+
_newSuperAdmin,
|
|
74
|
+
_genArt721CoreAddressesToUpdate
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
57
78
|
/**
|
|
58
79
|
* @dev Allows superAdmin to call renounceOwnership on other contract from
|
|
59
80
|
* this contract.
|
|
@@ -63,6 +63,27 @@ contract MockAdminACLV0Events_PROHIBITION is IAdminACLV0_PROHIBITION, ERC165 {
|
|
|
63
63
|
contractArtistApprovals[hashArtistApprovalKey(_contract, _caller)];
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @notice Allows superAdmin change the superAdmin address.
|
|
68
|
+
* @param _newSuperAdmin The new superAdmin address.
|
|
69
|
+
* @param _genArt721CoreAddressesToUpdate Array of genArt721Core
|
|
70
|
+
* addresses to update to the new superAdmin, for indexing purposes only.
|
|
71
|
+
* @dev this function is gated to only superAdmin address.
|
|
72
|
+
*/
|
|
73
|
+
function changeSuperAdmin(
|
|
74
|
+
address _newSuperAdmin,
|
|
75
|
+
address[] calldata _genArt721CoreAddressesToUpdate
|
|
76
|
+
) external {
|
|
77
|
+
require(msg.sender == superAdmin, "Only superAdmin");
|
|
78
|
+
address previousSuperAdmin = superAdmin;
|
|
79
|
+
superAdmin = _newSuperAdmin;
|
|
80
|
+
emit SuperAdminTransferred(
|
|
81
|
+
previousSuperAdmin,
|
|
82
|
+
_newSuperAdmin,
|
|
83
|
+
_genArt721CoreAddressesToUpdate
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
66
87
|
/**
|
|
67
88
|
* @dev Allows superAdmin to set a contract function caller.
|
|
68
89
|
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
import "../interfaces/v0.8.x/IGenArt721Minter_PBAB.sol";
|
|
5
|
+
|
|
6
|
+
pragma solidity ^0.8.0;
|
|
7
|
+
|
|
8
|
+
contract ReentrancyGenArt721MinterMock {
|
|
9
|
+
uint256 public currentQtyToPurchase;
|
|
10
|
+
uint256 public currentProjectId;
|
|
11
|
+
uint256 public currentPriceToPay;
|
|
12
|
+
address public currencyAddress;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
@notice This function can be called to induce controlled reentrency attacks
|
|
16
|
+
on AB minter filter suite.
|
|
17
|
+
Note that _priceToPay should be > project price per token to induce refund,
|
|
18
|
+
making reentrency possible via fallback function.
|
|
19
|
+
*/
|
|
20
|
+
function attack(
|
|
21
|
+
uint256 _qtyToPurchase,
|
|
22
|
+
address _minterContractAddress,
|
|
23
|
+
uint256 _projectId,
|
|
24
|
+
uint256 _priceToPay,
|
|
25
|
+
address _currencyAddress
|
|
26
|
+
) external payable {
|
|
27
|
+
currentQtyToPurchase = _qtyToPurchase;
|
|
28
|
+
currentProjectId = _projectId;
|
|
29
|
+
currentPriceToPay = _priceToPay;
|
|
30
|
+
currencyAddress = _currencyAddress;
|
|
31
|
+
IGenArt721Minter_PBAB(_minterContractAddress).purchase{
|
|
32
|
+
value: _priceToPay
|
|
33
|
+
}(_projectId, _priceToPay, _currencyAddress);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// receiver is called when minter sends refunded Ether to this contract.
|
|
37
|
+
receive() external payable {
|
|
38
|
+
// decrement num to be purchased
|
|
39
|
+
currentQtyToPurchase--;
|
|
40
|
+
if (currentQtyToPurchase > 0) {
|
|
41
|
+
// purchase again!
|
|
42
|
+
IGenArt721Minter_PBAB(msg.sender).purchase{
|
|
43
|
+
value: currentPriceToPay
|
|
44
|
+
}(currentProjectId, currentPriceToPay, currencyAddress);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
import "../interfaces/v0.8.x/ISplitAtomicV0.sol";
|
|
5
|
+
|
|
6
|
+
pragma solidity ^0.8.0;
|
|
7
|
+
|
|
8
|
+
contract ReentrancySplitterSendETHMock {
|
|
9
|
+
address public currentSplitterAddress;
|
|
10
|
+
bool public haveReentered;
|
|
11
|
+
|
|
12
|
+
receive() external payable {
|
|
13
|
+
// only re-enter once to prevent infinite loop
|
|
14
|
+
if (haveReentered) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// update state
|
|
18
|
+
haveReentered = true;
|
|
19
|
+
// re-enter via sending ETH to splitter's receive function
|
|
20
|
+
(bool success, ) = currentSplitterAddress.call{value: msg.value}("");
|
|
21
|
+
require(success, "attack failed");
|
|
22
|
+
// reset state
|
|
23
|
+
haveReentered = false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
@notice This function can be called to induce controlled reentrency attacks
|
|
28
|
+
on AB minter filter suite.
|
|
29
|
+
Note that _priceToPay should be > project price per token to induce refund,
|
|
30
|
+
making reentrency possible via fallback function.
|
|
31
|
+
*/
|
|
32
|
+
function attack(address splitterAddress) external payable {
|
|
33
|
+
currentSplitterAddress = splitterAddress;
|
|
34
|
+
(bool success, ) = splitterAddress.call{value: msg.value}("");
|
|
35
|
+
require(success, "attack failed");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
contract ReentrancySplitterDrainETHMock {
|
|
40
|
+
address public currentSplitterAddress;
|
|
41
|
+
bool public haveReentered;
|
|
42
|
+
|
|
43
|
+
receive() external payable {
|
|
44
|
+
// only re-enter once to prevent infinite loop
|
|
45
|
+
if (haveReentered) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// update state
|
|
49
|
+
haveReentered = true;
|
|
50
|
+
// re-enter via calling splitter's drainETH function
|
|
51
|
+
ISplitAtomicV0(currentSplitterAddress).drainETH();
|
|
52
|
+
// reset state
|
|
53
|
+
haveReentered = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
@notice This function can be called to induce controlled reentrency attacks
|
|
58
|
+
on AB minter filter suite.
|
|
59
|
+
Note that _priceToPay should be > project price per token to induce refund,
|
|
60
|
+
making reentrency possible via fallback function.
|
|
61
|
+
*/
|
|
62
|
+
function attack(address splitterAddress) external payable {
|
|
63
|
+
currentSplitterAddress = splitterAddress;
|
|
64
|
+
(bool success, ) = splitterAddress.call{value: msg.value}("");
|
|
65
|
+
require(success, "attack failed");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -10,7 +10,7 @@ import "../../interfaces/v0.8.x/IPseudorandomAtomic.sol";
|
|
|
10
10
|
* @author Art Blocks Inc.
|
|
11
11
|
* @notice This contract atomically returns a pseudorandom value.
|
|
12
12
|
*/
|
|
13
|
-
contract PseudorandomAtomic {
|
|
13
|
+
contract PseudorandomAtomic is IPseudorandomAtomic {
|
|
14
14
|
// base class that returns
|
|
15
15
|
function getPseudorandomAtomic(
|
|
16
16
|
bytes32 _entropy
|
|
@@ -248,7 +248,7 @@ contract SharedRandomizerV0 is ISharedRandomizerV0 {
|
|
|
248
248
|
function _getPseudorandomAtomic(
|
|
249
249
|
address coreContract,
|
|
250
250
|
uint256 tokenId
|
|
251
|
-
) internal
|
|
251
|
+
) internal returns (bytes32) {
|
|
252
252
|
return
|
|
253
253
|
pseudorandomAtomicContract.getPseudorandomAtomic(
|
|
254
254
|
keccak256(abi.encodePacked(coreContract, tokenId))
|