@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,21 +1,23 @@
|
|
|
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/IMinterFilterV1.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 {ISharedMinterHolderV0} from "../../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
|
|
11
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
14
12
|
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
13
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
14
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
15
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
16
|
+
import {TokenHolderLib} from "../../libs/v0.8.x/minter-libs/TokenHolderLib.sol";
|
|
17
|
+
import {SetPriceLib} from "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
20
|
+
import {EnumerableSet} from "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
@@ -59,6 +61,13 @@ pragma solidity 0.8.19;
|
|
|
59
61
|
* delegation types include token-level, contract-level (via genArt721CoreAddress), or
|
|
60
62
|
* wallet-level delegation. Contract-level delegations must be configured for the core
|
|
61
63
|
* token contract as returned by the public immutable variable `genArt721CoreAddress`.
|
|
64
|
+
* ----------------------------------------------------------------------------
|
|
65
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
66
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
67
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
68
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
69
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
70
|
+
* checks performed by this minter's Minter Filter.
|
|
62
71
|
*/
|
|
63
72
|
contract MinterSetPriceHolderV5 is
|
|
64
73
|
ReentrancyGuard,
|
|
@@ -72,13 +81,13 @@ contract MinterSetPriceHolderV5 is
|
|
|
72
81
|
address public immutable minterFilterAddress;
|
|
73
82
|
|
|
74
83
|
/// Minter filter this minter may interact with.
|
|
75
|
-
IMinterFilterV1 private immutable
|
|
84
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
76
85
|
|
|
77
86
|
/// Delegation registry address
|
|
78
87
|
address public immutable delegationRegistryAddress;
|
|
79
88
|
|
|
80
89
|
/// Delegation registry address
|
|
81
|
-
IDelegationRegistry private immutable
|
|
90
|
+
IDelegationRegistry private immutable _delegationRegistryContract;
|
|
82
91
|
|
|
83
92
|
/// minterType for this minter
|
|
84
93
|
string public constant minterType = "MinterSetPriceHolderV5";
|
|
@@ -86,56 +95,6 @@ contract MinterSetPriceHolderV5 is
|
|
|
86
95
|
/// minter version for this minter
|
|
87
96
|
string public constant minterVersion = "v5.0.0";
|
|
88
97
|
|
|
89
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
90
|
-
// STATE VARIABLES FOR SetPriceLib begin here
|
|
91
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
92
|
-
|
|
93
|
-
/// contractAddress => projectId => set price project config
|
|
94
|
-
mapping(address => mapping(uint256 => SetPriceLib.SetPriceProjectConfig))
|
|
95
|
-
private _setPriceProjectConfigMapping;
|
|
96
|
-
|
|
97
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
98
|
-
// STATE VARIABLES FOR SetPriceLib end here
|
|
99
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
100
|
-
|
|
101
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
102
|
-
// STATE VARIABLES FOR SplitFundsLib begin here
|
|
103
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
104
|
-
|
|
105
|
-
// contractAddress => IsEngineCache
|
|
106
|
-
mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
|
|
107
|
-
|
|
108
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
109
|
-
// STATE VARIABLES FOR SplitFundsLib end here
|
|
110
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
111
|
-
|
|
112
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
113
|
-
// STATE VARIABLES FOR MaxInvocationsLib begin here
|
|
114
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
115
|
-
|
|
116
|
-
// contractAddress => projectId => max invocations specific project config
|
|
117
|
-
mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
|
|
118
|
-
private _maxInvocationsProjectConfigMapping;
|
|
119
|
-
|
|
120
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
121
|
-
// STATE VARIABLES FOR MaxInvocationsLib end here
|
|
122
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
123
|
-
|
|
124
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
125
|
-
// STATE VARIABLES FOR TokenHolderLib begin here
|
|
126
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* coreContract => projectId => ownedNFTAddress => ownedNFTProjectIds => bool
|
|
130
|
-
* projects whose holders are allowed to purchase a token on `projectId`
|
|
131
|
-
*/
|
|
132
|
-
mapping(address => mapping(uint256 => TokenHolderLib.HolderProjectConfig))
|
|
133
|
-
private _allowedProjectHoldersMapping;
|
|
134
|
-
|
|
135
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
136
|
-
// STATE VARIABLES FOR TokenHolderLib end here
|
|
137
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
138
|
-
|
|
139
98
|
// MODIFIERS
|
|
140
99
|
// @dev contract uses modifier-like internal functions instead of modifiers
|
|
141
100
|
// to reduce contract bytecode size
|
|
@@ -143,429 +102,393 @@ contract MinterSetPriceHolderV5 is
|
|
|
143
102
|
|
|
144
103
|
/**
|
|
145
104
|
* @notice Initializes contract to be a Filtered Minter for
|
|
146
|
-
* `
|
|
147
|
-
* @param
|
|
105
|
+
* `minterFilter` minter filter.
|
|
106
|
+
* @param minterFilter Minter filter for which this will be a
|
|
148
107
|
* filtered minter.
|
|
149
|
-
* @param
|
|
108
|
+
* @param delegationRegistryAddress_ Delegation registry contract address.
|
|
150
109
|
*/
|
|
151
110
|
constructor(
|
|
152
|
-
address
|
|
153
|
-
address
|
|
111
|
+
address minterFilter,
|
|
112
|
+
address delegationRegistryAddress_
|
|
154
113
|
) ReentrancyGuard() {
|
|
155
|
-
minterFilterAddress =
|
|
156
|
-
|
|
114
|
+
minterFilterAddress = minterFilter;
|
|
115
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
157
116
|
|
|
158
|
-
delegationRegistryAddress =
|
|
159
|
-
|
|
160
|
-
|
|
117
|
+
delegationRegistryAddress = delegationRegistryAddress_;
|
|
118
|
+
_delegationRegistryContract = IDelegationRegistry(
|
|
119
|
+
delegationRegistryAddress_
|
|
120
|
+
);
|
|
121
|
+
emit TokenHolderLib.DelegationRegistryUpdated(
|
|
122
|
+
delegationRegistryAddress_
|
|
161
123
|
);
|
|
162
|
-
emit DelegationRegistryUpdated(_delegationRegistryAddress);
|
|
163
124
|
}
|
|
164
125
|
|
|
165
126
|
/**
|
|
166
|
-
* @notice Manually sets the local maximum invocations of project `
|
|
167
|
-
* with the provided `
|
|
168
|
-
* than or equal to the value of project `
|
|
127
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
128
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
129
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
169
130
|
* set on the core contract.
|
|
170
|
-
* @dev Note that a `
|
|
131
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
171
132
|
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
172
133
|
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
173
|
-
* @param
|
|
174
|
-
* @param
|
|
175
|
-
* @param
|
|
134
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
135
|
+
* @param coreContract Core contract address for the given project.
|
|
136
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
176
137
|
*/
|
|
177
138
|
function manuallyLimitProjectMaxInvocations(
|
|
178
|
-
uint256
|
|
179
|
-
address
|
|
180
|
-
uint24
|
|
139
|
+
uint256 projectId,
|
|
140
|
+
address coreContract,
|
|
141
|
+
uint24 maxInvocations
|
|
181
142
|
) external {
|
|
182
143
|
AuthLib.onlyArtist({
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
144
|
+
projectId: projectId,
|
|
145
|
+
coreContract: coreContract,
|
|
146
|
+
sender: msg.sender
|
|
147
|
+
});
|
|
148
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
149
|
+
projectId: projectId,
|
|
150
|
+
coreContract: coreContract,
|
|
151
|
+
maxInvocations: maxInvocations
|
|
186
152
|
});
|
|
187
|
-
MaxInvocationsLib.manuallyLimitProjectMaxInvocations(
|
|
188
|
-
_projectId,
|
|
189
|
-
_coreContract,
|
|
190
|
-
_maxInvocations,
|
|
191
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
192
|
-
);
|
|
193
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
194
|
-
_projectId,
|
|
195
|
-
_coreContract,
|
|
196
|
-
_maxInvocations
|
|
197
|
-
);
|
|
198
153
|
}
|
|
199
154
|
|
|
200
155
|
/**
|
|
201
|
-
* @notice Updates this minter's price per token of project `
|
|
156
|
+
* @notice Updates this minter's price per token of project `projectId`
|
|
202
157
|
* to be '_pricePerTokenInWei`, in Wei.
|
|
203
158
|
* @dev Note that it is intentionally supported here that the configured
|
|
204
159
|
* price may be explicitly set to `0`.
|
|
205
|
-
* @param
|
|
206
|
-
* @param
|
|
207
|
-
* @param
|
|
160
|
+
* @param projectId Project ID to set the price per token for.
|
|
161
|
+
* @param coreContract Core contract address for the given project.
|
|
162
|
+
* @param pricePerTokenInWei Price per token to set for the project, in Wei.
|
|
208
163
|
*/
|
|
209
164
|
function updatePricePerTokenInWei(
|
|
210
|
-
uint256
|
|
211
|
-
address
|
|
212
|
-
uint248
|
|
165
|
+
uint256 projectId,
|
|
166
|
+
address coreContract,
|
|
167
|
+
uint248 pricePerTokenInWei
|
|
213
168
|
) external {
|
|
214
169
|
AuthLib.onlyArtist({
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
170
|
+
projectId: projectId,
|
|
171
|
+
coreContract: coreContract,
|
|
172
|
+
sender: msg.sender
|
|
173
|
+
});
|
|
174
|
+
SetPriceLib.updatePricePerToken({
|
|
175
|
+
projectId: projectId,
|
|
176
|
+
coreContract: coreContract,
|
|
177
|
+
pricePerToken: pricePerTokenInWei
|
|
218
178
|
});
|
|
219
|
-
SetPriceLib.SetPriceProjectConfig
|
|
220
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
221
|
-
_coreContract
|
|
222
|
-
][_projectId];
|
|
223
|
-
SetPriceLib.updatePricePerTokenInWei(
|
|
224
|
-
_pricePerTokenInWei,
|
|
225
|
-
_setPriceProjectConfig
|
|
226
|
-
);
|
|
227
|
-
emit PricePerTokenInWeiUpdated(
|
|
228
|
-
_projectId,
|
|
229
|
-
_coreContract,
|
|
230
|
-
_pricePerTokenInWei
|
|
231
|
-
);
|
|
232
179
|
|
|
233
180
|
// for convenience, sync local max invocations to the core contract if
|
|
234
181
|
// and only if max invocations have not already been synced.
|
|
235
182
|
// @dev do not sync if max invocations have already been synced, as
|
|
236
183
|
// local max invocations could have been manually set to be
|
|
237
184
|
// intentionally less than the core contract's max invocations.
|
|
238
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
239
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
240
|
-
_coreContract
|
|
241
|
-
][_projectId];
|
|
242
185
|
// @dev if local maxInvocations and maxHasBeenInvoked are both
|
|
243
186
|
// initial values, we know they have not been populated on this minter
|
|
244
187
|
if (
|
|
245
|
-
MaxInvocationsLib.maxInvocationsIsUnconfigured(
|
|
246
|
-
|
|
247
|
-
|
|
188
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
189
|
+
projectId: projectId,
|
|
190
|
+
coreContract: coreContract
|
|
191
|
+
})
|
|
248
192
|
) {
|
|
249
|
-
syncProjectMaxInvocationsToCore(
|
|
193
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
194
|
+
projectId: projectId,
|
|
195
|
+
coreContract: coreContract
|
|
196
|
+
});
|
|
250
197
|
}
|
|
251
198
|
}
|
|
252
199
|
|
|
253
200
|
/**
|
|
254
|
-
* @notice Allows holders of NFTs at addresses `
|
|
255
|
-
* project IDs `
|
|
256
|
-
* `
|
|
257
|
-
* e.g. Allows holders of project `
|
|
258
|
-
* contract `
|
|
201
|
+
* @notice Allows holders of NFTs at addresses `ownedNFTAddresses`,
|
|
202
|
+
* project IDs `ownedNFTProjectIds` to mint on project `projectId`.
|
|
203
|
+
* `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
|
|
204
|
+
* e.g. Allows holders of project `ownedNFTProjectIds[0]` on token
|
|
205
|
+
* contract `ownedNFTAddresses[0]` to mint `projectId`.
|
|
259
206
|
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
260
207
|
* due to assumptions about tokenId and projectId relationships.
|
|
261
|
-
* @param
|
|
262
|
-
* @param
|
|
263
|
-
* @param
|
|
264
|
-
* allowlisted. Indexes must align with `
|
|
265
|
-
* @param
|
|
266
|
-
* holders shall be allowlisted to mint project `
|
|
267
|
-
* align with `
|
|
208
|
+
* @param projectId Project ID to enable minting on.
|
|
209
|
+
* @param coreContract Core contract address for the given project.
|
|
210
|
+
* @param ownedNFTAddresses NFT core addresses of projects to be
|
|
211
|
+
* allowlisted. Indexes must align with `ownedNFTProjectIds`.
|
|
212
|
+
* @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
|
|
213
|
+
* holders shall be allowlisted to mint project `projectId`. Indexes must
|
|
214
|
+
* align with `ownedNFTAddresses`.
|
|
268
215
|
*/
|
|
269
216
|
function allowHoldersOfProjects(
|
|
270
|
-
uint256
|
|
271
|
-
address
|
|
272
|
-
address[]
|
|
273
|
-
uint256[]
|
|
217
|
+
uint256 projectId,
|
|
218
|
+
address coreContract,
|
|
219
|
+
address[] calldata ownedNFTAddresses,
|
|
220
|
+
uint256[] calldata ownedNFTProjectIds
|
|
274
221
|
) external {
|
|
275
222
|
AuthLib.onlyArtist({
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
223
|
+
projectId: projectId,
|
|
224
|
+
coreContract: coreContract,
|
|
225
|
+
sender: msg.sender
|
|
279
226
|
});
|
|
280
227
|
TokenHolderLib.allowHoldersOfProjects({
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
228
|
+
projectId: projectId,
|
|
229
|
+
coreContract: coreContract,
|
|
230
|
+
ownedNFTAddresses: ownedNFTAddresses,
|
|
231
|
+
ownedNFTProjectIds: ownedNFTProjectIds
|
|
286
232
|
});
|
|
287
|
-
|
|
288
|
-
// emit approve event
|
|
289
|
-
emit AllowedHoldersOfProjects(
|
|
290
|
-
_projectId,
|
|
291
|
-
_coreContract,
|
|
292
|
-
_ownedNFTAddresses,
|
|
293
|
-
_ownedNFTProjectIds
|
|
294
|
-
);
|
|
295
233
|
}
|
|
296
234
|
|
|
297
235
|
/**
|
|
298
|
-
* @notice Removes holders of NFTs at addresses `
|
|
299
|
-
* project IDs `
|
|
236
|
+
* @notice Removes holders of NFTs at addresses `ownedNFTAddresses`,
|
|
237
|
+
* project IDs `ownedNFTProjectIds` to mint on project `projectId`. If
|
|
300
238
|
* other projects owned by a holder are still allowed to mint, holder will
|
|
301
239
|
* maintain ability to purchase.
|
|
302
|
-
* `
|
|
303
|
-
* e.g. Removes holders of project `
|
|
304
|
-
* contract `
|
|
305
|
-
* @param
|
|
306
|
-
* @param
|
|
307
|
-
* @param
|
|
308
|
-
* from allowlist. Indexes must align with `
|
|
309
|
-
* @param
|
|
310
|
-
* holders will be removed from allowlist to mint project `
|
|
311
|
-
* Indexes must align with `
|
|
240
|
+
* `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
|
|
241
|
+
* e.g. Removes holders of project `ownedNFTProjectIds[0]` on token
|
|
242
|
+
* contract `ownedNFTAddresses[0]` from mint allowlist of `projectId`.
|
|
243
|
+
* @param projectId Project ID to enable minting on.
|
|
244
|
+
* @param coreContract Core contract address for the given project.
|
|
245
|
+
* @param ownedNFTAddresses NFT core addresses of projects to be removed
|
|
246
|
+
* from allowlist. Indexes must align with `ownedNFTProjectIds`.
|
|
247
|
+
* @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
|
|
248
|
+
* holders will be removed from allowlist to mint project `projectId`.
|
|
249
|
+
* Indexes must align with `ownedNFTAddresses`.
|
|
312
250
|
*/
|
|
313
251
|
function removeHoldersOfProjects(
|
|
314
|
-
uint256
|
|
315
|
-
address
|
|
316
|
-
address[]
|
|
317
|
-
uint256[]
|
|
252
|
+
uint256 projectId,
|
|
253
|
+
address coreContract,
|
|
254
|
+
address[] calldata ownedNFTAddresses,
|
|
255
|
+
uint256[] calldata ownedNFTProjectIds
|
|
318
256
|
) external {
|
|
319
257
|
AuthLib.onlyArtist({
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
258
|
+
projectId: projectId,
|
|
259
|
+
coreContract: coreContract,
|
|
260
|
+
sender: msg.sender
|
|
323
261
|
});
|
|
324
|
-
// require same length arrays
|
|
325
262
|
TokenHolderLib.removeHoldersOfProjects({
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
263
|
+
projectId: projectId,
|
|
264
|
+
coreContract: coreContract,
|
|
265
|
+
ownedNFTAddresses: ownedNFTAddresses,
|
|
266
|
+
ownedNFTProjectIds: ownedNFTProjectIds
|
|
331
267
|
});
|
|
332
|
-
|
|
333
|
-
// emit removed event
|
|
334
|
-
emit RemovedHoldersOfProjects(
|
|
335
|
-
_projectId,
|
|
336
|
-
_coreContract,
|
|
337
|
-
_ownedNFTAddresses,
|
|
338
|
-
_ownedNFTProjectIds
|
|
339
|
-
);
|
|
340
268
|
}
|
|
341
269
|
|
|
342
270
|
/**
|
|
343
|
-
* @notice Allows holders of NFTs at addresses `
|
|
344
|
-
* project IDs `
|
|
345
|
-
* Also removes holders of NFTs at addresses `
|
|
346
|
-
* project IDs `
|
|
347
|
-
* `
|
|
348
|
-
* `
|
|
349
|
-
* `
|
|
350
|
-
* e.g. Allows holders of project `
|
|
351
|
-
* contract `
|
|
352
|
-
* `
|
|
353
|
-
* `
|
|
271
|
+
* @notice Allows holders of NFTs at addresses `ownedNFTAddressesAdd`,
|
|
272
|
+
* project IDs `ownedNFTProjectIdsAdd` to mint on project `projectId`.
|
|
273
|
+
* Also removes holders of NFTs at addresses `ownedNFTAddressesRemove`,
|
|
274
|
+
* project IDs `ownedNFTProjectIdsRemove` from minting on project
|
|
275
|
+
* `projectId`.
|
|
276
|
+
* `ownedNFTAddressesAdd` assumed to be aligned with
|
|
277
|
+
* `ownedNFTProjectIdsAdd`.
|
|
278
|
+
* e.g. Allows holders of project `ownedNFTProjectIdsAdd[0]` on token
|
|
279
|
+
* contract `ownedNFTAddressesAdd[0]` to mint `projectId`.
|
|
280
|
+
* `ownedNFTAddressesRemove` also assumed to be aligned with
|
|
281
|
+
* `ownedNFTProjectIdsRemove`.
|
|
354
282
|
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
355
283
|
* due to assumptions about tokenId and projectId relationships.
|
|
356
|
-
* @param
|
|
357
|
-
* @param
|
|
358
|
-
* @param
|
|
359
|
-
* allowlisted. Indexes must align with `
|
|
360
|
-
* @param
|
|
361
|
-
* whose holders shall be allowlisted to mint project `
|
|
362
|
-
* must align with `
|
|
363
|
-
* @param
|
|
284
|
+
* @param projectId Project ID to enable minting on.
|
|
285
|
+
* @param coreContract Core contract address for the given project.
|
|
286
|
+
* @param ownedNFTAddressesAdd NFT core addresses of projects to be
|
|
287
|
+
* allowlisted. Indexes must align with `ownedNFTProjectIdsAdd`.
|
|
288
|
+
* @param ownedNFTProjectIdsAdd Project IDs on `ownedNFTAddressesAdd`
|
|
289
|
+
* whose holders shall be allowlisted to mint project `projectId`. Indexes
|
|
290
|
+
* must align with `ownedNFTAddressesAdd`.
|
|
291
|
+
* @param ownedNFTAddressesRemove NFT core addresses of projects to be
|
|
364
292
|
* removed from allowlist. Indexes must align with
|
|
365
|
-
* `
|
|
366
|
-
* @param
|
|
367
|
-
* `
|
|
368
|
-
* to mint project `
|
|
369
|
-
* `
|
|
293
|
+
* `ownedNFTProjectIdsRemove`.
|
|
294
|
+
* @param ownedNFTProjectIdsRemove Project IDs on
|
|
295
|
+
* `ownedNFTAddressesRemove` whose holders will be removed from allowlist
|
|
296
|
+
* to mint project `projectId`. Indexes must align with
|
|
297
|
+
* `ownedNFTAddressesRemove`.
|
|
370
298
|
* @dev if a project is included in both add and remove arrays, it will be
|
|
371
299
|
* removed.
|
|
372
300
|
*/
|
|
373
301
|
function allowAndRemoveHoldersOfProjects(
|
|
374
|
-
uint256
|
|
375
|
-
address
|
|
376
|
-
address[]
|
|
377
|
-
uint256[]
|
|
378
|
-
address[]
|
|
379
|
-
uint256[]
|
|
302
|
+
uint256 projectId,
|
|
303
|
+
address coreContract,
|
|
304
|
+
address[] calldata ownedNFTAddressesAdd,
|
|
305
|
+
uint256[] calldata ownedNFTProjectIdsAdd,
|
|
306
|
+
address[] calldata ownedNFTAddressesRemove,
|
|
307
|
+
uint256[] calldata ownedNFTProjectIdsRemove
|
|
380
308
|
) external {
|
|
381
309
|
AuthLib.onlyArtist({
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
310
|
+
projectId: projectId,
|
|
311
|
+
coreContract: coreContract,
|
|
312
|
+
sender: msg.sender
|
|
385
313
|
});
|
|
386
314
|
TokenHolderLib.allowAndRemoveHoldersOfProjects({
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
_ownedNFTProjectIdsRemove: _ownedNFTProjectIdsRemove
|
|
315
|
+
projectId: projectId,
|
|
316
|
+
coreContract: coreContract,
|
|
317
|
+
ownedNFTAddressesAdd: ownedNFTAddressesAdd,
|
|
318
|
+
ownedNFTProjectIdsAdd: ownedNFTProjectIdsAdd,
|
|
319
|
+
ownedNFTAddressesRemove: ownedNFTAddressesRemove,
|
|
320
|
+
ownedNFTProjectIdsRemove: ownedNFTProjectIdsRemove
|
|
394
321
|
});
|
|
395
|
-
|
|
396
|
-
// emit events
|
|
397
|
-
emit AllowedHoldersOfProjects(
|
|
398
|
-
_projectId,
|
|
399
|
-
_coreContract,
|
|
400
|
-
_ownedNFTAddressesAdd,
|
|
401
|
-
_ownedNFTProjectIdsAdd
|
|
402
|
-
);
|
|
403
|
-
emit RemovedHoldersOfProjects(
|
|
404
|
-
_projectId,
|
|
405
|
-
_coreContract,
|
|
406
|
-
_ownedNFTAddressesRemove,
|
|
407
|
-
_ownedNFTProjectIdsRemove
|
|
408
|
-
);
|
|
409
322
|
}
|
|
410
323
|
|
|
411
324
|
/**
|
|
412
|
-
* @notice Purchases a token from project `
|
|
413
|
-
* @param
|
|
414
|
-
* @param
|
|
415
|
-
* @param
|
|
325
|
+
* @notice Purchases a token from project `projectId`.
|
|
326
|
+
* @param projectId Project ID to mint a token on.
|
|
327
|
+
* @param coreContract Core contract address for the given project.
|
|
328
|
+
* @param ownedNFTAddress ERC-721 NFT address holding the project token
|
|
416
329
|
* owned by msg.sender being used to prove right to purchase.
|
|
417
|
-
* @param
|
|
330
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
418
331
|
* to prove right to purchase.
|
|
419
332
|
* @return tokenId Token ID of minted token
|
|
420
333
|
*/
|
|
421
334
|
function purchase(
|
|
422
|
-
uint256
|
|
423
|
-
address
|
|
424
|
-
address
|
|
425
|
-
uint256
|
|
335
|
+
uint256 projectId,
|
|
336
|
+
address coreContract,
|
|
337
|
+
address ownedNFTAddress,
|
|
338
|
+
uint256 ownedNFTTokenId
|
|
426
339
|
) external payable returns (uint256 tokenId) {
|
|
427
|
-
tokenId = purchaseTo(
|
|
428
|
-
msg.sender,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
address(0)
|
|
434
|
-
);
|
|
340
|
+
tokenId = purchaseTo({
|
|
341
|
+
to: msg.sender,
|
|
342
|
+
projectId: projectId,
|
|
343
|
+
coreContract: coreContract,
|
|
344
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
345
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
346
|
+
vault: address(0)
|
|
347
|
+
});
|
|
435
348
|
return tokenId;
|
|
436
349
|
}
|
|
437
350
|
|
|
438
351
|
/**
|
|
439
|
-
* @notice Purchases a token from project `
|
|
440
|
-
* the token's owner to `
|
|
441
|
-
* @param
|
|
442
|
-
* @param
|
|
443
|
-
* @param
|
|
444
|
-
* @param
|
|
352
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
353
|
+
* the token's owner to `to`.
|
|
354
|
+
* @param to Address to be the new token's owner.
|
|
355
|
+
* @param projectId Project ID to mint a token on.
|
|
356
|
+
* @param coreContract Core contract address for the given project.
|
|
357
|
+
* @param ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
445
358
|
* msg.sender being used to claim right to purchase.
|
|
446
|
-
* @param
|
|
359
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
447
360
|
* to claim right to purchase.
|
|
448
361
|
* @return tokenId Token ID of minted token
|
|
449
362
|
*/
|
|
450
363
|
function purchaseTo(
|
|
451
|
-
address
|
|
452
|
-
uint256
|
|
453
|
-
address
|
|
454
|
-
address
|
|
455
|
-
uint256
|
|
364
|
+
address to,
|
|
365
|
+
uint256 projectId,
|
|
366
|
+
address coreContract,
|
|
367
|
+
address ownedNFTAddress,
|
|
368
|
+
uint256 ownedNFTTokenId
|
|
456
369
|
) external payable returns (uint256 tokenId) {
|
|
457
370
|
return
|
|
458
|
-
purchaseTo(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
address(0)
|
|
465
|
-
);
|
|
371
|
+
purchaseTo({
|
|
372
|
+
to: to,
|
|
373
|
+
projectId: projectId,
|
|
374
|
+
coreContract: coreContract,
|
|
375
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
376
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
377
|
+
vault: address(0)
|
|
378
|
+
});
|
|
466
379
|
}
|
|
467
380
|
|
|
468
381
|
// public getter functions
|
|
469
382
|
/**
|
|
470
383
|
* @notice Gets the maximum invocations project configuration.
|
|
471
|
-
* @param
|
|
472
|
-
* @param
|
|
384
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
385
|
+
* @param coreContract The address of the core contract.
|
|
473
386
|
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
474
387
|
* configuration data.
|
|
475
388
|
*/
|
|
476
389
|
function maxInvocationsProjectConfig(
|
|
477
|
-
uint256
|
|
478
|
-
address
|
|
390
|
+
uint256 projectId,
|
|
391
|
+
address coreContract
|
|
479
392
|
)
|
|
480
393
|
external
|
|
481
394
|
view
|
|
482
395
|
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
483
396
|
{
|
|
484
|
-
return
|
|
397
|
+
return
|
|
398
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
399
|
+
projectId: projectId,
|
|
400
|
+
coreContract: coreContract
|
|
401
|
+
});
|
|
485
402
|
}
|
|
486
403
|
|
|
487
404
|
/**
|
|
488
405
|
* @notice Gets the set price project configuration.
|
|
489
|
-
* @param
|
|
490
|
-
* @param
|
|
406
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
407
|
+
* @param coreContract The address of the core contract.
|
|
491
408
|
* @return SetPriceProjectConfig struct with the fixed price project
|
|
492
409
|
* configuration data.
|
|
493
410
|
*/
|
|
494
411
|
function setPriceProjectConfig(
|
|
495
|
-
uint256
|
|
496
|
-
address
|
|
412
|
+
uint256 projectId,
|
|
413
|
+
address coreContract
|
|
497
414
|
) external view returns (SetPriceLib.SetPriceProjectConfig memory) {
|
|
498
|
-
return
|
|
415
|
+
return
|
|
416
|
+
SetPriceLib.getSetPriceProjectConfig({
|
|
417
|
+
projectId: projectId,
|
|
418
|
+
coreContract: coreContract
|
|
419
|
+
});
|
|
499
420
|
}
|
|
500
421
|
|
|
501
422
|
/**
|
|
502
423
|
* @notice Checks if a specific NFT owner is allowed in a given project.
|
|
503
424
|
* @dev This function retrieves the allowance status of an NFT owner
|
|
504
425
|
* within a specific project from the allowedProjectHoldersMapping.
|
|
505
|
-
* @param
|
|
506
|
-
* @param
|
|
507
|
-
* @param
|
|
508
|
-
* @param
|
|
426
|
+
* @param projectId The ID of the project to check.
|
|
427
|
+
* @param coreContract Core contract address for the given project.
|
|
428
|
+
* @param ownedNFTAddress The address of the owned NFT contract.
|
|
429
|
+
* @param ownedNFTProjectId The ID of the owned NFT project.
|
|
509
430
|
* @return bool True if the NFT owner is allowed in the given project, False otherwise.
|
|
510
431
|
*/
|
|
511
432
|
function allowedProjectHolders(
|
|
512
|
-
uint256
|
|
513
|
-
address
|
|
514
|
-
address
|
|
515
|
-
uint256
|
|
433
|
+
uint256 projectId,
|
|
434
|
+
address coreContract,
|
|
435
|
+
address ownedNFTAddress,
|
|
436
|
+
uint256 ownedNFTProjectId
|
|
516
437
|
) external view returns (bool) {
|
|
517
438
|
return
|
|
518
|
-
|
|
519
|
-
.
|
|
439
|
+
TokenHolderLib
|
|
440
|
+
.getHolderProjectConfig({
|
|
441
|
+
projectId: projectId,
|
|
442
|
+
coreContract: coreContract
|
|
443
|
+
})
|
|
444
|
+
.allowedProjectHolders[ownedNFTAddress][ownedNFTProjectId];
|
|
520
445
|
}
|
|
521
446
|
|
|
522
447
|
/**
|
|
523
|
-
* @notice Returns if token is an allowlisted NFT for project `
|
|
524
|
-
* @param
|
|
525
|
-
* @param
|
|
526
|
-
* @param
|
|
527
|
-
* @param
|
|
448
|
+
* @notice Returns if token is an allowlisted NFT for project `projectId`.
|
|
449
|
+
* @param projectId Project ID to be checked.
|
|
450
|
+
* @param coreContract Core contract address for the given project.
|
|
451
|
+
* @param ownedNFTAddress ERC-721 NFT token address to be checked.
|
|
452
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID to be checked.
|
|
528
453
|
* @return bool Token is allowlisted
|
|
529
454
|
* @dev does not check if token has been used to purchase
|
|
530
455
|
* @dev assumes project ID can be derived from tokenId / 1_000_000
|
|
531
456
|
*/
|
|
532
457
|
function isAllowlistedNFT(
|
|
533
|
-
uint256
|
|
534
|
-
address
|
|
535
|
-
address
|
|
536
|
-
uint256
|
|
458
|
+
uint256 projectId,
|
|
459
|
+
address coreContract,
|
|
460
|
+
address ownedNFTAddress,
|
|
461
|
+
uint256 ownedNFTTokenId
|
|
537
462
|
) external view returns (bool) {
|
|
538
463
|
return
|
|
539
464
|
TokenHolderLib.isAllowlistedNFT({
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
_ownedNFTTokenId: _ownedNFTTokenId
|
|
465
|
+
projectId: projectId,
|
|
466
|
+
coreContract: coreContract,
|
|
467
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
468
|
+
ownedNFTTokenId: ownedNFTTokenId
|
|
545
469
|
});
|
|
546
470
|
}
|
|
547
471
|
|
|
548
472
|
/**
|
|
549
|
-
* @notice Checks if the specified `
|
|
550
|
-
* @dev This function retrieves the cached value of `
|
|
473
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
474
|
+
* @dev This function retrieves the cached value of `isEngine` from
|
|
551
475
|
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
552
|
-
* returns the cached value. Otherwise, it calls the `
|
|
553
|
-
* function from the `SplitFundsLib` library to check if `
|
|
476
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
477
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
554
478
|
* is a valid engine contract.
|
|
555
|
-
* @dev This function will revert if the provided `
|
|
479
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
556
480
|
* a valid Engine or V3 Flagship contract.
|
|
557
|
-
* @param
|
|
558
|
-
* @return bool indicating if `
|
|
481
|
+
* @param coreContract The address of the contract to check.
|
|
482
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
559
483
|
*/
|
|
560
|
-
function isEngineView(address
|
|
561
|
-
SplitFundsLib.IsEngineCache storage isEngineCache =
|
|
562
|
-
|
|
563
|
-
];
|
|
484
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
485
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
486
|
+
.getIsEngineCacheConfig(coreContract);
|
|
564
487
|
if (isEngineCache.isCached) {
|
|
565
488
|
return isEngineCache.isEngine;
|
|
566
489
|
} else {
|
|
567
|
-
// @dev this calls the non-modifying variant of
|
|
568
|
-
return SplitFundsLib.getV3CoreIsEngineView(
|
|
490
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
491
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
569
492
|
}
|
|
570
493
|
}
|
|
571
494
|
|
|
@@ -580,17 +503,18 @@ contract MinterSetPriceHolderV5 is
|
|
|
580
503
|
* possible because the V3 core contract only allows maximum invocations
|
|
581
504
|
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
582
505
|
* do not do input validation in this method as to whether or not the input
|
|
583
|
-
* @param
|
|
584
|
-
* @param
|
|
506
|
+
* @param projectId is an existing project ID.
|
|
507
|
+
* @param coreContract is an existing core contract address.
|
|
585
508
|
*/
|
|
586
509
|
function projectMaxHasBeenInvoked(
|
|
587
|
-
uint256
|
|
588
|
-
address
|
|
510
|
+
uint256 projectId,
|
|
511
|
+
address coreContract
|
|
589
512
|
) external view returns (bool) {
|
|
590
513
|
return
|
|
591
|
-
MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
592
|
-
|
|
593
|
-
|
|
514
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
515
|
+
projectId: projectId,
|
|
516
|
+
coreContract: coreContract
|
|
517
|
+
});
|
|
594
518
|
}
|
|
595
519
|
|
|
596
520
|
/**
|
|
@@ -609,26 +533,27 @@ contract MinterSetPriceHolderV5 is
|
|
|
609
533
|
* increased. When this happens, the minter will enable minting, allowing
|
|
610
534
|
* the core contract to enforce the max invocations check. Based on this
|
|
611
535
|
* rationale, we intentionally do not do input validation in this method as
|
|
612
|
-
* to whether or not the input `
|
|
613
|
-
* @param
|
|
614
|
-
* @param
|
|
536
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
537
|
+
* @param projectId is an existing project ID.
|
|
538
|
+
* @param coreContract is an existing core contract address.
|
|
615
539
|
*/
|
|
616
540
|
function projectMaxInvocations(
|
|
617
|
-
uint256
|
|
618
|
-
address
|
|
541
|
+
uint256 projectId,
|
|
542
|
+
address coreContract
|
|
619
543
|
) external view returns (uint256) {
|
|
620
544
|
return
|
|
621
|
-
MaxInvocationsLib.getMaxInvocations(
|
|
622
|
-
|
|
623
|
-
|
|
545
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
546
|
+
projectId: projectId,
|
|
547
|
+
coreContract: coreContract
|
|
548
|
+
});
|
|
624
549
|
}
|
|
625
550
|
|
|
626
551
|
/**
|
|
627
552
|
* @notice Gets if price of token is configured, price of minting a
|
|
628
|
-
* token on project `
|
|
553
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
629
554
|
* used as payment.
|
|
630
|
-
* @param
|
|
631
|
-
* @param
|
|
555
|
+
* @param projectId Project ID to get price information for
|
|
556
|
+
* @param coreContract Contract address of the core contract
|
|
632
557
|
* @return isConfigured true only if token price has been configured on
|
|
633
558
|
* this minter
|
|
634
559
|
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
@@ -639,8 +564,8 @@ contract MinterSetPriceHolderV5 is
|
|
|
639
564
|
* this minter. This minter always returns null address, reserved for ether
|
|
640
565
|
*/
|
|
641
566
|
function getPriceInfo(
|
|
642
|
-
uint256
|
|
643
|
-
address
|
|
567
|
+
uint256 projectId,
|
|
568
|
+
address coreContract
|
|
644
569
|
)
|
|
645
570
|
external
|
|
646
571
|
view
|
|
@@ -652,107 +577,91 @@ contract MinterSetPriceHolderV5 is
|
|
|
652
577
|
)
|
|
653
578
|
{
|
|
654
579
|
SetPriceLib.SetPriceProjectConfig
|
|
655
|
-
storage
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
580
|
+
storage setPriceProjectConfig_ = SetPriceLib
|
|
581
|
+
.getSetPriceProjectConfig({
|
|
582
|
+
projectId: projectId,
|
|
583
|
+
coreContract: coreContract
|
|
584
|
+
});
|
|
585
|
+
isConfigured = setPriceProjectConfig_.priceIsConfigured;
|
|
586
|
+
tokenPriceInWei = setPriceProjectConfig_.pricePerToken;
|
|
660
587
|
currencySymbol = "ETH";
|
|
661
588
|
currencyAddress = address(0);
|
|
662
589
|
}
|
|
663
590
|
|
|
664
591
|
/**
|
|
665
|
-
* @notice Syncs local maximum invocations of project `
|
|
592
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
666
593
|
* the value currently defined in the core contract.
|
|
667
|
-
* @param
|
|
668
|
-
* @param
|
|
594
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
595
|
+
* @param coreContract Core contract address for the given project.
|
|
669
596
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
670
597
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
671
598
|
*/
|
|
672
599
|
function syncProjectMaxInvocationsToCore(
|
|
673
|
-
uint256
|
|
674
|
-
address
|
|
600
|
+
uint256 projectId,
|
|
601
|
+
address coreContract
|
|
675
602
|
) public {
|
|
676
603
|
AuthLib.onlyArtist({
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
604
|
+
projectId: projectId,
|
|
605
|
+
coreContract: coreContract,
|
|
606
|
+
sender: msg.sender
|
|
680
607
|
});
|
|
681
608
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
687
|
-
);
|
|
688
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
689
|
-
_projectId,
|
|
690
|
-
_coreContract,
|
|
691
|
-
maxInvocations
|
|
692
|
-
);
|
|
609
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
610
|
+
projectId: projectId,
|
|
611
|
+
coreContract: coreContract
|
|
612
|
+
});
|
|
693
613
|
}
|
|
694
614
|
|
|
695
615
|
/**
|
|
696
|
-
* @notice Purchases a token from project `
|
|
697
|
-
* the token's owner to `
|
|
698
|
-
* @param
|
|
699
|
-
* @param
|
|
700
|
-
* @param
|
|
701
|
-
* @param
|
|
616
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
617
|
+
* the token's owner to `to`.
|
|
618
|
+
* @param to Address to be the new token's owner.
|
|
619
|
+
* @param projectId Project ID to mint a token on.
|
|
620
|
+
* @param coreContract Core contract address for the given project.
|
|
621
|
+
* @param ownedNFTAddress ERC-721 NFT address holding the project token owned by _vault
|
|
702
622
|
* (or msg.sender if no _vault is provided) being used to claim right to purchase.
|
|
703
|
-
* @param
|
|
623
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by _vault (or msg.sender if
|
|
704
624
|
* no _vault is provided) being used to claim right to purchase.
|
|
705
|
-
* @param
|
|
625
|
+
* @param vault Vault being purchased on behalf of. Acceptable to be `address(0)` if no vault.
|
|
706
626
|
* @return tokenId Token ID of minted token
|
|
707
627
|
*/
|
|
708
628
|
function purchaseTo(
|
|
709
|
-
address
|
|
710
|
-
uint256
|
|
711
|
-
address
|
|
712
|
-
address
|
|
713
|
-
uint256
|
|
714
|
-
address
|
|
629
|
+
address to,
|
|
630
|
+
uint256 projectId,
|
|
631
|
+
address coreContract,
|
|
632
|
+
address ownedNFTAddress,
|
|
633
|
+
uint256 ownedNFTTokenId,
|
|
634
|
+
address vault
|
|
715
635
|
) public payable nonReentrant returns (uint256 tokenId) {
|
|
716
636
|
// CHECKS
|
|
717
|
-
|
|
718
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
719
|
-
_coreContract
|
|
720
|
-
][_projectId];
|
|
721
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
722
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
723
|
-
_coreContract
|
|
724
|
-
][_projectId];
|
|
725
|
-
|
|
637
|
+
// pre-mint MaxInvocationsLib checks
|
|
726
638
|
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
727
639
|
// consumption after a project has been fully minted.
|
|
728
|
-
// `
|
|
640
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
729
641
|
// gas consumption, but if not in sync with the core contract's value,
|
|
730
642
|
// the core contract also enforces its own max invocation check during
|
|
731
643
|
// minting.
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
);
|
|
736
|
-
|
|
737
|
-
// require artist to have configured price of token on this minter
|
|
738
|
-
require(
|
|
739
|
-
_setPriceProjectConfig.priceIsConfigured,
|
|
740
|
-
"Price not configured"
|
|
741
|
-
);
|
|
644
|
+
MaxInvocationsLib.preMintChecks({
|
|
645
|
+
projectId: projectId,
|
|
646
|
+
coreContract: coreContract
|
|
647
|
+
});
|
|
742
648
|
|
|
743
|
-
//
|
|
744
|
-
|
|
649
|
+
// pre-mint checks for set price lib, and get price per token in wei
|
|
650
|
+
// @dev price per token is loaded into memory here for gas efficiency
|
|
651
|
+
uint256 pricePerTokenInWei = SetPriceLib.preMintChecksAndGetPrice({
|
|
652
|
+
projectId: projectId,
|
|
653
|
+
coreContract: coreContract
|
|
654
|
+
});
|
|
745
655
|
|
|
746
656
|
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
747
657
|
|
|
748
658
|
// require token used to claim to be in set of allowlisted NFTs
|
|
749
659
|
require(
|
|
750
660
|
TokenHolderLib.isAllowlistedNFT({
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
_ownedNFTTokenId: _ownedNFTTokenId
|
|
661
|
+
projectId: projectId,
|
|
662
|
+
coreContract: coreContract,
|
|
663
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
664
|
+
ownedNFTTokenId: ownedNFTTokenId
|
|
756
665
|
}),
|
|
757
666
|
"Only allowlisted NFTs"
|
|
758
667
|
);
|
|
@@ -760,34 +669,39 @@ contract MinterSetPriceHolderV5 is
|
|
|
760
669
|
// NOTE: delegate-vault handling **begins here**.
|
|
761
670
|
|
|
762
671
|
// handle that the vault may be either the `msg.sender` in the case
|
|
763
|
-
// that there is not a true vault, or may be `
|
|
672
|
+
// that there is not a true vault, or may be `vault` if one is
|
|
764
673
|
// provided explicitly (and it is valid).
|
|
765
|
-
address
|
|
766
|
-
if (
|
|
674
|
+
address vault_ = msg.sender;
|
|
675
|
+
if (vault != address(0)) {
|
|
767
676
|
// If a vault is provided, it must be valid, otherwise throw rather
|
|
768
677
|
// than optimistically-minting with original `msg.sender`.
|
|
769
678
|
// Note, we do not check `checkDelegateForAll` or `checkDelegateForContract` as well,
|
|
770
679
|
// as they are known to be implicitly checked by calling `checkDelegateForToken`.
|
|
771
|
-
bool isValidVault =
|
|
772
|
-
.checkDelegateForToken(
|
|
773
|
-
msg.sender,
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
);
|
|
680
|
+
bool isValidVault = _delegationRegistryContract
|
|
681
|
+
.checkDelegateForToken({
|
|
682
|
+
delegate: msg.sender,
|
|
683
|
+
vault: vault,
|
|
684
|
+
contract_: coreContract,
|
|
685
|
+
tokenId: ownedNFTTokenId
|
|
686
|
+
});
|
|
778
687
|
require(isValidVault, "Invalid delegate-vault pairing");
|
|
779
|
-
|
|
688
|
+
vault_ = vault;
|
|
780
689
|
}
|
|
781
690
|
|
|
782
691
|
// EFFECTS
|
|
783
|
-
tokenId =
|
|
692
|
+
tokenId = _minterFilter.mint_joo({
|
|
693
|
+
to: to,
|
|
694
|
+
projectId: projectId,
|
|
695
|
+
coreContract: coreContract,
|
|
696
|
+
sender: vault_
|
|
697
|
+
});
|
|
784
698
|
|
|
785
699
|
// NOTE: delegate-vault handling **ends here**.
|
|
786
700
|
|
|
787
|
-
MaxInvocationsLib.
|
|
788
|
-
tokenId,
|
|
789
|
-
|
|
790
|
-
);
|
|
701
|
+
MaxInvocationsLib.validateMintEffectsInvocations({
|
|
702
|
+
tokenId: tokenId,
|
|
703
|
+
coreContract: coreContract
|
|
704
|
+
});
|
|
791
705
|
|
|
792
706
|
// INTERACTIONS
|
|
793
707
|
// require vault to own NFT used to redeem
|
|
@@ -798,22 +712,17 @@ contract MinterSetPriceHolderV5 is
|
|
|
798
712
|
* function is non-reentrant, so this is extra cautious.
|
|
799
713
|
*/
|
|
800
714
|
TokenHolderLib.validateNFTOwnership({
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
715
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
716
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
717
|
+
targetOwner: vault_
|
|
804
718
|
});
|
|
805
719
|
|
|
806
720
|
// INTERACTIONS
|
|
807
721
|
// split funds
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
SplitFundsLib.splitFundsETH({
|
|
813
|
-
_projectId: _projectId,
|
|
814
|
-
_pricePerTokenInWei: pricePerTokenInWei,
|
|
815
|
-
_coreContract: _coreContract,
|
|
816
|
-
_isEngine: isEngine
|
|
722
|
+
SplitFundsLib.splitFundsETHRefundSender({
|
|
723
|
+
projectId: projectId,
|
|
724
|
+
pricePerTokenInWei: pricePerTokenInWei,
|
|
725
|
+
coreContract: coreContract
|
|
817
726
|
});
|
|
818
727
|
|
|
819
728
|
return tokenId;
|