@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,18 +1,19 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
2
|
// Created By: Art Blocks Inc.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
// @dev fixed to specific solidity version for clarity and for more clear
|
|
5
|
+
// source code verification purposes.
|
|
6
|
+
pragma solidity 0.8.19;
|
|
7
7
|
|
|
8
|
-
import "../../
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
11
|
-
import "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
8
|
+
import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
9
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
12
10
|
|
|
13
|
-
import "
|
|
11
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
12
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
13
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
14
|
+
import {SetPriceLib} from "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
@@ -37,17 +38,20 @@ pragma solidity 0.8.19;
|
|
|
37
38
|
* ----------------------------------------------------------------------------
|
|
38
39
|
* Additional admin and artist privileged roles may be described on other
|
|
39
40
|
* contracts that this minter integrates with.
|
|
41
|
+
* ----------------------------------------------------------------------------
|
|
42
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
43
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
44
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
45
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
46
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
47
|
+
* checks performed by this minter's Minter Filter.
|
|
40
48
|
*/
|
|
41
|
-
contract MinterSetPriceERC20V5 is
|
|
42
|
-
ReentrancyGuard,
|
|
43
|
-
ISharedMinterSimplePurchaseV0,
|
|
44
|
-
ISharedMinterV0
|
|
45
|
-
{
|
|
49
|
+
contract MinterSetPriceERC20V5 is ReentrancyGuard, ISharedMinterV0 {
|
|
46
50
|
/// Minter filter address this minter interacts with
|
|
47
51
|
address public immutable minterFilterAddress;
|
|
48
52
|
|
|
49
53
|
/// Minter filter this minter may interact with.
|
|
50
|
-
IMinterFilterV1 private immutable
|
|
54
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
51
55
|
|
|
52
56
|
/// minterType for this minter
|
|
53
57
|
string public constant minterType = "MinterSetPriceERC20V5";
|
|
@@ -55,45 +59,6 @@ contract MinterSetPriceERC20V5 is
|
|
|
55
59
|
/// minter version for this minter
|
|
56
60
|
string public constant minterVersion = "v5.0.0";
|
|
57
61
|
|
|
58
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
59
|
-
// STATE VARIABLES FOR SetPriceLib begin here
|
|
60
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
61
|
-
|
|
62
|
-
/// contractAddress => projectId => set price project config
|
|
63
|
-
mapping(address => mapping(uint256 => SetPriceLib.SetPriceProjectConfig))
|
|
64
|
-
private _setPriceProjectConfigMapping;
|
|
65
|
-
|
|
66
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
67
|
-
// STATE VARIABLES FOR SetPriceLib end here
|
|
68
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
69
|
-
|
|
70
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
71
|
-
// STATE VARIABLES FOR SplitFundsLib begin here
|
|
72
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
73
|
-
|
|
74
|
-
// contractAddress => IsEngineCache
|
|
75
|
-
mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
|
|
76
|
-
|
|
77
|
-
// contractAddress => projectId => SplitFundsProjectConfig
|
|
78
|
-
mapping(address => mapping(uint256 => SplitFundsLib.SplitFundsProjectConfig))
|
|
79
|
-
private _splitFundsProjectConfigs;
|
|
80
|
-
|
|
81
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
82
|
-
// STATE VARIABLES FOR SplitFundsLib end here
|
|
83
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
84
|
-
|
|
85
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
86
|
-
// STATE VARIABLES FOR MaxInvocationsLib begin here
|
|
87
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
88
|
-
|
|
89
|
-
// contractAddress => projectId => max invocations specific project config
|
|
90
|
-
mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
|
|
91
|
-
private _maxInvocationsProjectConfigMapping;
|
|
92
|
-
|
|
93
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
94
|
-
// STATE VARIABLES FOR MaxInvocationsLib end here
|
|
95
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
96
|
-
|
|
97
62
|
// MODIFIERS
|
|
98
63
|
// @dev contract uses modifier-like internal functions instead of modifiers
|
|
99
64
|
// to reduce contract bytecode size
|
|
@@ -101,209 +66,223 @@ contract MinterSetPriceERC20V5 is
|
|
|
101
66
|
|
|
102
67
|
/**
|
|
103
68
|
* @notice Initializes contract to be a Filtered Minter for
|
|
104
|
-
* `
|
|
105
|
-
* @param
|
|
69
|
+
* `minterFilter` minter filter.
|
|
70
|
+
* @param minterFilter Minter filter for which this will be a
|
|
106
71
|
* filtered minter.
|
|
107
72
|
*/
|
|
108
|
-
constructor(address
|
|
109
|
-
minterFilterAddress =
|
|
110
|
-
|
|
73
|
+
constructor(address minterFilter) ReentrancyGuard() {
|
|
74
|
+
minterFilterAddress = minterFilter;
|
|
75
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
111
76
|
}
|
|
112
77
|
|
|
113
78
|
/**
|
|
114
|
-
* @notice Manually sets the local maximum invocations of project `
|
|
115
|
-
* with the provided `
|
|
116
|
-
* than or equal to the value of project `
|
|
79
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
80
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
81
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
117
82
|
* set on the core contract.
|
|
118
|
-
* @dev Note that a `
|
|
83
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
119
84
|
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
120
85
|
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
121
|
-
* @param
|
|
122
|
-
* @param
|
|
123
|
-
* @param
|
|
86
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
87
|
+
* @param coreContract Core contract address for the given project.
|
|
88
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
124
89
|
*/
|
|
125
90
|
function manuallyLimitProjectMaxInvocations(
|
|
126
|
-
uint256
|
|
127
|
-
address
|
|
128
|
-
uint24
|
|
91
|
+
uint256 projectId,
|
|
92
|
+
address coreContract,
|
|
93
|
+
uint24 maxInvocations
|
|
129
94
|
) external {
|
|
130
95
|
AuthLib.onlyArtist({
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
96
|
+
projectId: projectId,
|
|
97
|
+
coreContract: coreContract,
|
|
98
|
+
sender: msg.sender
|
|
99
|
+
});
|
|
100
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
101
|
+
projectId: projectId,
|
|
102
|
+
coreContract: coreContract,
|
|
103
|
+
maxInvocations: maxInvocations
|
|
134
104
|
});
|
|
135
|
-
MaxInvocationsLib.manuallyLimitProjectMaxInvocations(
|
|
136
|
-
_projectId,
|
|
137
|
-
_coreContract,
|
|
138
|
-
_maxInvocations,
|
|
139
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
140
|
-
);
|
|
141
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
142
|
-
_projectId,
|
|
143
|
-
_coreContract,
|
|
144
|
-
_maxInvocations
|
|
145
|
-
);
|
|
146
105
|
}
|
|
147
106
|
|
|
148
107
|
/**
|
|
149
|
-
* @notice Updates this minter's price per token of project `
|
|
150
|
-
* to be
|
|
108
|
+
* @notice Updates this minter's price per token of project `projectId`
|
|
109
|
+
* to be `pricePerTokenInWei`. Note that "in wei" is a misnomer on this
|
|
110
|
+
* ERC20 minter, but is used for consistency with the ETH minters. The
|
|
111
|
+
* price value represents the ERC20 token price in base units.
|
|
151
112
|
* @dev Note that it is intentionally supported here that the configured
|
|
152
113
|
* price may be explicitly set to `0`.
|
|
153
|
-
* @param
|
|
154
|
-
* @param
|
|
155
|
-
* @param
|
|
114
|
+
* @param projectId Project ID to set the price per token for.
|
|
115
|
+
* @param coreContract Core contract address for the given project.
|
|
116
|
+
* @param pricePerTokenInWei Price per token to set for the project.
|
|
117
|
+
* Represents the ERC20 token price in base units. For example, if the
|
|
118
|
+
* ERC20 token has 6 decimals, an input value of `1_000_000` would
|
|
119
|
+
* represent a price of `1.000000` tokens.
|
|
156
120
|
*/
|
|
157
121
|
function updatePricePerTokenInWei(
|
|
158
|
-
uint256
|
|
159
|
-
address
|
|
160
|
-
uint248
|
|
122
|
+
uint256 projectId,
|
|
123
|
+
address coreContract,
|
|
124
|
+
uint248 pricePerTokenInWei
|
|
161
125
|
) external {
|
|
162
126
|
AuthLib.onlyArtist({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
127
|
+
projectId: projectId,
|
|
128
|
+
coreContract: coreContract,
|
|
129
|
+
sender: msg.sender
|
|
130
|
+
});
|
|
131
|
+
SetPriceLib.updatePricePerToken({
|
|
132
|
+
projectId: projectId,
|
|
133
|
+
coreContract: coreContract,
|
|
134
|
+
pricePerToken: pricePerTokenInWei
|
|
166
135
|
});
|
|
167
|
-
SetPriceLib.SetPriceProjectConfig
|
|
168
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
169
|
-
_coreContract
|
|
170
|
-
][_projectId];
|
|
171
|
-
SetPriceLib.updatePricePerTokenInWei(
|
|
172
|
-
_pricePerTokenInWei,
|
|
173
|
-
_setPriceProjectConfig
|
|
174
|
-
);
|
|
175
|
-
emit PricePerTokenInWeiUpdated(
|
|
176
|
-
_projectId,
|
|
177
|
-
_coreContract,
|
|
178
|
-
_pricePerTokenInWei
|
|
179
|
-
);
|
|
180
136
|
|
|
181
137
|
// for convenience, sync local max invocations to the core contract if
|
|
182
138
|
// and only if max invocations have not already been synced.
|
|
183
139
|
// @dev do not sync if max invocations have already been synced, as
|
|
184
140
|
// local max invocations could have been manually set to be
|
|
185
141
|
// intentionally less than the core contract's max invocations.
|
|
186
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
187
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
188
|
-
_coreContract
|
|
189
|
-
][_projectId];
|
|
190
142
|
// @dev if local maxInvocations and maxHasBeenInvoked are both
|
|
191
143
|
// initial values, we know they have not been populated on this minter
|
|
192
144
|
if (
|
|
193
|
-
MaxInvocationsLib.maxInvocationsIsUnconfigured(
|
|
194
|
-
|
|
195
|
-
|
|
145
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
146
|
+
projectId: projectId,
|
|
147
|
+
coreContract: coreContract
|
|
148
|
+
})
|
|
196
149
|
) {
|
|
197
|
-
syncProjectMaxInvocationsToCore(
|
|
150
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
151
|
+
projectId: projectId,
|
|
152
|
+
coreContract: coreContract
|
|
153
|
+
});
|
|
198
154
|
}
|
|
199
155
|
}
|
|
200
156
|
|
|
201
157
|
/**
|
|
202
|
-
* @notice Updates payment currency of project `
|
|
203
|
-
* contract `
|
|
204
|
-
* `
|
|
158
|
+
* @notice Updates payment currency of project `projectId` on core
|
|
159
|
+
* contract `coreContract` to be `currencySymbol` at address
|
|
160
|
+
* `currencyAddress`.
|
|
205
161
|
* Only supports ERC20 tokens - for ETH minting, use a different minter.
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* @
|
|
162
|
+
* Resets price to be unconfigured if currency was previously configured,
|
|
163
|
+
* as a safeguard against accidentally setting a price in one currency
|
|
164
|
+
* and then changing the currency but not the price.
|
|
165
|
+
* @dev nonReentrant because no reentrant use cases, and to eliminate an
|
|
166
|
+
* entire branch of reentrancy attack vectors.
|
|
167
|
+
* @param projectId Project ID to update.
|
|
168
|
+
* @param coreContract Core contract address for the given project.
|
|
169
|
+
* @param currencySymbol Currency symbol.
|
|
170
|
+
* @param currencyAddress Currency address.
|
|
210
171
|
*/
|
|
211
172
|
function updateProjectCurrencyInfo(
|
|
212
|
-
uint256
|
|
213
|
-
address
|
|
214
|
-
string memory
|
|
215
|
-
address
|
|
173
|
+
uint256 projectId,
|
|
174
|
+
address coreContract,
|
|
175
|
+
string memory currencySymbol,
|
|
176
|
+
address currencyAddress
|
|
216
177
|
) external nonReentrant {
|
|
217
178
|
AuthLib.onlyArtist({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
});
|
|
222
|
-
SplitFundsLib.SplitFundsProjectConfig
|
|
223
|
-
storage _splitFundsProjectConfig = _splitFundsProjectConfigs[
|
|
224
|
-
_coreContract
|
|
225
|
-
][_projectId];
|
|
226
|
-
SplitFundsLib.updateProjectCurrencyInfoERC20({
|
|
227
|
-
_splitFundsProjectConfig: _splitFundsProjectConfig,
|
|
228
|
-
_currencySymbol: _currencySymbol,
|
|
229
|
-
_currencyAddress: _currencyAddress
|
|
230
|
-
});
|
|
231
|
-
emit ProjectCurrencyInfoUpdated({
|
|
232
|
-
_projectId: _projectId,
|
|
233
|
-
_coreContract: _coreContract,
|
|
234
|
-
_currencyAddress: _currencyAddress,
|
|
235
|
-
_currencySymbol: _currencySymbol
|
|
179
|
+
projectId: projectId,
|
|
180
|
+
coreContract: coreContract,
|
|
181
|
+
sender: msg.sender
|
|
236
182
|
});
|
|
183
|
+
bool recommendPriceReset = SplitFundsLib
|
|
184
|
+
.updateProjectCurrencyInfoERC20({
|
|
185
|
+
projectId: projectId,
|
|
186
|
+
coreContract: coreContract,
|
|
187
|
+
currencySymbol: currencySymbol,
|
|
188
|
+
currencyAddress: currencyAddress
|
|
189
|
+
});
|
|
190
|
+
if (recommendPriceReset) {
|
|
191
|
+
SetPriceLib.resetPricePerToken({
|
|
192
|
+
projectId: projectId,
|
|
193
|
+
coreContract: coreContract
|
|
194
|
+
});
|
|
195
|
+
}
|
|
237
196
|
}
|
|
238
197
|
|
|
239
198
|
/**
|
|
240
|
-
* @notice Purchases a token from project `
|
|
241
|
-
* @param
|
|
242
|
-
* @param
|
|
199
|
+
* @notice Purchases a token from project `projectId`.
|
|
200
|
+
* @param projectId Project ID to mint a token on.
|
|
201
|
+
* @param coreContract Core contract address for the given project.
|
|
202
|
+
* @param maxPricePerToken Maximum price of token being allowed by the
|
|
203
|
+
* purchaser, in base units. For example, if the ERC20 token has 6
|
|
204
|
+
* decimals, an input value of `1_000_000` would represent a maximum price
|
|
205
|
+
* of `1.000000` tokens.
|
|
206
|
+
* @param currencyAddress Currency address of token.
|
|
243
207
|
* @return tokenId Token ID of minted token
|
|
244
208
|
*/
|
|
245
209
|
function purchase(
|
|
246
|
-
uint256
|
|
247
|
-
address
|
|
248
|
-
|
|
249
|
-
|
|
210
|
+
uint256 projectId,
|
|
211
|
+
address coreContract,
|
|
212
|
+
uint256 maxPricePerToken,
|
|
213
|
+
address currencyAddress
|
|
214
|
+
) external returns (uint256 tokenId) {
|
|
215
|
+
tokenId = purchaseTo({
|
|
216
|
+
to: msg.sender,
|
|
217
|
+
projectId: projectId,
|
|
218
|
+
coreContract: coreContract,
|
|
219
|
+
maxPricePerToken: maxPricePerToken,
|
|
220
|
+
currencyAddress: currencyAddress
|
|
221
|
+
});
|
|
250
222
|
return tokenId;
|
|
251
223
|
}
|
|
252
224
|
|
|
253
225
|
// public getter functions
|
|
254
226
|
/**
|
|
255
227
|
* @notice Gets the maximum invocations project configuration.
|
|
256
|
-
* @param
|
|
257
|
-
* @param
|
|
228
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
229
|
+
* @param coreContract The address of the core contract.
|
|
258
230
|
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
259
231
|
* configuration data.
|
|
260
232
|
*/
|
|
261
233
|
function maxInvocationsProjectConfig(
|
|
262
|
-
uint256
|
|
263
|
-
address
|
|
234
|
+
uint256 projectId,
|
|
235
|
+
address coreContract
|
|
264
236
|
)
|
|
265
237
|
external
|
|
266
238
|
view
|
|
267
239
|
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
268
240
|
{
|
|
269
|
-
return
|
|
241
|
+
return
|
|
242
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
243
|
+
projectId: projectId,
|
|
244
|
+
coreContract: coreContract
|
|
245
|
+
});
|
|
270
246
|
}
|
|
271
247
|
|
|
272
248
|
/**
|
|
273
249
|
* @notice Gets the set price project configuration.
|
|
274
|
-
* @param
|
|
275
|
-
* @param
|
|
250
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
251
|
+
* @param coreContract The address of the core contract.
|
|
276
252
|
* @return SetPriceProjectConfig struct with the fixed price project
|
|
277
253
|
* configuration data.
|
|
278
254
|
*/
|
|
279
255
|
function setPriceProjectConfig(
|
|
280
|
-
uint256
|
|
281
|
-
address
|
|
256
|
+
uint256 projectId,
|
|
257
|
+
address coreContract
|
|
282
258
|
) external view returns (SetPriceLib.SetPriceProjectConfig memory) {
|
|
283
|
-
return
|
|
259
|
+
return
|
|
260
|
+
SetPriceLib.getSetPriceProjectConfig({
|
|
261
|
+
projectId: projectId,
|
|
262
|
+
coreContract: coreContract
|
|
263
|
+
});
|
|
284
264
|
}
|
|
285
265
|
|
|
286
266
|
/**
|
|
287
|
-
* @notice Checks if the specified `
|
|
288
|
-
* @dev This function retrieves the cached value of `
|
|
267
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
268
|
+
* @dev This function retrieves the cached value of `isEngine` from
|
|
289
269
|
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
290
|
-
* returns the cached value. Otherwise, it calls the `
|
|
291
|
-
* function from the `SplitFundsLib` library to check if `
|
|
270
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
271
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
292
272
|
* is a valid engine contract.
|
|
293
|
-
* @dev This function will revert if the provided `
|
|
273
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
294
274
|
* a valid Engine or V3 Flagship contract.
|
|
295
|
-
* @param
|
|
296
|
-
* @return bool indicating if `
|
|
275
|
+
* @param coreContract The address of the contract to check.
|
|
276
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
297
277
|
*/
|
|
298
|
-
function isEngineView(address
|
|
299
|
-
SplitFundsLib.IsEngineCache storage isEngineCache =
|
|
300
|
-
|
|
301
|
-
];
|
|
278
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
279
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
280
|
+
.getIsEngineCacheConfig(coreContract);
|
|
302
281
|
if (isEngineCache.isCached) {
|
|
303
282
|
return isEngineCache.isEngine;
|
|
304
283
|
} else {
|
|
305
|
-
// @dev this calls the non-modifying variant of
|
|
306
|
-
return SplitFundsLib.getV3CoreIsEngineView(
|
|
284
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
285
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
307
286
|
}
|
|
308
287
|
}
|
|
309
288
|
|
|
@@ -318,17 +297,18 @@ contract MinterSetPriceERC20V5 is
|
|
|
318
297
|
* possible because the V3 core contract only allows maximum invocations
|
|
319
298
|
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
320
299
|
* do not do input validation in this method as to whether or not the input
|
|
321
|
-
* @param
|
|
322
|
-
* @param
|
|
300
|
+
* @param projectId is an existing project ID.
|
|
301
|
+
* @param coreContract is an existing core contract address.
|
|
323
302
|
*/
|
|
324
303
|
function projectMaxHasBeenInvoked(
|
|
325
|
-
uint256
|
|
326
|
-
address
|
|
304
|
+
uint256 projectId,
|
|
305
|
+
address coreContract
|
|
327
306
|
) external view returns (bool) {
|
|
328
307
|
return
|
|
329
|
-
MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
330
|
-
|
|
331
|
-
|
|
308
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
309
|
+
projectId: projectId,
|
|
310
|
+
coreContract: coreContract
|
|
311
|
+
});
|
|
332
312
|
}
|
|
333
313
|
|
|
334
314
|
/**
|
|
@@ -347,79 +327,84 @@ contract MinterSetPriceERC20V5 is
|
|
|
347
327
|
* increased. When this happens, the minter will enable minting, allowing
|
|
348
328
|
* the core contract to enforce the max invocations check. Based on this
|
|
349
329
|
* rationale, we intentionally do not do input validation in this method as
|
|
350
|
-
* to whether or not the input `
|
|
351
|
-
* @param
|
|
352
|
-
* @param
|
|
330
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
331
|
+
* @param projectId is an existing project ID.
|
|
332
|
+
* @param coreContract is an existing core contract address.
|
|
353
333
|
*/
|
|
354
334
|
function projectMaxInvocations(
|
|
355
|
-
uint256
|
|
356
|
-
address
|
|
335
|
+
uint256 projectId,
|
|
336
|
+
address coreContract
|
|
357
337
|
) external view returns (uint256) {
|
|
358
338
|
return
|
|
359
|
-
MaxInvocationsLib.getMaxInvocations(
|
|
360
|
-
|
|
361
|
-
|
|
339
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
340
|
+
projectId: projectId,
|
|
341
|
+
coreContract: coreContract
|
|
342
|
+
});
|
|
362
343
|
}
|
|
363
344
|
|
|
364
345
|
/**
|
|
365
346
|
* @notice Gets your balance of the ERC20 token currently set
|
|
366
|
-
* as the payment currency for project `
|
|
367
|
-
* contract `
|
|
368
|
-
* @param
|
|
369
|
-
* @param
|
|
347
|
+
* as the payment currency for project `projectId` in the core
|
|
348
|
+
* contract `coreContract`.
|
|
349
|
+
* @param projectId Project ID to be queried.
|
|
350
|
+
* @param coreContract The address of the core contract.
|
|
370
351
|
* @return balance Balance of ERC20
|
|
371
352
|
*/
|
|
372
353
|
function getYourBalanceOfProjectERC20(
|
|
373
|
-
uint256
|
|
374
|
-
address
|
|
354
|
+
uint256 projectId,
|
|
355
|
+
address coreContract
|
|
375
356
|
) external view returns (uint256 balance) {
|
|
376
|
-
SplitFundsLib.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
balance = SplitFundsLib.getERC20Balance(
|
|
381
|
-
|
|
382
|
-
msg.sender
|
|
383
|
-
);
|
|
357
|
+
(address currencyAddress, ) = SplitFundsLib.getCurrencyInfoERC20({
|
|
358
|
+
projectId: projectId,
|
|
359
|
+
coreContract: coreContract
|
|
360
|
+
});
|
|
361
|
+
balance = SplitFundsLib.getERC20Balance({
|
|
362
|
+
currencyAddress: currencyAddress,
|
|
363
|
+
walletAddress: msg.sender
|
|
364
|
+
});
|
|
384
365
|
return balance;
|
|
385
366
|
}
|
|
386
367
|
|
|
387
368
|
/**
|
|
388
369
|
* @notice Gets your allowance for this minter of the ERC20
|
|
389
370
|
* token currently set as the payment currency for project
|
|
390
|
-
* `
|
|
391
|
-
* @param
|
|
392
|
-
* @param
|
|
371
|
+
* `projectId`.
|
|
372
|
+
* @param projectId Project ID to be queried.
|
|
373
|
+
* @param coreContract The address of the core contract.
|
|
393
374
|
* @return remaining Remaining allowance of ERC20
|
|
394
375
|
*/
|
|
395
376
|
function checkYourAllowanceOfProjectERC20(
|
|
396
|
-
uint256
|
|
397
|
-
address
|
|
377
|
+
uint256 projectId,
|
|
378
|
+
address coreContract
|
|
398
379
|
) external view returns (uint256 remaining) {
|
|
399
|
-
SplitFundsLib.
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
380
|
+
(address currencyAddress, ) = SplitFundsLib.getCurrencyInfoERC20({
|
|
381
|
+
projectId: projectId,
|
|
382
|
+
coreContract: coreContract
|
|
383
|
+
});
|
|
403
384
|
remaining = SplitFundsLib.getERC20Allowance({
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
385
|
+
currencyAddress: currencyAddress,
|
|
386
|
+
walletAddress: msg.sender,
|
|
387
|
+
spenderAddress: address(this)
|
|
407
388
|
});
|
|
408
389
|
return remaining;
|
|
409
390
|
}
|
|
410
391
|
|
|
411
392
|
/**
|
|
412
393
|
* @notice Gets if price of token is configured, price of minting a
|
|
413
|
-
* token on project `
|
|
394
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
414
395
|
* used as payment.
|
|
415
396
|
* `isConfigured` is only true if a price has been configured, and an ERC20
|
|
416
397
|
* token has been configured.
|
|
417
|
-
* @param
|
|
418
|
-
* @param
|
|
398
|
+
* @param projectId Project ID to get price information for
|
|
399
|
+
* @param coreContract Contract address of the core contract
|
|
419
400
|
* @return isConfigured true only if token price has been configured on
|
|
420
401
|
* this minter and an ERC20 token has been configured
|
|
421
402
|
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
422
|
-
* if price has not yet been configured
|
|
403
|
+
* if price has not yet been configured. Note that "in wei" is a misnomer
|
|
404
|
+
* for ERC20 tokens, but is used here for ABI consistency with the ETH
|
|
405
|
+
* minters. The value returned represents the price per token in base units.
|
|
406
|
+
* For example, if the ERC20 token has 6 decimals, an input value of
|
|
407
|
+
* `1_000_000` would represent a price of `1.000000` tokens.
|
|
423
408
|
* @return currencySymbol currency symbol for purchases of project on this
|
|
424
409
|
* minter. "UNCONFIG" if not yet configured. Note that currency symbol is
|
|
425
410
|
* defined by the artist, and is not necessarily the same as the ERC20
|
|
@@ -428,8 +413,8 @@ contract MinterSetPriceERC20V5 is
|
|
|
428
413
|
* this minter. Null address if not yet configured.
|
|
429
414
|
*/
|
|
430
415
|
function getPriceInfo(
|
|
431
|
-
uint256
|
|
432
|
-
address
|
|
416
|
+
uint256 projectId,
|
|
417
|
+
address coreContract
|
|
433
418
|
)
|
|
434
419
|
external
|
|
435
420
|
view
|
|
@@ -441,128 +426,127 @@ contract MinterSetPriceERC20V5 is
|
|
|
441
426
|
)
|
|
442
427
|
{
|
|
443
428
|
SetPriceLib.SetPriceProjectConfig
|
|
444
|
-
storage
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
_splitFundsProjectConfig
|
|
455
|
-
);
|
|
429
|
+
storage setPriceProjectConfig_ = SetPriceLib
|
|
430
|
+
.getSetPriceProjectConfig({
|
|
431
|
+
projectId: projectId,
|
|
432
|
+
coreContract: coreContract
|
|
433
|
+
});
|
|
434
|
+
tokenPriceInWei = setPriceProjectConfig_.pricePerToken;
|
|
435
|
+
(currencyAddress, currencySymbol) = SplitFundsLib.getCurrencyInfoERC20({
|
|
436
|
+
projectId: projectId,
|
|
437
|
+
coreContract: coreContract
|
|
438
|
+
});
|
|
456
439
|
// report if price and ERC20 token are configured
|
|
457
440
|
// @dev currencyAddress is non-zero if an ERC20 token is configured
|
|
458
441
|
isConfigured =
|
|
459
|
-
|
|
442
|
+
setPriceProjectConfig_.priceIsConfigured &&
|
|
460
443
|
currencyAddress != address(0);
|
|
461
444
|
}
|
|
462
445
|
|
|
463
446
|
/**
|
|
464
|
-
* @notice Syncs local maximum invocations of project `
|
|
447
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
465
448
|
* the value currently defined in the core contract.
|
|
466
|
-
* @param
|
|
467
|
-
* @param
|
|
449
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
450
|
+
* @param coreContract Core contract address for the given project.
|
|
468
451
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
469
452
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
470
453
|
*/
|
|
471
454
|
function syncProjectMaxInvocationsToCore(
|
|
472
|
-
uint256
|
|
473
|
-
address
|
|
455
|
+
uint256 projectId,
|
|
456
|
+
address coreContract
|
|
474
457
|
) public {
|
|
475
458
|
AuthLib.onlyArtist({
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
459
|
+
projectId: projectId,
|
|
460
|
+
coreContract: coreContract,
|
|
461
|
+
sender: msg.sender
|
|
479
462
|
});
|
|
480
463
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
486
|
-
);
|
|
487
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
488
|
-
_projectId,
|
|
489
|
-
_coreContract,
|
|
490
|
-
maxInvocations
|
|
491
|
-
);
|
|
464
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
465
|
+
projectId: projectId,
|
|
466
|
+
coreContract: coreContract
|
|
467
|
+
});
|
|
492
468
|
}
|
|
493
469
|
|
|
494
470
|
/**
|
|
495
|
-
* @notice Purchases a token from project `
|
|
496
|
-
* the token's owner to `
|
|
497
|
-
* @param
|
|
498
|
-
* @param
|
|
499
|
-
* @param
|
|
471
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
472
|
+
* the token's owner to `to`.
|
|
473
|
+
* @param to Address to be the new token's owner.
|
|
474
|
+
* @param projectId Project ID to mint a token on.
|
|
475
|
+
* @param coreContract Core contract address for the given project.
|
|
476
|
+
* @param maxPricePerToken Maximum price of token being allowed by the
|
|
477
|
+
* purchaser, in base units. For example, if the ERC20 token has 6
|
|
478
|
+
* decimals, an input value of `1_000_000` would represent a maximum price
|
|
479
|
+
* of `1.000000` tokens.
|
|
480
|
+
* @param currencyAddress Currency address of token.
|
|
500
481
|
* @return tokenId Token ID of minted token
|
|
501
482
|
*/
|
|
502
483
|
function purchaseTo(
|
|
503
|
-
address
|
|
504
|
-
uint256
|
|
505
|
-
address
|
|
506
|
-
|
|
484
|
+
address to,
|
|
485
|
+
uint256 projectId,
|
|
486
|
+
address coreContract,
|
|
487
|
+
uint256 maxPricePerToken,
|
|
488
|
+
address currencyAddress
|
|
489
|
+
) public nonReentrant returns (uint256 tokenId) {
|
|
507
490
|
// CHECKS
|
|
508
|
-
|
|
509
|
-
storage _setPriceProjectConfig = _setPriceProjectConfigMapping[
|
|
510
|
-
_coreContract
|
|
511
|
-
][_projectId];
|
|
512
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
513
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
514
|
-
_coreContract
|
|
515
|
-
][_projectId];
|
|
516
|
-
|
|
491
|
+
// pre-mint MaxInvocationsLib checks
|
|
517
492
|
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
518
493
|
// consumption after a project has been fully minted.
|
|
519
|
-
// `
|
|
494
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
520
495
|
// gas consumption, but if not in sync with the core contract's value,
|
|
521
496
|
// the core contract also enforces its own max invocation check during
|
|
522
497
|
// minting.
|
|
498
|
+
MaxInvocationsLib.preMintChecks({
|
|
499
|
+
projectId: projectId,
|
|
500
|
+
coreContract: coreContract
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
// pre-mint checks for set price lib, and get price per token
|
|
504
|
+
// @dev price per token is loaded into memory here for gas efficiency
|
|
505
|
+
uint256 pricePerToken = SetPriceLib.preMintChecksAndGetPrice({
|
|
506
|
+
projectId: projectId,
|
|
507
|
+
coreContract: coreContract
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
// get the currency address configured on the project
|
|
511
|
+
// @dev revert occurs during payment split if ERC20 token is not
|
|
512
|
+
// configured (i.e. address(0)), so check is not performed here
|
|
513
|
+
(address configuredCurrencyAddress, ) = SplitFundsLib
|
|
514
|
+
.getCurrencyInfoERC20({
|
|
515
|
+
projectId: projectId,
|
|
516
|
+
coreContract: coreContract
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// validate that the currency address matches the project configured currency
|
|
523
520
|
require(
|
|
524
|
-
|
|
525
|
-
"
|
|
521
|
+
currencyAddress == configuredCurrencyAddress,
|
|
522
|
+
"Currency addresses must match"
|
|
526
523
|
);
|
|
527
524
|
|
|
528
|
-
//
|
|
525
|
+
// validate that the specified maximum price is greater than or equal to the price per token
|
|
529
526
|
require(
|
|
530
|
-
|
|
531
|
-
"
|
|
527
|
+
maxPricePerToken >= pricePerToken,
|
|
528
|
+
"Only max price gte token price"
|
|
532
529
|
);
|
|
533
|
-
// @dev revert occurs during payment split if ERC20 token is not
|
|
534
|
-
// configured (i.e. address(0)), so check is not performed here
|
|
535
530
|
|
|
536
531
|
// EFFECTS
|
|
537
|
-
tokenId =
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
msg.sender
|
|
542
|
-
);
|
|
532
|
+
tokenId = _minterFilter.mint_joo({
|
|
533
|
+
to: to,
|
|
534
|
+
projectId: projectId,
|
|
535
|
+
coreContract: coreContract,
|
|
536
|
+
sender: msg.sender
|
|
537
|
+
});
|
|
543
538
|
|
|
544
|
-
MaxInvocationsLib.
|
|
545
|
-
tokenId,
|
|
546
|
-
|
|
547
|
-
);
|
|
539
|
+
MaxInvocationsLib.validateMintEffectsInvocations({
|
|
540
|
+
tokenId: tokenId,
|
|
541
|
+
coreContract: coreContract
|
|
542
|
+
});
|
|
548
543
|
|
|
549
544
|
// INTERACTIONS
|
|
550
545
|
// split ERC20 funds
|
|
551
|
-
bool isEngine = SplitFundsLib.isEngine(
|
|
552
|
-
_coreContract,
|
|
553
|
-
_isEngineCaches[_coreContract]
|
|
554
|
-
);
|
|
555
|
-
// process payment in ERC20
|
|
556
|
-
SplitFundsLib.SplitFundsProjectConfig
|
|
557
|
-
storage _splitFundsProjectConfig = _splitFundsProjectConfigs[
|
|
558
|
-
_coreContract
|
|
559
|
-
][_projectId];
|
|
560
546
|
SplitFundsLib.splitFundsERC20({
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
_coreContract: _coreContract,
|
|
565
|
-
_isEngine: isEngine
|
|
547
|
+
projectId: projectId,
|
|
548
|
+
pricePerToken: pricePerToken,
|
|
549
|
+
coreContract: coreContract
|
|
566
550
|
});
|
|
567
551
|
|
|
568
552
|
return tokenId;
|