@artblocks/contracts 1.0.4 → 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 +336 -131
- 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/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +1109 -0
- 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 +565 -209
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +785 -227
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +40 -15
- 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 +40 -15
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +36 -68
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
- 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/ICoreRegistryV1.sol/ICoreRegistryV1.json +6 -6
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +71 -39
- 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/IMinterFilterV1.sol/IMinterFilterV1.json +22 -22
- package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +26 -101
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +1 -57
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +1 -57
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +2 -21
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +15 -90
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +10 -36
- 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 +4 -236
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +5 -5
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +7 -423
- package/artifacts/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +17 -17
- 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 +60 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +30 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +60 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +346 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +29 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +30 -3
- 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 +254 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +48 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +41 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +35 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +79 -3
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +41 -41
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +66 -632
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +67 -594
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +33 -524
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +66 -632
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +33 -524
- package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +1374 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +56 -722
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +58 -454
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +61 -552
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +55 -497
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +110 -571
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +69 -560
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +28 -444
- 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 +4 -9
- 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/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
- package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +136 -0
- package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +105 -0
- package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +100 -0
- package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +69 -0
- 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 +19 -19
- 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 +737 -390
- 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 +9 -62
- 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 +893 -493
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1053 -655
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +7 -13
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +5 -11
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
- package/contracts/engine-registry/CoreRegistryV1.sol +58 -65
- 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/ICoreRegistryV1.sol +6 -8
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +48 -43
- 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/IMinterFilterV1.sol +25 -25
- package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +30 -20
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +1 -14
- package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +1 -15
- package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +2 -8
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +15 -43
- package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +10 -20
- 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 -67
- package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +5 -5
- package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +18 -160
- package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +37 -37
- 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 +31 -17
- package/contracts/libs/v0.8.x/AuthLib.sol +101 -102
- package/contracts/libs/v0.8.x/BitMap.sol +112 -0
- package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +5 -5
- 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 +162 -39
- package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
- package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +139 -37
- package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
- package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +299 -158
- package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +268 -55
- package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +138 -58
- package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
- package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +796 -123
- package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +131 -13
- package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +607 -224
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +494 -330
- package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +217 -78
- package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +358 -309
- package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +391 -491
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +396 -632
- package/contracts/minter-suite/Minters/MinterDAExpV5.sol +212 -273
- package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +393 -488
- package/contracts/minter-suite/Minters/MinterDALinV5.sol +220 -277
- package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
- package/contracts/minter-suite/Minters/MinterSEAV1.sol +329 -677
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +287 -303
- package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +355 -446
- package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +328 -416
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +552 -622
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +429 -553
- package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +180 -227
- 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/GenArt721CoreV3_Engine_IncorrectCoreType.sol +3 -10
- 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/ReentrancyHolderMockShared.sol +59 -0
- package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
- package/contracts/mock/ReentrancyMockShared.sol +48 -0
- package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
- package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
- package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
- package/contracts/randomizer/shared/SharedRandomizerV0.sol +79 -71
- 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 +79 -45
- 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/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +0 -1127
- 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/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
- package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
2
|
// Created By: Art Blocks Inc.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "../../interfaces/v0.8.x/ISharedMinterMerkleV0.sol";
|
|
4
|
+
// @dev fixed to specific solidity version for clarity and for more clear
|
|
5
|
+
// source code verification purposes.
|
|
6
|
+
pragma solidity 0.8.19;
|
|
8
7
|
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../
|
|
11
|
-
import "../../
|
|
12
|
-
import "../../
|
|
13
|
-
import "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
8
|
+
import {IDelegationRegistry} from "../../interfaces/v0.8.x/IDelegationRegistry.sol";
|
|
9
|
+
import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
10
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
11
|
+
import {ISharedMinterMerkleV0} from "../../interfaces/v0.8.x/ISharedMinterMerkleV0.sol";
|
|
14
12
|
|
|
15
|
-
import "
|
|
13
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
14
|
+
import {MerkleLib} from "../../libs/v0.8.x/minter-libs/MerkleLib.sol";
|
|
15
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
16
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
17
|
+
import {SetPriceLib} from "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
@@ -53,6 +55,13 @@ pragma solidity 0.8.19;
|
|
|
53
55
|
* Token-level delegations are configured by the vault owner, and contract-
|
|
54
56
|
* level delegations must be configured for the core token contract as returned
|
|
55
57
|
* by the public immutable variable `genArt721CoreAddress`.
|
|
58
|
+
* ----------------------------------------------------------------------------
|
|
59
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
60
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
61
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
62
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
63
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
64
|
+
* checks performed by this minter's Minter Filter.
|
|
56
65
|
*/
|
|
57
66
|
contract MinterSetPriceMerkleV5 is
|
|
58
67
|
ReentrancyGuard,
|
|
@@ -63,7 +72,7 @@ contract MinterSetPriceMerkleV5 is
|
|
|
63
72
|
address public immutable minterFilterAddress;
|
|
64
73
|
|
|
65
74
|
/// Minter filter this minter may interact with.
|
|
66
|
-
IMinterFilterV1 private immutable
|
|
75
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
67
76
|
|
|
68
77
|
/// minterType for this minter
|
|
69
78
|
string public constant minterType = "MinterSetPriceMerkleV5";
|
|
@@ -74,54 +83,7 @@ contract MinterSetPriceMerkleV5 is
|
|
|
74
83
|
/// Delegation registry address
|
|
75
84
|
address public immutable delegationRegistryAddress;
|
|
76
85
|
/// Delegation registry address
|
|
77
|
-
IDelegationRegistry private immutable
|
|
78
|
-
|
|
79
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
80
|
-
// STATE VARIABLES FOR SetPriceLib begin here
|
|
81
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
82
|
-
|
|
83
|
-
/// contractAddress => projectId => set price project config
|
|
84
|
-
mapping(address => mapping(uint256 => SetPriceLib.SetPriceProjectConfig))
|
|
85
|
-
private _setPriceProjectConfigMapping;
|
|
86
|
-
|
|
87
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
88
|
-
// STATE VARIABLES FOR SetPriceLib end here
|
|
89
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
90
|
-
|
|
91
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
92
|
-
// STATE VARIABLES FOR SplitFundsLib begin here
|
|
93
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
94
|
-
|
|
95
|
-
// contractAddress => IsEngineCache
|
|
96
|
-
mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
|
|
97
|
-
|
|
98
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
99
|
-
// STATE VARIABLES FOR SplitFundsLib end here
|
|
100
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
101
|
-
|
|
102
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
103
|
-
// STATE VARIABLES FOR MerkleLib begin here
|
|
104
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
105
|
-
|
|
106
|
-
/// contractAddress => projectId => merkle specific project config
|
|
107
|
-
mapping(address => mapping(uint256 => MerkleLib.MerkleProjectConfig))
|
|
108
|
-
private _merkleProjectConfigMapping;
|
|
109
|
-
|
|
110
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
111
|
-
// STATE VARIABLES FOR MerkleLib end here
|
|
112
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
113
|
-
|
|
114
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
115
|
-
// STATE VARIABLES FOR MaxInvocationsLib begin here
|
|
116
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
117
|
-
|
|
118
|
-
/// contractAddress => projectId => max invocations specific project config
|
|
119
|
-
mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
|
|
120
|
-
private _maxInvocationsProjectConfigMapping;
|
|
121
|
-
|
|
122
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
123
|
-
// STATE VARIABLES FOR MaxInvocationsLib end here
|
|
124
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
86
|
+
IDelegationRegistry private immutable _delegationRegistryContract;
|
|
125
87
|
|
|
126
88
|
// MODIFIERS
|
|
127
89
|
// @dev contract uses modifier-like internal functions instead of modifiers
|
|
@@ -130,281 +92,266 @@ contract MinterSetPriceMerkleV5 is
|
|
|
130
92
|
|
|
131
93
|
/**
|
|
132
94
|
* @notice Initializes contract to be a Filtered Minter for
|
|
133
|
-
* `
|
|
134
|
-
* @param
|
|
95
|
+
* `minterFilter` minter filter.
|
|
96
|
+
* @param minterFilter Minter filter for which this will be a
|
|
135
97
|
* filtered minter.
|
|
136
|
-
* @param
|
|
98
|
+
* @param delegationRegistryAddress_ Delegation registry contract address.
|
|
137
99
|
*/
|
|
138
100
|
constructor(
|
|
139
|
-
address
|
|
140
|
-
address
|
|
101
|
+
address minterFilter,
|
|
102
|
+
address delegationRegistryAddress_
|
|
141
103
|
) ReentrancyGuard() {
|
|
142
|
-
minterFilterAddress =
|
|
143
|
-
|
|
104
|
+
minterFilterAddress = minterFilter;
|
|
105
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
144
106
|
|
|
145
|
-
delegationRegistryAddress =
|
|
146
|
-
|
|
147
|
-
|
|
107
|
+
delegationRegistryAddress = delegationRegistryAddress_;
|
|
108
|
+
_delegationRegistryContract = IDelegationRegistry(
|
|
109
|
+
delegationRegistryAddress_
|
|
148
110
|
);
|
|
149
|
-
emit DelegationRegistryUpdated(
|
|
111
|
+
emit MerkleLib.DelegationRegistryUpdated(delegationRegistryAddress_);
|
|
150
112
|
// broadcast default max invocations per address for this minter
|
|
151
|
-
emit DefaultMaxInvocationsPerAddress(
|
|
113
|
+
emit MerkleLib.DefaultMaxInvocationsPerAddress(
|
|
152
114
|
MerkleLib.DEFAULT_MAX_INVOCATIONS_PER_ADDRESS
|
|
153
115
|
);
|
|
154
116
|
}
|
|
155
117
|
|
|
156
118
|
/**
|
|
157
|
-
* @notice Manually sets the local maximum invocations of project `
|
|
158
|
-
* with the provided `
|
|
159
|
-
* than or equal to the value of project `
|
|
119
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
120
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
121
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
160
122
|
* set on the core contract.
|
|
161
|
-
* @dev Note that a `
|
|
123
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
162
124
|
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
163
125
|
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
164
|
-
* @param
|
|
165
|
-
* @param
|
|
166
|
-
* @param
|
|
126
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
127
|
+
* @param coreContract Core contract address for the given project.
|
|
128
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
167
129
|
*/
|
|
168
130
|
function manuallyLimitProjectMaxInvocations(
|
|
169
|
-
uint256
|
|
170
|
-
address
|
|
171
|
-
uint24
|
|
131
|
+
uint256 projectId,
|
|
132
|
+
address coreContract,
|
|
133
|
+
uint24 maxInvocations
|
|
172
134
|
) external {
|
|
173
135
|
AuthLib.onlyArtist({
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
136
|
+
projectId: projectId,
|
|
137
|
+
coreContract: coreContract,
|
|
138
|
+
sender: msg.sender
|
|
139
|
+
});
|
|
140
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
141
|
+
projectId: projectId,
|
|
142
|
+
coreContract: coreContract,
|
|
143
|
+
maxInvocations: maxInvocations
|
|
177
144
|
});
|
|
178
|
-
MaxInvocationsLib.manuallyLimitProjectMaxInvocations(
|
|
179
|
-
_projectId,
|
|
180
|
-
_coreContract,
|
|
181
|
-
_maxInvocations,
|
|
182
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
183
|
-
);
|
|
184
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
185
|
-
_projectId,
|
|
186
|
-
_coreContract,
|
|
187
|
-
_maxInvocations
|
|
188
|
-
);
|
|
189
145
|
}
|
|
190
146
|
|
|
191
147
|
/**
|
|
192
|
-
* @notice Updates this minter's price per token of project `
|
|
148
|
+
* @notice Updates this minter's price per token of project `projectId`
|
|
193
149
|
* to be '_pricePerTokenInWei`, in Wei.
|
|
194
150
|
* @dev Note that it is intentionally supported here that the configured
|
|
195
151
|
* price may be explicitly set to `0`.
|
|
196
|
-
* @param
|
|
197
|
-
* @param
|
|
198
|
-
* @param
|
|
152
|
+
* @param projectId Project ID to set the price per token for.
|
|
153
|
+
* @param coreContract Core contract address for the given project.
|
|
154
|
+
* @param pricePerTokenInWei Price per token to set for the project, in Wei.
|
|
199
155
|
*/
|
|
200
156
|
function updatePricePerTokenInWei(
|
|
201
|
-
uint256
|
|
202
|
-
address
|
|
203
|
-
uint248
|
|
157
|
+
uint256 projectId,
|
|
158
|
+
address coreContract,
|
|
159
|
+
uint248 pricePerTokenInWei
|
|
204
160
|
) external {
|
|
205
161
|
AuthLib.onlyArtist({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
162
|
+
projectId: projectId,
|
|
163
|
+
coreContract: coreContract,
|
|
164
|
+
sender: msg.sender
|
|
165
|
+
});
|
|
166
|
+
SetPriceLib.updatePricePerToken({
|
|
167
|
+
projectId: projectId,
|
|
168
|
+
coreContract: coreContract,
|
|
169
|
+
pricePerToken: pricePerTokenInWei
|
|
209
170
|
});
|
|
210
|
-
SetPriceLib.SetPriceProjectConfig
|
|
211
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
212
|
-
_coreContract
|
|
213
|
-
][_projectId];
|
|
214
|
-
SetPriceLib.updatePricePerTokenInWei(
|
|
215
|
-
_pricePerTokenInWei,
|
|
216
|
-
_setPriceProjectConfig
|
|
217
|
-
);
|
|
218
|
-
emit PricePerTokenInWeiUpdated(
|
|
219
|
-
_projectId,
|
|
220
|
-
_coreContract,
|
|
221
|
-
_pricePerTokenInWei
|
|
222
|
-
);
|
|
223
171
|
|
|
224
172
|
// for convenience, sync local max invocations to the core contract if
|
|
225
173
|
// and only if max invocations have not already been synced.
|
|
226
174
|
// @dev do not sync if max invocations have already been synced, as
|
|
227
175
|
// local max invocations could have been manually set to be
|
|
228
176
|
// intentionally less than the core contract's max invocations.
|
|
229
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
230
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
231
|
-
_coreContract
|
|
232
|
-
][_projectId];
|
|
233
177
|
// @dev if local maxInvocations and maxHasBeenInvoked are both
|
|
234
178
|
// initial values, we know they have not been populated on this minter
|
|
235
179
|
if (
|
|
236
|
-
MaxInvocationsLib.maxInvocationsIsUnconfigured(
|
|
237
|
-
|
|
238
|
-
|
|
180
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
181
|
+
projectId: projectId,
|
|
182
|
+
coreContract: coreContract
|
|
183
|
+
})
|
|
239
184
|
) {
|
|
240
|
-
syncProjectMaxInvocationsToCore(
|
|
185
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
186
|
+
projectId: projectId,
|
|
187
|
+
coreContract: coreContract
|
|
188
|
+
});
|
|
241
189
|
}
|
|
242
190
|
}
|
|
243
191
|
|
|
244
192
|
/**
|
|
245
|
-
* @notice Update the Merkle root for project `
|
|
246
|
-
* @param
|
|
247
|
-
* @param
|
|
248
|
-
* @param
|
|
249
|
-
* on project `
|
|
193
|
+
* @notice Update the Merkle root for project `projectId` on core contract `coreContract`.
|
|
194
|
+
* @param projectId Project ID to be updated.
|
|
195
|
+
* @param coreContract Core contract address for the given project.
|
|
196
|
+
* @param root root of Merkle tree defining addresses allowed to mint
|
|
197
|
+
* on project `projectId`.
|
|
250
198
|
*/
|
|
251
199
|
function updateMerkleRoot(
|
|
252
|
-
uint256
|
|
253
|
-
address
|
|
254
|
-
bytes32
|
|
200
|
+
uint256 projectId,
|
|
201
|
+
address coreContract,
|
|
202
|
+
bytes32 root
|
|
255
203
|
) external {
|
|
256
204
|
AuthLib.onlyArtist({
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
205
|
+
projectId: projectId,
|
|
206
|
+
coreContract: coreContract,
|
|
207
|
+
sender: msg.sender
|
|
208
|
+
});
|
|
209
|
+
MerkleLib.updateMerkleRoot({
|
|
210
|
+
projectId: projectId,
|
|
211
|
+
coreContract: coreContract,
|
|
212
|
+
root: root
|
|
260
213
|
});
|
|
261
|
-
require(_root != bytes32(0), "Root must be provided");
|
|
262
|
-
MerkleLib.updateMerkleRoot(
|
|
263
|
-
_merkleProjectConfigMapping[_coreContract][_projectId],
|
|
264
|
-
_root
|
|
265
|
-
);
|
|
266
|
-
emit ConfigValueSet(
|
|
267
|
-
_projectId,
|
|
268
|
-
_coreContract,
|
|
269
|
-
MerkleLib.CONFIG_MERKLE_ROOT,
|
|
270
|
-
_root
|
|
271
|
-
);
|
|
272
214
|
}
|
|
273
215
|
|
|
274
216
|
/**
|
|
275
217
|
* @notice Sets maximum allowed invocations per allowlisted address for
|
|
276
|
-
* project `
|
|
218
|
+
* project `project` to `limit`. If `limit` is set to 0, allowlisted
|
|
277
219
|
* addresses will be able to mint as many times as desired, until the
|
|
278
220
|
* project reaches its maximum invocations.
|
|
279
221
|
* Default is a value of 1 if never configured by artist.
|
|
280
|
-
* @param
|
|
281
|
-
* @param
|
|
282
|
-
* @param
|
|
222
|
+
* @param projectId Project ID to toggle the mint limit.
|
|
223
|
+
* @param coreContract Core contract address for the given project.
|
|
224
|
+
* @param maxInvocationsPerAddress Maximum allowed invocations per
|
|
283
225
|
* allowlisted address.
|
|
284
226
|
* @dev default value stated above must be updated if the value of
|
|
285
227
|
* CONFIG_USE_MAX_INVOCATIONS_PER_ADDRESS_OVERRIDE is changed.
|
|
286
228
|
*/
|
|
287
229
|
function setProjectInvocationsPerAddress(
|
|
288
|
-
uint256
|
|
289
|
-
address
|
|
290
|
-
uint24
|
|
230
|
+
uint256 projectId,
|
|
231
|
+
address coreContract,
|
|
232
|
+
uint24 maxInvocationsPerAddress
|
|
291
233
|
) external {
|
|
292
234
|
AuthLib.onlyArtist({
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
235
|
+
projectId: projectId,
|
|
236
|
+
coreContract: coreContract,
|
|
237
|
+
sender: msg.sender
|
|
238
|
+
});
|
|
239
|
+
MerkleLib.setProjectInvocationsPerAddress({
|
|
240
|
+
projectId: projectId,
|
|
241
|
+
coreContract: coreContract,
|
|
242
|
+
maxInvocationsPerAddress: maxInvocationsPerAddress
|
|
296
243
|
});
|
|
297
|
-
MerkleLib.setProjectInvocationsPerAddress(
|
|
298
|
-
_merkleProjectConfigMapping[_coreContract][_projectId],
|
|
299
|
-
_maxInvocationsPerAddress
|
|
300
|
-
);
|
|
301
|
-
emit ConfigValueSet(
|
|
302
|
-
_projectId,
|
|
303
|
-
_coreContract,
|
|
304
|
-
MerkleLib.CONFIG_USE_MAX_INVOCATIONS_PER_ADDRESS_OVERRIDE,
|
|
305
|
-
true
|
|
306
|
-
);
|
|
307
|
-
emit ConfigValueSet(
|
|
308
|
-
_projectId,
|
|
309
|
-
_coreContract,
|
|
310
|
-
MerkleLib.CONFIG_MAX_INVOCATIONS_OVERRIDE,
|
|
311
|
-
uint256(_maxInvocationsPerAddress)
|
|
312
|
-
);
|
|
313
244
|
}
|
|
314
245
|
|
|
315
246
|
/**
|
|
316
|
-
* @notice Purchases a token from project `
|
|
317
|
-
* @param
|
|
318
|
-
* @param
|
|
319
|
-
* @param
|
|
247
|
+
* @notice Purchases a token from project `projectId`.
|
|
248
|
+
* @param projectId Project ID to mint a token on.
|
|
249
|
+
* @param coreContract Core contract address for the given project.
|
|
250
|
+
* @param proof Merkle proof for the given project.
|
|
320
251
|
* @return tokenId Token ID of minted token
|
|
321
252
|
*/
|
|
322
253
|
function purchase(
|
|
323
|
-
uint256
|
|
324
|
-
address
|
|
325
|
-
bytes32[] calldata
|
|
254
|
+
uint256 projectId,
|
|
255
|
+
address coreContract,
|
|
256
|
+
bytes32[] calldata proof
|
|
326
257
|
) external payable returns (uint256 tokenId) {
|
|
327
|
-
tokenId = purchaseTo(
|
|
328
|
-
msg.sender,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
address(0)
|
|
333
|
-
);
|
|
258
|
+
tokenId = purchaseTo({
|
|
259
|
+
to: msg.sender,
|
|
260
|
+
projectId: projectId,
|
|
261
|
+
coreContract: coreContract,
|
|
262
|
+
proof: proof,
|
|
263
|
+
vault: address(0)
|
|
264
|
+
});
|
|
334
265
|
return tokenId;
|
|
335
266
|
}
|
|
336
267
|
|
|
337
268
|
/**
|
|
338
|
-
* @notice Purchases a token from project `
|
|
339
|
-
* the token's owner to `
|
|
340
|
-
* @param
|
|
341
|
-
* @param
|
|
342
|
-
* @param
|
|
343
|
-
* @param
|
|
269
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
270
|
+
* the token's owner to `to`.
|
|
271
|
+
* @param to Address to be the new token's owner.
|
|
272
|
+
* @param projectId Project ID to mint a token on.
|
|
273
|
+
* @param coreContract Contract address of the core contract.
|
|
274
|
+
* @param proof Merkle proof for the given project.
|
|
344
275
|
* @return tokenId Token ID of minted token
|
|
345
276
|
*/
|
|
346
277
|
function purchaseTo(
|
|
347
|
-
address
|
|
348
|
-
uint256
|
|
349
|
-
address
|
|
350
|
-
bytes32[] calldata
|
|
278
|
+
address to,
|
|
279
|
+
uint256 projectId,
|
|
280
|
+
address coreContract,
|
|
281
|
+
bytes32[] calldata proof
|
|
351
282
|
) external payable returns (uint256 tokenId) {
|
|
352
|
-
return
|
|
283
|
+
return
|
|
284
|
+
purchaseTo({
|
|
285
|
+
to: to,
|
|
286
|
+
projectId: projectId,
|
|
287
|
+
coreContract: coreContract,
|
|
288
|
+
proof: proof,
|
|
289
|
+
vault: address(0)
|
|
290
|
+
});
|
|
353
291
|
}
|
|
354
292
|
|
|
355
293
|
// public getter functions
|
|
356
294
|
/**
|
|
357
295
|
* @notice Gets the maximum invocations project configuration.
|
|
358
|
-
* @param
|
|
359
|
-
* @param
|
|
296
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
297
|
+
* @param coreContract The address of the core contract.
|
|
360
298
|
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
361
299
|
* configuration data.
|
|
362
300
|
*/
|
|
363
301
|
function maxInvocationsProjectConfig(
|
|
364
|
-
uint256
|
|
365
|
-
address
|
|
302
|
+
uint256 projectId,
|
|
303
|
+
address coreContract
|
|
366
304
|
)
|
|
367
305
|
external
|
|
368
306
|
view
|
|
369
307
|
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
370
308
|
{
|
|
371
|
-
return
|
|
309
|
+
return
|
|
310
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
311
|
+
projectId: projectId,
|
|
312
|
+
coreContract: coreContract
|
|
313
|
+
});
|
|
372
314
|
}
|
|
373
315
|
|
|
374
316
|
/**
|
|
375
317
|
* @notice Gets the set price project configuration.
|
|
376
|
-
* @param
|
|
377
|
-
* @param
|
|
318
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
319
|
+
* @param coreContract The address of the core contract.
|
|
378
320
|
* @return SetPriceProjectConfig struct with the fixed price project
|
|
379
321
|
* configuration data.
|
|
380
322
|
*/
|
|
381
323
|
function setPriceProjectConfig(
|
|
382
|
-
uint256
|
|
383
|
-
address
|
|
324
|
+
uint256 projectId,
|
|
325
|
+
address coreContract
|
|
384
326
|
) external view returns (SetPriceLib.SetPriceProjectConfig memory) {
|
|
385
|
-
return
|
|
327
|
+
return
|
|
328
|
+
SetPriceLib.getSetPriceProjectConfig({
|
|
329
|
+
projectId: projectId,
|
|
330
|
+
coreContract: coreContract
|
|
331
|
+
});
|
|
386
332
|
}
|
|
387
333
|
|
|
388
334
|
/**
|
|
389
335
|
* @notice Retrieves the Merkle project configuration for a given contract and project.
|
|
390
336
|
* @dev This function fetches the Merkle project configuration from the
|
|
391
337
|
* merkleProjectConfigMapping using the provided core contract address and project ID.
|
|
392
|
-
* @param
|
|
393
|
-
* @param
|
|
338
|
+
* @param projectId The ID of the project.
|
|
339
|
+
* @param coreContract The address of the core contract.
|
|
394
340
|
* @return MerkleLib.MerkleProjectConfig The Merkle project configuration.
|
|
395
341
|
*/
|
|
396
342
|
function merkleProjectConfig(
|
|
397
|
-
uint256
|
|
398
|
-
address
|
|
343
|
+
uint256 projectId,
|
|
344
|
+
address coreContract
|
|
399
345
|
) external view returns (bool, uint24, bytes32) {
|
|
400
|
-
MerkleLib.MerkleProjectConfig
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
346
|
+
MerkleLib.MerkleProjectConfig storage merkleProjectConfig_ = MerkleLib
|
|
347
|
+
.getMerkleProjectConfig({
|
|
348
|
+
projectId: projectId,
|
|
349
|
+
coreContract: coreContract
|
|
350
|
+
});
|
|
404
351
|
return (
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
352
|
+
merkleProjectConfig_.useMaxInvocationsPerAddressOverride,
|
|
353
|
+
merkleProjectConfig_.maxInvocationsPerAddressOverride,
|
|
354
|
+
merkleProjectConfig_.merkleRoot
|
|
408
355
|
);
|
|
409
356
|
}
|
|
410
357
|
|
|
@@ -412,44 +359,44 @@ contract MinterSetPriceMerkleV5 is
|
|
|
412
359
|
* @notice Retrieves the mint invocation count for a specific project and purchaser.
|
|
413
360
|
* @dev This function retrieves the number of times a purchaser has minted
|
|
414
361
|
* in a specific project from the projectUserMintInvocationsMapping.
|
|
415
|
-
* @param
|
|
416
|
-
* @param
|
|
417
|
-
* @param
|
|
362
|
+
* @param projectId The ID of the project.
|
|
363
|
+
* @param coreContract The address of the core contract.
|
|
364
|
+
* @param purchaser The address of the purchaser.
|
|
418
365
|
* @return uint256 The number of times the purchaser has minted in the given project.
|
|
419
366
|
*/
|
|
420
367
|
function projectUserMintInvocations(
|
|
421
|
-
uint256
|
|
422
|
-
address
|
|
423
|
-
address
|
|
368
|
+
uint256 projectId,
|
|
369
|
+
address coreContract,
|
|
370
|
+
address purchaser
|
|
424
371
|
) external view returns (uint256) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
372
|
+
return
|
|
373
|
+
MerkleLib.projectUserMintInvocations({
|
|
374
|
+
projectId: projectId,
|
|
375
|
+
coreContract: coreContract,
|
|
376
|
+
purchaser: purchaser
|
|
377
|
+
});
|
|
430
378
|
}
|
|
431
379
|
|
|
432
380
|
/**
|
|
433
|
-
* @notice Checks if the specified `
|
|
434
|
-
* @dev This function retrieves the cached value of `
|
|
381
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
382
|
+
* @dev This function retrieves the cached value of `isEngine` from
|
|
435
383
|
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
436
|
-
* returns the cached value. Otherwise, it calls the `
|
|
437
|
-
* function from the `SplitFundsLib` library to check if `
|
|
384
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
385
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
438
386
|
* is a valid engine contract.
|
|
439
|
-
* @dev This function will revert if the provided `
|
|
387
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
440
388
|
* a valid Engine or V3 Flagship contract.
|
|
441
|
-
* @param
|
|
442
|
-
* @return bool indicating if `
|
|
389
|
+
* @param coreContract The address of the contract to check.
|
|
390
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
443
391
|
*/
|
|
444
|
-
function isEngineView(address
|
|
445
|
-
SplitFundsLib.IsEngineCache storage isEngineCache =
|
|
446
|
-
|
|
447
|
-
];
|
|
392
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
393
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
394
|
+
.getIsEngineCacheConfig(coreContract);
|
|
448
395
|
if (isEngineCache.isCached) {
|
|
449
396
|
return isEngineCache.isEngine;
|
|
450
397
|
} else {
|
|
451
|
-
// @dev this calls the non-modifying variant of
|
|
452
|
-
return SplitFundsLib.getV3CoreIsEngineView(
|
|
398
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
399
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
453
400
|
}
|
|
454
401
|
}
|
|
455
402
|
|
|
@@ -464,17 +411,18 @@ contract MinterSetPriceMerkleV5 is
|
|
|
464
411
|
* possible because the V3 core contract only allows maximum invocations
|
|
465
412
|
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
466
413
|
* do not do input validation in this method as to whether or not the input
|
|
467
|
-
* @param
|
|
468
|
-
* @param
|
|
414
|
+
* @param projectId is an existing project ID.
|
|
415
|
+
* @param coreContract is an existing core contract address.
|
|
469
416
|
*/
|
|
470
417
|
function projectMaxHasBeenInvoked(
|
|
471
|
-
uint256
|
|
472
|
-
address
|
|
418
|
+
uint256 projectId,
|
|
419
|
+
address coreContract
|
|
473
420
|
) external view returns (bool) {
|
|
474
421
|
return
|
|
475
|
-
MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
476
|
-
|
|
477
|
-
|
|
422
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
423
|
+
projectId: projectId,
|
|
424
|
+
coreContract: coreContract
|
|
425
|
+
});
|
|
478
426
|
}
|
|
479
427
|
|
|
480
428
|
/**
|
|
@@ -493,26 +441,27 @@ contract MinterSetPriceMerkleV5 is
|
|
|
493
441
|
* increased. When this happens, the minter will enable minting, allowing
|
|
494
442
|
* the core contract to enforce the max invocations check. Based on this
|
|
495
443
|
* rationale, we intentionally do not do input validation in this method as
|
|
496
|
-
* to whether or not the input `
|
|
497
|
-
* @param
|
|
498
|
-
* @param
|
|
444
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
445
|
+
* @param projectId is an existing project ID.
|
|
446
|
+
* @param coreContract is an existing core contract address.
|
|
499
447
|
*/
|
|
500
448
|
function projectMaxInvocations(
|
|
501
|
-
uint256
|
|
502
|
-
address
|
|
449
|
+
uint256 projectId,
|
|
450
|
+
address coreContract
|
|
503
451
|
) external view returns (uint256) {
|
|
504
452
|
return
|
|
505
|
-
MaxInvocationsLib.getMaxInvocations(
|
|
506
|
-
|
|
507
|
-
|
|
453
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
454
|
+
projectId: projectId,
|
|
455
|
+
coreContract: coreContract
|
|
456
|
+
});
|
|
508
457
|
}
|
|
509
458
|
|
|
510
459
|
/**
|
|
511
460
|
* @notice Gets if price of token is configured, price of minting a
|
|
512
|
-
* token on project `
|
|
461
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
513
462
|
* used as payment.
|
|
514
|
-
* @param
|
|
515
|
-
* @param
|
|
463
|
+
* @param projectId Project ID to get price information for
|
|
464
|
+
* @param coreContract Contract address of the core contract
|
|
516
465
|
* @return isConfigured true only if token price has been configured on
|
|
517
466
|
* this minter
|
|
518
467
|
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
@@ -523,8 +472,8 @@ contract MinterSetPriceMerkleV5 is
|
|
|
523
472
|
* this minter. This minter always returns null address, reserved for ether
|
|
524
473
|
*/
|
|
525
474
|
function getPriceInfo(
|
|
526
|
-
uint256
|
|
527
|
-
address
|
|
475
|
+
uint256 projectId,
|
|
476
|
+
address coreContract
|
|
528
477
|
)
|
|
529
478
|
external
|
|
530
479
|
view
|
|
@@ -536,11 +485,13 @@ contract MinterSetPriceMerkleV5 is
|
|
|
536
485
|
)
|
|
537
486
|
{
|
|
538
487
|
SetPriceLib.SetPriceProjectConfig
|
|
539
|
-
storage
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
488
|
+
storage setPriceProjectConfig_ = SetPriceLib
|
|
489
|
+
.getSetPriceProjectConfig({
|
|
490
|
+
projectId: projectId,
|
|
491
|
+
coreContract: coreContract
|
|
492
|
+
});
|
|
493
|
+
isConfigured = setPriceProjectConfig_.priceIsConfigured;
|
|
494
|
+
tokenPriceInWei = setPriceProjectConfig_.pricePerToken;
|
|
544
495
|
currencySymbol = "ETH";
|
|
545
496
|
currencyAddress = address(0);
|
|
546
497
|
}
|
|
@@ -551,26 +502,26 @@ contract MinterSetPriceMerkleV5 is
|
|
|
551
502
|
* addresses are only limited by the project's maximum invocations, and a
|
|
552
503
|
* dummy value of zero is returned for `mintInvocationsRemaining`.
|
|
553
504
|
* If `projectLimitsMintInvocationsPerAddress` is true, the quantity of
|
|
554
|
-
* remaining mint invocations for address `
|
|
505
|
+
* remaining mint invocations for address `address` is returned as
|
|
555
506
|
* `mintInvocationsRemaining`.
|
|
556
507
|
* Note that mint invocations per address can be changed at any time by the
|
|
557
508
|
* artist of a project.
|
|
558
509
|
* Also note that all mint invocations are limited by a project's maximum
|
|
559
510
|
* invocations as defined on the core contract. This function may return
|
|
560
511
|
* a value greater than the project's remaining invocations.
|
|
561
|
-
* @param
|
|
562
|
-
* @param
|
|
563
|
-
* @param
|
|
512
|
+
* @param projectId Project ID to get remaining invocations for.
|
|
513
|
+
* @param coreContract Contract address of the core contract.
|
|
514
|
+
* @param address_ Wallet address to get remaining invocations for.
|
|
564
515
|
* @return projectLimitsMintInvocationsPerAddress true if project limits
|
|
565
516
|
* mint invocations per address, false if project does not limit mint
|
|
566
517
|
* invocations per address.
|
|
567
518
|
* @return mintInvocationsRemaining quantity of remaining mint invocations
|
|
568
|
-
* for wallet at `
|
|
519
|
+
* for wallet at `address`.
|
|
569
520
|
*/
|
|
570
521
|
function projectRemainingInvocationsForAddress(
|
|
571
|
-
uint256
|
|
572
|
-
address
|
|
573
|
-
address
|
|
522
|
+
uint256 projectId,
|
|
523
|
+
address coreContract,
|
|
524
|
+
address address_
|
|
574
525
|
)
|
|
575
526
|
external
|
|
576
527
|
view
|
|
@@ -579,15 +530,12 @@ contract MinterSetPriceMerkleV5 is
|
|
|
579
530
|
uint256 mintInvocationsRemaining
|
|
580
531
|
)
|
|
581
532
|
{
|
|
582
|
-
MerkleLib.MerkleProjectConfig
|
|
583
|
-
storage _merkleProjectConfig = _merkleProjectConfigMapping[
|
|
584
|
-
_coreContract
|
|
585
|
-
][_projectId];
|
|
586
533
|
return
|
|
587
|
-
MerkleLib.projectRemainingInvocationsForAddress(
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
534
|
+
MerkleLib.projectRemainingInvocationsForAddress({
|
|
535
|
+
projectId: projectId,
|
|
536
|
+
coreContract: coreContract,
|
|
537
|
+
address_: address_
|
|
538
|
+
});
|
|
591
539
|
}
|
|
592
540
|
|
|
593
541
|
/**
|
|
@@ -598,203 +546,167 @@ contract MinterSetPriceMerkleV5 is
|
|
|
598
546
|
* This value can be changed at any time by the artist.
|
|
599
547
|
* @dev default value stated above must be updated if the value of
|
|
600
548
|
* CONFIG_USE_MAX_INVOCATIONS_PER_ADDRESS_OVERRIDE is changed.
|
|
601
|
-
* @param
|
|
602
|
-
* @param
|
|
549
|
+
* @param projectId Project ID to get maximum invocations per address for.
|
|
550
|
+
* @param coreContract Contract address of the core contract.
|
|
603
551
|
* @return Maximum number of invocations per address for project.
|
|
604
552
|
*/
|
|
605
553
|
function projectMaxInvocationsPerAddress(
|
|
606
|
-
uint256
|
|
607
|
-
address
|
|
554
|
+
uint256 projectId,
|
|
555
|
+
address coreContract
|
|
608
556
|
) external view returns (uint256) {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
557
|
+
return
|
|
558
|
+
MerkleLib.projectMaxInvocationsPerAddress({
|
|
559
|
+
projectId: projectId,
|
|
560
|
+
coreContract: coreContract
|
|
561
|
+
});
|
|
614
562
|
}
|
|
615
563
|
|
|
616
564
|
/**
|
|
617
565
|
* @notice Processes a proof for an address.
|
|
618
|
-
* @param
|
|
619
|
-
* @param
|
|
566
|
+
* @param proof The proof to process.
|
|
567
|
+
* @param address_ The address to process the proof for.
|
|
620
568
|
* @return The resulting hash from processing the proof.
|
|
621
569
|
*/
|
|
622
570
|
function processProofForAddress(
|
|
623
|
-
bytes32[] calldata
|
|
624
|
-
address
|
|
571
|
+
bytes32[] calldata proof,
|
|
572
|
+
address address_
|
|
625
573
|
) external pure returns (bytes32) {
|
|
626
|
-
return
|
|
574
|
+
return
|
|
575
|
+
MerkleLib.processProofForAddress({
|
|
576
|
+
proof: proof,
|
|
577
|
+
address_: address_
|
|
578
|
+
});
|
|
627
579
|
}
|
|
628
580
|
|
|
629
581
|
/**
|
|
630
582
|
* @notice Returns hashed address (to be used as merkle tree leaf).
|
|
631
583
|
* Included as a public function to enable users to calculate their hashed
|
|
632
584
|
* address in Solidity when generating proofs off-chain.
|
|
633
|
-
* @param
|
|
585
|
+
* @param address_ address to be hashed
|
|
634
586
|
* @return bytes32 hashed address, via keccak256 (using encodePacked)
|
|
635
587
|
*/
|
|
636
|
-
function hashAddress(address
|
|
637
|
-
return MerkleLib.hashAddress(
|
|
588
|
+
function hashAddress(address address_) external pure returns (bytes32) {
|
|
589
|
+
return MerkleLib.hashAddress(address_);
|
|
638
590
|
}
|
|
639
591
|
|
|
640
592
|
/**
|
|
641
|
-
* @notice Syncs local maximum invocations of project `
|
|
593
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
642
594
|
* the value currently defined in the core contract.
|
|
643
|
-
* @param
|
|
644
|
-
* @param
|
|
595
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
596
|
+
* @param coreContract Core contract address for the given project.
|
|
645
597
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
646
598
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
647
599
|
*/
|
|
648
600
|
function syncProjectMaxInvocationsToCore(
|
|
649
|
-
uint256
|
|
650
|
-
address
|
|
601
|
+
uint256 projectId,
|
|
602
|
+
address coreContract
|
|
651
603
|
) public {
|
|
652
604
|
AuthLib.onlyArtist({
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
605
|
+
projectId: projectId,
|
|
606
|
+
coreContract: coreContract,
|
|
607
|
+
sender: msg.sender
|
|
656
608
|
});
|
|
657
609
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
663
|
-
);
|
|
664
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
665
|
-
_projectId,
|
|
666
|
-
_coreContract,
|
|
667
|
-
maxInvocations
|
|
668
|
-
);
|
|
610
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
611
|
+
projectId: projectId,
|
|
612
|
+
coreContract: coreContract
|
|
613
|
+
});
|
|
669
614
|
}
|
|
670
615
|
|
|
671
616
|
/**
|
|
672
|
-
* @notice Purchases a token from project `
|
|
673
|
-
* the token's owner to `
|
|
674
|
-
* @param
|
|
675
|
-
* @param
|
|
676
|
-
* @param
|
|
677
|
-
* @param
|
|
678
|
-
* @param
|
|
617
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
618
|
+
* the token's owner to `to`.
|
|
619
|
+
* @param to Address to be the new token's owner.
|
|
620
|
+
* @param projectId Project ID to mint a token on.
|
|
621
|
+
* @param coreContract Core contract address for the given project.
|
|
622
|
+
* @param proof Merkle proof for the given project.
|
|
623
|
+
* @param vault Vault being purchased on behalf of. Acceptable to be
|
|
679
624
|
* `address(0)` if no vault.
|
|
680
625
|
* @return tokenId Token ID of minted token
|
|
681
626
|
*/
|
|
682
627
|
function purchaseTo(
|
|
683
|
-
address
|
|
684
|
-
uint256
|
|
685
|
-
address
|
|
686
|
-
bytes32[] calldata
|
|
687
|
-
address
|
|
628
|
+
address to,
|
|
629
|
+
uint256 projectId,
|
|
630
|
+
address coreContract,
|
|
631
|
+
bytes32[] calldata proof,
|
|
632
|
+
address vault // acceptable to be `address(0)` if no vault
|
|
688
633
|
) public payable nonReentrant returns (uint256 tokenId) {
|
|
689
634
|
// CHECKS
|
|
690
|
-
|
|
691
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
692
|
-
_coreContract
|
|
693
|
-
][_projectId];
|
|
694
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
695
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
696
|
-
_coreContract
|
|
697
|
-
][_projectId];
|
|
698
|
-
MerkleLib.MerkleProjectConfig
|
|
699
|
-
storage _merkleProjectConfig = _merkleProjectConfigMapping[
|
|
700
|
-
_coreContract
|
|
701
|
-
][_projectId];
|
|
702
|
-
|
|
635
|
+
// pre-mint MaxInvocationsLib checks
|
|
703
636
|
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
704
637
|
// consumption after a project has been fully minted.
|
|
705
|
-
// `
|
|
638
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
706
639
|
// gas consumption, but if not in sync with the core contract's value,
|
|
707
640
|
// the core contract also enforces its own max invocation check during
|
|
708
641
|
// minting.
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
);
|
|
713
|
-
|
|
714
|
-
// require artist to have configured price of token on this minter
|
|
715
|
-
require(
|
|
716
|
-
_setPriceProjectConfig.priceIsConfigured,
|
|
717
|
-
"Price not configured"
|
|
718
|
-
);
|
|
642
|
+
MaxInvocationsLib.preMintChecks({
|
|
643
|
+
projectId: projectId,
|
|
644
|
+
coreContract: coreContract
|
|
645
|
+
});
|
|
719
646
|
|
|
720
|
-
//
|
|
721
|
-
|
|
647
|
+
// pre-mint checks for set price lib, and get price per token in wei
|
|
648
|
+
// @dev price per token is loaded into memory here for gas efficiency
|
|
649
|
+
uint256 pricePerTokenInWei = SetPriceLib.preMintChecksAndGetPrice({
|
|
650
|
+
projectId: projectId,
|
|
651
|
+
coreContract: coreContract
|
|
652
|
+
});
|
|
722
653
|
|
|
723
654
|
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
724
655
|
|
|
725
656
|
// NOTE: delegate-vault handling **begins here**.
|
|
726
657
|
|
|
727
658
|
// handle that the vault may be either the `msg.sender` in the case
|
|
728
|
-
// that there is not a true vault, or may be `
|
|
659
|
+
// that there is not a true vault, or may be `vault` if one is
|
|
729
660
|
// provided explicitly (and it is valid).
|
|
730
|
-
address
|
|
731
|
-
if (
|
|
661
|
+
address vault_ = msg.sender;
|
|
662
|
+
if (vault != address(0)) {
|
|
732
663
|
// If a vault is provided, it must be valid, otherwise throw rather
|
|
733
664
|
// than optimistically-minting with original `msg.sender`.
|
|
734
665
|
// Note, we do not check `checkDelegateForAll` as well, as it is known
|
|
735
666
|
// to be implicitly checked by calling `checkDelegateForContract`.
|
|
736
|
-
bool isValidDelegee =
|
|
737
|
-
.checkDelegateForContract(
|
|
738
|
-
msg.sender,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
);
|
|
667
|
+
bool isValidDelegee = _delegationRegistryContract
|
|
668
|
+
.checkDelegateForContract({
|
|
669
|
+
delegate: msg.sender,
|
|
670
|
+
vault: vault,
|
|
671
|
+
contract_: coreContract
|
|
672
|
+
});
|
|
742
673
|
require(isValidDelegee, "Invalid delegate-vault pairing");
|
|
743
|
-
|
|
674
|
+
vault_ = vault;
|
|
744
675
|
}
|
|
745
676
|
|
|
746
|
-
//
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
"Invalid Merkle proof"
|
|
754
|
-
);
|
|
755
|
-
|
|
756
|
-
// limit mints per address by project
|
|
757
|
-
uint256 _maxProjectInvocationsPerAddress = MerkleLib
|
|
758
|
-
.projectMaxInvocationsPerAddress(_merkleProjectConfig);
|
|
759
|
-
|
|
760
|
-
// note that mint limits index off of the `vault` (when applicable)
|
|
761
|
-
require(
|
|
762
|
-
_merkleProjectConfig.userMintInvocations[vault] <
|
|
763
|
-
_maxProjectInvocationsPerAddress ||
|
|
764
|
-
_maxProjectInvocationsPerAddress == 0,
|
|
765
|
-
"Max invocations reached"
|
|
766
|
-
);
|
|
677
|
+
// pre-mint MerkleLib checks
|
|
678
|
+
MerkleLib.preMintChecks({
|
|
679
|
+
projectId: projectId,
|
|
680
|
+
coreContract: coreContract,
|
|
681
|
+
proof: proof,
|
|
682
|
+
vault: vault_
|
|
683
|
+
});
|
|
767
684
|
|
|
768
685
|
// EFFECTS
|
|
769
|
-
//
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
}
|
|
686
|
+
// mint effects for MerkleLib
|
|
687
|
+
MerkleLib.mintEffects({
|
|
688
|
+
projectId: projectId,
|
|
689
|
+
coreContract: coreContract,
|
|
690
|
+
vault: vault_
|
|
691
|
+
});
|
|
775
692
|
|
|
776
|
-
tokenId =
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
);
|
|
693
|
+
tokenId = _minterFilter.mint_joo({
|
|
694
|
+
to: to,
|
|
695
|
+
projectId: projectId,
|
|
696
|
+
coreContract: coreContract,
|
|
697
|
+
sender: vault_
|
|
698
|
+
});
|
|
782
699
|
|
|
783
|
-
MaxInvocationsLib.
|
|
784
|
-
tokenId,
|
|
785
|
-
|
|
786
|
-
);
|
|
700
|
+
MaxInvocationsLib.validateMintEffectsInvocations({
|
|
701
|
+
tokenId: tokenId,
|
|
702
|
+
coreContract: coreContract
|
|
703
|
+
});
|
|
787
704
|
|
|
788
705
|
// INTERACTIONS
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
SplitFundsLib.splitFundsETH({
|
|
794
|
-
_projectId: _projectId,
|
|
795
|
-
_pricePerTokenInWei: pricePerTokenInWei,
|
|
796
|
-
_coreContract: _coreContract,
|
|
797
|
-
_isEngine: isEngine
|
|
706
|
+
SplitFundsLib.splitFundsETHRefundSender({
|
|
707
|
+
projectId: projectId,
|
|
708
|
+
pricePerTokenInWei: pricePerTokenInWei,
|
|
709
|
+
coreContract: coreContract
|
|
798
710
|
});
|
|
799
711
|
|
|
800
712
|
return tokenId;
|