@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
|
@@ -132,15 +132,10 @@ library DALinLib {
|
|
|
132
132
|
uint256 projectId,
|
|
133
133
|
address coreContract
|
|
134
134
|
) internal {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
DAProjectConfig_.timestampStart = 0;
|
|
141
|
-
DAProjectConfig_.timestampEnd = 0;
|
|
142
|
-
DAProjectConfig_.startPrice = 0;
|
|
143
|
-
DAProjectConfig_.basePrice = 0;
|
|
135
|
+
// @dev all fields must be deleted, and none of them are a complex type
|
|
136
|
+
// @dev getDAProjectConfig not used, as deletion of storage pointers is
|
|
137
|
+
// not supported
|
|
138
|
+
delete s().DAProjectConfigs_[coreContract][projectId];
|
|
144
139
|
|
|
145
140
|
emit DALib.ResetAuctionDetails({
|
|
146
141
|
projectId: projectId,
|
|
@@ -13,11 +13,11 @@ pragma solidity ^0.8.0;
|
|
|
13
13
|
*/
|
|
14
14
|
library GenericMinterEventsLib {
|
|
15
15
|
/**
|
|
16
|
-
* @notice Generic project minter configuration event.
|
|
16
|
+
* @notice Generic project minter configuration event. Removed key `key`
|
|
17
17
|
* for project `projectId`.
|
|
18
|
-
* @param projectId Project ID
|
|
18
|
+
* @param projectId Project ID key was removed for
|
|
19
19
|
* @param coreContract Core contract address that projectId is on
|
|
20
|
-
* @param key Key
|
|
20
|
+
* @param key Key removed
|
|
21
21
|
*/
|
|
22
22
|
event ConfigKeyRemoved(
|
|
23
23
|
uint256 indexed projectId,
|
|
@@ -26,12 +26,12 @@ library GenericMinterEventsLib {
|
|
|
26
26
|
);
|
|
27
27
|
/// BOOL
|
|
28
28
|
/**
|
|
29
|
-
* @notice Generic project minter configuration event.
|
|
30
|
-
* `key` to `value` for project `projectId`.
|
|
31
|
-
* @param projectId Project ID
|
|
29
|
+
* @notice Generic project minter configuration event. Value of key
|
|
30
|
+
* `key` was set to `value` for project `projectId`.
|
|
31
|
+
* @param projectId Project ID key was set for
|
|
32
32
|
* @param coreContract Core contract address that projectId is on
|
|
33
|
-
* @param key Key
|
|
34
|
-
* @param value Value
|
|
33
|
+
* @param key Key set
|
|
34
|
+
* @param value Value key was set to
|
|
35
35
|
*/
|
|
36
36
|
event ConfigValueSet(
|
|
37
37
|
uint256 indexed projectId,
|
|
@@ -41,12 +41,12 @@ library GenericMinterEventsLib {
|
|
|
41
41
|
);
|
|
42
42
|
/// UINT256
|
|
43
43
|
/**
|
|
44
|
-
* @notice Generic project minter configuration event.
|
|
45
|
-
* `key` to `value` for project `projectId`.
|
|
46
|
-
* @param projectId Project ID
|
|
44
|
+
* @notice Generic project minter configuration event. Value of key
|
|
45
|
+
* `key` was set to `value` for project `projectId`.
|
|
46
|
+
* @param projectId Project ID key was set for
|
|
47
47
|
* @param coreContract Core contract address that projectId is on
|
|
48
|
-
* @param key Key
|
|
49
|
-
* @param value Value
|
|
48
|
+
* @param key Key set
|
|
49
|
+
* @param value Value key was set to
|
|
50
50
|
*/
|
|
51
51
|
event ConfigValueSet(
|
|
52
52
|
uint256 indexed projectId,
|
|
@@ -55,12 +55,12 @@ library GenericMinterEventsLib {
|
|
|
55
55
|
uint256 value
|
|
56
56
|
);
|
|
57
57
|
/**
|
|
58
|
-
* @notice Generic project minter configuration event.
|
|
58
|
+
* @notice Generic project minter configuration event. Added value `value`
|
|
59
59
|
* to the set of uint256 at key `key` for project `projectId`.
|
|
60
|
-
* @param projectId Project ID
|
|
60
|
+
* @param projectId Project ID key was set for
|
|
61
61
|
* @param coreContract Core contract address that projectId is on
|
|
62
|
-
* @param key Key
|
|
63
|
-
* @param value Value
|
|
62
|
+
* @param key Key modified
|
|
63
|
+
* @param value Value added to the key's set
|
|
64
64
|
*/
|
|
65
65
|
event ConfigValueAddedToSet(
|
|
66
66
|
uint256 indexed projectId,
|
|
@@ -69,11 +69,11 @@ library GenericMinterEventsLib {
|
|
|
69
69
|
uint256 value
|
|
70
70
|
);
|
|
71
71
|
/**
|
|
72
|
-
* @notice Generic project minter configuration event.
|
|
72
|
+
* @notice Generic project minter configuration event. Removed value
|
|
73
73
|
* `value` to the set of uint256 at key `key` for project `projectId`.
|
|
74
|
-
* @param projectId Project ID
|
|
74
|
+
* @param projectId Project ID key was set for
|
|
75
75
|
* @param coreContract Core contract address that projectId is on
|
|
76
|
-
* @param key Key
|
|
76
|
+
* @param key Key modified
|
|
77
77
|
* @param value Value removed from the key's set
|
|
78
78
|
*/
|
|
79
79
|
event ConfigValueRemovedFromSet(
|
|
@@ -84,12 +84,12 @@ library GenericMinterEventsLib {
|
|
|
84
84
|
);
|
|
85
85
|
/// ADDRESS
|
|
86
86
|
/**
|
|
87
|
-
* @notice Generic project minter configuration event.
|
|
88
|
-
* `key` to `value` for project `projectId`.
|
|
89
|
-
* @param projectId Project ID
|
|
87
|
+
* @notice Generic project minter configuration event. Value of key
|
|
88
|
+
* `key` was set to `value` for project `projectId`.
|
|
89
|
+
* @param projectId Project ID key was set for
|
|
90
90
|
* @param coreContract Core contract address that projectId is on
|
|
91
|
-
* @param key Key
|
|
92
|
-
* @param value Value
|
|
91
|
+
* @param key Key set
|
|
92
|
+
* @param value Value key was set to
|
|
93
93
|
*/
|
|
94
94
|
event ConfigValueSet(
|
|
95
95
|
uint256 indexed projectId,
|
|
@@ -98,12 +98,12 @@ library GenericMinterEventsLib {
|
|
|
98
98
|
address value
|
|
99
99
|
);
|
|
100
100
|
/**
|
|
101
|
-
* @notice Generic project minter configuration event.
|
|
101
|
+
* @notice Generic project minter configuration event. Added value `value`
|
|
102
102
|
* to the set of addresses at key `key` for project `projectId`.
|
|
103
|
-
* @param projectId Project ID
|
|
103
|
+
* @param projectId Project ID key was set for
|
|
104
104
|
* @param coreContract Core contract address that projectId is on
|
|
105
|
-
* @param key Key
|
|
106
|
-
* @param value Value
|
|
105
|
+
* @param key Key modified
|
|
106
|
+
* @param value Value added to the key's set
|
|
107
107
|
*/
|
|
108
108
|
event ConfigValueAddedToSet(
|
|
109
109
|
uint256 indexed projectId,
|
|
@@ -112,11 +112,11 @@ library GenericMinterEventsLib {
|
|
|
112
112
|
address value
|
|
113
113
|
);
|
|
114
114
|
/**
|
|
115
|
-
* @notice Generic project minter configuration event.
|
|
115
|
+
* @notice Generic project minter configuration event. Removed value
|
|
116
116
|
* `value` to the set of addresses at key `key` for project `projectId`.
|
|
117
|
-
* @param projectId Project ID
|
|
117
|
+
* @param projectId Project ID key was set for
|
|
118
118
|
* @param coreContract Core contract address that projectId is on
|
|
119
|
-
* @param key Key
|
|
119
|
+
* @param key Key modified
|
|
120
120
|
* @param value Value removed from the key's set
|
|
121
121
|
*/
|
|
122
122
|
event ConfigValueRemovedFromSet(
|
|
@@ -127,12 +127,12 @@ library GenericMinterEventsLib {
|
|
|
127
127
|
);
|
|
128
128
|
/// BYTES32
|
|
129
129
|
/**
|
|
130
|
-
* @notice Generic project minter configuration event.
|
|
131
|
-
* `key` to `value` for project `projectId`.
|
|
132
|
-
* @param projectId Project ID
|
|
130
|
+
* @notice Generic project minter configuration event. Value of key
|
|
131
|
+
* `key` was set to `value` for project `projectId`.
|
|
132
|
+
* @param projectId Project ID key was set for
|
|
133
133
|
* @param coreContract Core contract address that projectId is on
|
|
134
|
-
* @param key Key
|
|
135
|
-
* @param value Value
|
|
134
|
+
* @param key Key set
|
|
135
|
+
* @param value Value key was set to
|
|
136
136
|
*/
|
|
137
137
|
event ConfigValueSet(
|
|
138
138
|
uint256 indexed projectId,
|
|
@@ -141,12 +141,12 @@ library GenericMinterEventsLib {
|
|
|
141
141
|
bytes32 value
|
|
142
142
|
);
|
|
143
143
|
/**
|
|
144
|
-
* @notice Generic project minter configuration event.
|
|
144
|
+
* @notice Generic project minter configuration event. Added value `value`
|
|
145
145
|
* to the set of bytes32 at key `key` for project `projectId`.
|
|
146
|
-
* @param projectId Project ID
|
|
146
|
+
* @param projectId Project ID key was set for
|
|
147
147
|
* @param coreContract Core contract address that projectId is on
|
|
148
|
-
* @param key Key
|
|
149
|
-
* @param value Value
|
|
148
|
+
* @param key Key modified
|
|
149
|
+
* @param value Value added to the key's set
|
|
150
150
|
*/
|
|
151
151
|
event ConfigValueAddedToSet(
|
|
152
152
|
uint256 indexed projectId,
|
|
@@ -155,11 +155,11 @@ library GenericMinterEventsLib {
|
|
|
155
155
|
bytes32 value
|
|
156
156
|
);
|
|
157
157
|
/**
|
|
158
|
-
* @notice Generic project minter configuration event.
|
|
158
|
+
* @notice Generic project minter configuration event. Removed value
|
|
159
159
|
* `value` to the set of bytes32 at key `key` for project `projectId`.
|
|
160
|
-
* @param projectId Project ID
|
|
160
|
+
* @param projectId Project ID key was set for
|
|
161
161
|
* @param coreContract Core contract address that projectId is on
|
|
162
|
-
* @param key Key
|
|
162
|
+
* @param key Key modified
|
|
163
163
|
* @param value Value removed from the key's set
|
|
164
164
|
*/
|
|
165
165
|
event ConfigValueRemovedFromSet(
|
|
@@ -8,6 +8,7 @@ import {IGenArt721CoreContractV3_Base} from "../../../interfaces/v0.8.x/IGenArt7
|
|
|
8
8
|
import {ABHelpers} from "../ABHelpers.sol";
|
|
9
9
|
|
|
10
10
|
import {Math} from "@openzeppelin-4.7/contracts/utils/math/Math.sol";
|
|
11
|
+
import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @title Art Blocks Max Invocations Library
|
|
@@ -21,6 +22,8 @@ import {Math} from "@openzeppelin-4.7/contracts/utils/math/Math.sol";
|
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
library MaxInvocationsLib {
|
|
25
|
+
using SafeCast for uint256;
|
|
26
|
+
|
|
24
27
|
/**
|
|
25
28
|
* @notice Local max invocations for project `projectId`, tied to core contract `coreContractAddress`,
|
|
26
29
|
* updated to `maxInvocations`.
|
|
@@ -76,12 +79,13 @@ library MaxInvocationsLib {
|
|
|
76
79
|
projectId: projectId,
|
|
77
80
|
coreContract: coreContract
|
|
78
81
|
});
|
|
79
|
-
|
|
82
|
+
// @dev only bugged core would return > 1e6 invocations, but safe-cast
|
|
83
|
+
// for additional overflow safety
|
|
84
|
+
maxInvocationsProjectConfig.maxInvocations = coreMaxInvocations
|
|
85
|
+
.toUint24();
|
|
80
86
|
|
|
81
87
|
// We need to ensure maxHasBeenInvoked is correctly set after manually syncing the
|
|
82
88
|
// local maxInvocations value with the core contract's maxInvocations value.
|
|
83
|
-
// This synced value of maxInvocations from the core contract will always be greater
|
|
84
|
-
// than or equal to the previous value of maxInvocations stored locally.
|
|
85
89
|
maxInvocationsProjectConfig.maxHasBeenInvoked =
|
|
86
90
|
coreInvocations == coreMaxInvocations;
|
|
87
91
|
|
|
@@ -147,7 +151,7 @@ library MaxInvocationsLib {
|
|
|
147
151
|
* @param tokenId The id of the token.
|
|
148
152
|
* @param coreContract The address of the core contract.
|
|
149
153
|
*/
|
|
150
|
-
function
|
|
154
|
+
function validateMintEffectsInvocations(
|
|
151
155
|
uint256 tokenId,
|
|
152
156
|
address coreContract
|
|
153
157
|
) internal {
|
|
@@ -158,34 +162,31 @@ library MaxInvocationsLib {
|
|
|
158
162
|
coreContract: coreContract
|
|
159
163
|
});
|
|
160
164
|
// invocation is token number plus one, and will never overflow due to
|
|
161
|
-
// limit of 1e6 invocations per project.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (tokenInvocation == localMaxInvocations) {
|
|
180
|
-
maxInvocationsProjectConfig.maxHasBeenInvoked = true;
|
|
181
|
-
}
|
|
165
|
+
// limit of 1e6 invocations per project.
|
|
166
|
+
uint256 tokenInvocation = ABHelpers.tokenIdToTokenInvocation(tokenId);
|
|
167
|
+
uint256 localMaxInvocations = maxInvocationsProjectConfig
|
|
168
|
+
.maxInvocations;
|
|
169
|
+
// handle the case where the token invocation == minter local max
|
|
170
|
+
// invocations occurred on a different minter, and we have a stale
|
|
171
|
+
// local maxHasBeenInvoked value returning a false negative.
|
|
172
|
+
// @dev this is a CHECK after EFFECTS, so security was considered
|
|
173
|
+
// in detail here.
|
|
174
|
+
require(
|
|
175
|
+
tokenInvocation <= localMaxInvocations,
|
|
176
|
+
"Max invocations reached"
|
|
177
|
+
);
|
|
178
|
+
// in typical case, update the local maxHasBeenInvoked value
|
|
179
|
+
// to true if the token invocation == minter local max invocations
|
|
180
|
+
// (enables gas efficient reverts after sellout)
|
|
181
|
+
if (tokenInvocation == localMaxInvocations) {
|
|
182
|
+
maxInvocationsProjectConfig.maxHasBeenInvoked = true;
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
/**
|
|
186
|
-
* Checks that the max invocations have not been reached for a
|
|
187
|
-
* project. This only checks the minter's local max invocations, and
|
|
188
|
-
* not consider the core contract's max invocations.
|
|
187
|
+
* @notice Checks that the max invocations have not been reached for a
|
|
188
|
+
* given project. This only checks the minter's local max invocations, and
|
|
189
|
+
* does not consider the core contract's max invocations.
|
|
189
190
|
* The function reverts if the max invocations have been reached.
|
|
190
191
|
* @param projectId The id of the project.
|
|
191
192
|
* @param coreContract The address of the core contract.
|
|
@@ -211,7 +212,6 @@ library MaxInvocationsLib {
|
|
|
211
212
|
* Returns true if not initialized, false if initialized.
|
|
212
213
|
* @param projectId The id of the project.
|
|
213
214
|
* @param coreContract The address of the core contract.
|
|
214
|
-
* @return bool
|
|
215
215
|
* @dev We know a project's max invocations have never been initialized if
|
|
216
216
|
* both max invocations and maxHasBeenInvoked are still initial values.
|
|
217
217
|
* This is because if maxInvocations were ever set to zero,
|
|
@@ -241,31 +241,15 @@ library MaxInvocationsLib {
|
|
|
241
241
|
* @param projectId The id of the project.
|
|
242
242
|
* @param coreContract The address of the core contract.
|
|
243
243
|
*/
|
|
244
|
-
function
|
|
244
|
+
function invocationsRemainOnCore(
|
|
245
245
|
uint256 projectId,
|
|
246
246
|
address coreContract
|
|
247
247
|
) internal view returns (bool) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
uint256 coreInvocations,
|
|
251
|
-
uint256 coreMaxInvocations
|
|
252
|
-
) = coreContractInvocationData({
|
|
253
|
-
projectId: projectId,
|
|
254
|
-
coreContract: coreContract
|
|
255
|
-
});
|
|
256
|
-
// load minter-local max invocations into memory
|
|
257
|
-
MaxInvocationsProjectConfig
|
|
258
|
-
storage maxInvocationsProjectConfig = getMaxInvocationsProjectConfig({
|
|
248
|
+
return
|
|
249
|
+
getInvocationsAvailable({
|
|
259
250
|
projectId: projectId,
|
|
260
251
|
coreContract: coreContract
|
|
261
|
-
});
|
|
262
|
-
// invocations remain available if the core contract has not reached
|
|
263
|
-
// the most limiting max invocations, either on minter or core contract
|
|
264
|
-
uint256 limitingMaxInvocations = Math.min(
|
|
265
|
-
coreMaxInvocations,
|
|
266
|
-
maxInvocationsProjectConfig.maxInvocations // local max invocations
|
|
267
|
-
);
|
|
268
|
-
return coreInvocations < limitingMaxInvocations;
|
|
252
|
+
}) != 0;
|
|
269
253
|
}
|
|
270
254
|
|
|
271
255
|
/**
|
|
@@ -346,6 +330,26 @@ library MaxInvocationsLib {
|
|
|
346
330
|
uint256 projectId,
|
|
347
331
|
address coreContract
|
|
348
332
|
) internal view returns (bool) {
|
|
333
|
+
return
|
|
334
|
+
getInvocationsAvailable({
|
|
335
|
+
projectId: projectId,
|
|
336
|
+
coreContract: coreContract
|
|
337
|
+
}) == 0;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @notice Function returns the number of invocations available for a given
|
|
342
|
+
* project. Function checks the core contract's invocations and minter's max
|
|
343
|
+
* invocations, ensuring that the most limiting value is used, even if the
|
|
344
|
+
* local minter max invocations is stale.
|
|
345
|
+
* @param projectId The id of the project.
|
|
346
|
+
* @param coreContract The address of the core contract.
|
|
347
|
+
* @return Number of invocations available for the project.
|
|
348
|
+
*/
|
|
349
|
+
function getInvocationsAvailable(
|
|
350
|
+
uint256 projectId,
|
|
351
|
+
address coreContract
|
|
352
|
+
) internal view returns (uint256) {
|
|
349
353
|
// get max invocations from core contract
|
|
350
354
|
(
|
|
351
355
|
uint256 coreInvocations,
|
|
@@ -354,26 +358,23 @@ library MaxInvocationsLib {
|
|
|
354
358
|
projectId: projectId,
|
|
355
359
|
coreContract: coreContract
|
|
356
360
|
});
|
|
357
|
-
|
|
358
361
|
MaxInvocationsProjectConfig
|
|
359
362
|
storage maxInvocationsProjectConfig = getMaxInvocationsProjectConfig({
|
|
360
363
|
projectId: projectId,
|
|
361
364
|
coreContract: coreContract
|
|
362
365
|
});
|
|
363
|
-
uint256
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
// greater than
|
|
368
|
-
//
|
|
369
|
-
if (
|
|
370
|
-
|
|
371
|
-
// contract's max invocations since it is the limiting factor
|
|
372
|
-
return (coreMaxInvocations == coreInvocations);
|
|
366
|
+
uint256 limitingMaxInvocations = Math.min(
|
|
367
|
+
coreMaxInvocations,
|
|
368
|
+
maxInvocationsProjectConfig.maxInvocations // local max invocations
|
|
369
|
+
);
|
|
370
|
+
// if core invocations are greater than the limiting max invocations,
|
|
371
|
+
// return 0 since no invocations remain
|
|
372
|
+
if (coreInvocations >= limitingMaxInvocations) {
|
|
373
|
+
return 0;
|
|
373
374
|
}
|
|
374
|
-
//
|
|
375
|
-
//
|
|
376
|
-
return
|
|
375
|
+
// otherwise, return the number of invocations remaining
|
|
376
|
+
// @dev will not undeflow due to previous check
|
|
377
|
+
return limitingMaxInvocations - coreInvocations;
|
|
377
378
|
}
|
|
378
379
|
|
|
379
380
|
/**
|
|
@@ -131,8 +131,8 @@ library MerkleLib {
|
|
|
131
131
|
* @notice Checks that a given proof is valid for the vault address, and
|
|
132
132
|
* also checks that the vault address has not exceeded the maximum number
|
|
133
133
|
* of invocations per address for the project.
|
|
134
|
-
* Reverts if the proof is invalid or if the vault address has
|
|
135
|
-
* maximum number of invocations per address for the project.
|
|
134
|
+
* @dev Reverts if the proof is invalid or if the vault address has
|
|
135
|
+
* exceeded the maximum number of invocations per address for the project.
|
|
136
136
|
* @param projectId project id to check
|
|
137
137
|
* @param coreContract core contract address to check
|
|
138
138
|
* @param proof Merkle proof to check
|
|
@@ -313,13 +313,7 @@ library MerkleLib {
|
|
|
313
313
|
uint256 maxInvocationsPerAddress = projectMaxInvocationsPerAddress(
|
|
314
314
|
projectConfig
|
|
315
315
|
);
|
|
316
|
-
if (maxInvocationsPerAddress
|
|
317
|
-
// project does not limit mint invocations per address, so leave
|
|
318
|
-
// `projectLimitsMintInvocationsPerAddress` at solidity initial
|
|
319
|
-
// value of false. Also leave `mintInvocationsRemaining` at
|
|
320
|
-
// solidity initial value of zero, as indicated in this function's
|
|
321
|
-
// documentation.
|
|
322
|
-
} else {
|
|
316
|
+
if (maxInvocationsPerAddress != 0) {
|
|
323
317
|
projectLimitsMintInvocationsPerAddress = true;
|
|
324
318
|
uint256 userMintInvocations = projectConfig.userMintInvocations[
|
|
325
319
|
address_
|
|
@@ -337,6 +331,12 @@ library MerkleLib {
|
|
|
337
331
|
// else user has reached their maximum invocations, so leave
|
|
338
332
|
// `mintInvocationsRemaining` at solidity initial value of zero
|
|
339
333
|
}
|
|
334
|
+
// else maxInvocationsPerAddress is zero, then the project does not
|
|
335
|
+
// limit mint invocations per address, so do nothing. Leave
|
|
336
|
+
// `projectLimitsMintInvocationsPerAddress` at solidity initial
|
|
337
|
+
// value of false. Also leave `mintInvocationsRemaining` at
|
|
338
|
+
// solidity initial value of zero, as indicated in this function's
|
|
339
|
+
// documentation.
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
/**
|
|
@@ -379,6 +379,10 @@ library MerkleLib {
|
|
|
379
379
|
bytes32[] calldata proof,
|
|
380
380
|
address address_
|
|
381
381
|
) private pure returns (bool) {
|
|
382
|
-
return
|
|
382
|
+
return
|
|
383
|
+
proof.verifyCalldata({
|
|
384
|
+
root: proofRoot,
|
|
385
|
+
leaf: hashAddress(address_)
|
|
386
|
+
});
|
|
383
387
|
}
|
|
384
388
|
}
|