@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,25 +1,27 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
2
|
// Created By: Art Blocks Inc.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "../../interfaces/v0.8.x/ISharedMinterDAV0.sol";
|
|
7
|
-
import "../../interfaces/v0.8.x/ISharedMinterDAExpV0.sol";
|
|
8
|
-
import "../../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
|
|
9
|
-
import "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
10
|
-
|
|
11
|
-
import "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
12
|
-
import "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
13
|
-
import "../../libs/v0.8.x/minter-libs/TokenHolderLib.sol";
|
|
14
|
-
import "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
|
|
15
|
-
import "../../libs/v0.8.x/AuthLib.sol";
|
|
16
|
-
|
|
17
|
-
import "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
|
|
18
|
-
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
19
|
-
import "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
|
|
20
|
-
|
|
4
|
+
// @dev fixed to specific solidity version for clarity and for more clear
|
|
5
|
+
// source code verification purposes.
|
|
21
6
|
pragma solidity 0.8.19;
|
|
22
7
|
|
|
8
|
+
import {IDelegationRegistry} from "../../interfaces/v0.8.x/IDelegationRegistry.sol";
|
|
9
|
+
import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
10
|
+
import {ISharedMinterDAV0} from "../../interfaces/v0.8.x/ISharedMinterDAV0.sol";
|
|
11
|
+
import {ISharedMinterDAExpV0} from "../../interfaces/v0.8.x/ISharedMinterDAExpV0.sol";
|
|
12
|
+
import {ISharedMinterHolderV0} from "../../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
|
|
13
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
14
|
+
|
|
15
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
16
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
17
|
+
import {TokenHolderLib} from "../../libs/v0.8.x/minter-libs/TokenHolderLib.sol";
|
|
18
|
+
import {DAExpLib} from "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
|
|
19
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
20
|
+
|
|
21
|
+
import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
|
|
22
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
23
|
+
import {EnumerableSet} from "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
|
|
24
|
+
|
|
23
25
|
/**
|
|
24
26
|
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
25
27
|
* ETH when purchaser owns an allowlisted ERC-721 NFT. This contract does NOT
|
|
@@ -72,6 +74,13 @@ pragma solidity 0.8.19;
|
|
|
72
74
|
* delegation types include token-level, contract-level (via genArt721CoreAddress), or
|
|
73
75
|
* wallet-level delegation. Contract-level delegations must be configured for the core
|
|
74
76
|
* token contract as returned by the public immutable variable `genArt721CoreAddress`.
|
|
77
|
+
* ----------------------------------------------------------------------------
|
|
78
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
79
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
80
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
81
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
82
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
83
|
+
* checks performed by this minter's Minter Filter.
|
|
75
84
|
*
|
|
76
85
|
* @dev Note that while this minter makes use of `block.timestamp` and it is
|
|
77
86
|
* technically possible that this value is manipulated by block producers, such
|
|
@@ -96,13 +105,13 @@ contract MinterDAExpHolderV5 is
|
|
|
96
105
|
address public immutable minterFilterAddress;
|
|
97
106
|
|
|
98
107
|
/// Minter filter this minter may interact with.
|
|
99
|
-
IMinterFilterV1 private immutable
|
|
108
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
100
109
|
|
|
101
110
|
// Delegation registry address
|
|
102
111
|
address public immutable delegationRegistryAddress;
|
|
103
112
|
|
|
104
113
|
// Delegation registry address
|
|
105
|
-
IDelegationRegistry private immutable
|
|
114
|
+
IDelegationRegistry private immutable _delegationRegistryContract;
|
|
106
115
|
|
|
107
116
|
/// minterType for this minter
|
|
108
117
|
string public constant minterType = "MinterDAExpHolderV5";
|
|
@@ -114,274 +123,187 @@ contract MinterDAExpHolderV5 is
|
|
|
114
123
|
/// least this amount (must cut in half at least every N seconds).
|
|
115
124
|
uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
|
|
116
125
|
|
|
117
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
118
|
-
// STATE VARIABLES FOR SplitFundsLib begin here
|
|
119
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
120
|
-
|
|
121
|
-
// contractAddress => IsEngineCache
|
|
122
|
-
mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
|
|
123
|
-
|
|
124
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
125
|
-
// STATE VARIABLES FOR SplitFundsLib end here
|
|
126
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
127
|
-
|
|
128
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
129
|
-
// STATE VARIABLES FOR DAExpLib begin here
|
|
130
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
131
|
-
|
|
132
|
-
mapping(address => mapping(uint256 => DAExpLib.DAProjectConfig))
|
|
133
|
-
private _auctionProjectConfigMapping;
|
|
134
|
-
|
|
135
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
136
|
-
// STATE VARIABLES FOR DAExpLib end here
|
|
137
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
138
|
-
|
|
139
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
140
|
-
// STATE VARIABLES FOR MaxInvocationsLib begin here
|
|
141
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
142
|
-
|
|
143
|
-
// contractAddress => projectId => max invocations specific project config
|
|
144
|
-
mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
|
|
145
|
-
private _maxInvocationsProjectConfigMapping;
|
|
146
|
-
|
|
147
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
148
|
-
// STATE VARIABLES FOR MaxInvocationsLib end here
|
|
149
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
150
|
-
|
|
151
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
152
|
-
// STATE VARIABLES FOR TokenHolderLib begin here
|
|
153
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* coreContract => projectId => ownedNFTAddress => ownedNFTProjectIds => bool
|
|
157
|
-
* projects whose holders are allowed to purchase a token on `projectId`
|
|
158
|
-
*/
|
|
159
|
-
mapping(address => mapping(uint256 => TokenHolderLib.HolderProjectConfig))
|
|
160
|
-
private _allowedProjectHoldersMapping;
|
|
161
|
-
|
|
162
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
163
|
-
// STATE VARIABLES FOR TokenHolderLib end here
|
|
164
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
165
|
-
|
|
166
126
|
/**
|
|
167
127
|
* @notice Initializes contract to be a Filtered Minter for
|
|
168
|
-
* `
|
|
169
|
-
* @param
|
|
128
|
+
* `minterFilter` minter filter.
|
|
129
|
+
* @param minterFilter Minter filter for which this will be a
|
|
170
130
|
* filtered minter.
|
|
171
131
|
*/
|
|
172
132
|
constructor(
|
|
173
|
-
address
|
|
174
|
-
address
|
|
133
|
+
address minterFilter,
|
|
134
|
+
address delegationRegistryAddress_
|
|
175
135
|
) ReentrancyGuard() {
|
|
176
|
-
minterFilterAddress =
|
|
177
|
-
|
|
136
|
+
minterFilterAddress = minterFilter;
|
|
137
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
178
138
|
|
|
179
|
-
delegationRegistryAddress =
|
|
180
|
-
|
|
181
|
-
|
|
139
|
+
delegationRegistryAddress = delegationRegistryAddress_;
|
|
140
|
+
_delegationRegistryContract = IDelegationRegistry(
|
|
141
|
+
delegationRegistryAddress_
|
|
142
|
+
);
|
|
143
|
+
emit TokenHolderLib.DelegationRegistryUpdated(
|
|
144
|
+
delegationRegistryAddress_
|
|
145
|
+
);
|
|
146
|
+
emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
|
|
147
|
+
minimumPriceDecayHalfLifeSeconds
|
|
182
148
|
);
|
|
183
|
-
emit DelegationRegistryUpdated(_delegationRegistryAddress);
|
|
184
|
-
emit AuctionMinHalfLifeSecondsUpdated(minimumPriceDecayHalfLifeSeconds);
|
|
185
149
|
}
|
|
186
150
|
|
|
187
151
|
/**
|
|
188
|
-
* @notice Manually sets the local maximum invocations of project `
|
|
189
|
-
* with the provided `
|
|
190
|
-
* than or equal to the value of project `
|
|
152
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
153
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
154
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
191
155
|
* set on the core contract.
|
|
192
|
-
* @dev Note that a `
|
|
156
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
193
157
|
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
194
158
|
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
195
|
-
* @param
|
|
196
|
-
* @param
|
|
197
|
-
* @param
|
|
159
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
160
|
+
* @param coreContract Core contract address for the given project.
|
|
161
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
198
162
|
*/
|
|
199
163
|
function manuallyLimitProjectMaxInvocations(
|
|
200
|
-
uint256
|
|
201
|
-
address
|
|
202
|
-
uint24
|
|
164
|
+
uint256 projectId,
|
|
165
|
+
address coreContract,
|
|
166
|
+
uint24 maxInvocations
|
|
203
167
|
) external {
|
|
204
168
|
AuthLib.onlyArtist({
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
169
|
+
projectId: projectId,
|
|
170
|
+
coreContract: coreContract,
|
|
171
|
+
sender: msg.sender
|
|
208
172
|
});
|
|
209
173
|
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
|
|
214
|
-
_coreContract
|
|
215
|
-
][_projectId]
|
|
174
|
+
projectId: projectId,
|
|
175
|
+
coreContract: coreContract,
|
|
176
|
+
maxInvocations: maxInvocations
|
|
216
177
|
});
|
|
217
|
-
|
|
218
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
219
|
-
_projectId,
|
|
220
|
-
_coreContract,
|
|
221
|
-
_maxInvocations
|
|
222
|
-
);
|
|
223
178
|
}
|
|
224
179
|
|
|
225
180
|
/**
|
|
226
|
-
* @notice Allows holders of NFTs at addresses `
|
|
227
|
-
* project IDs `
|
|
228
|
-
* `
|
|
229
|
-
* e.g. Allows holders of project `
|
|
230
|
-
* contract `
|
|
181
|
+
* @notice Allows holders of NFTs at addresses `ownedNFTAddresses`,
|
|
182
|
+
* project IDs `ownedNFTProjectIds` to mint on project `projectId`.
|
|
183
|
+
* `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
|
|
184
|
+
* e.g. Allows holders of project `ownedNFTProjectIds[0]` on token
|
|
185
|
+
* contract `ownedNFTAddresses[0]` to mint `projectId`.
|
|
231
186
|
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
232
187
|
* due to assumptions about tokenId and projectId relationships.
|
|
233
|
-
* @param
|
|
234
|
-
* @param
|
|
235
|
-
* @param
|
|
236
|
-
* allowlisted. Indexes must align with `
|
|
237
|
-
* @param
|
|
238
|
-
* holders shall be allowlisted to mint project `
|
|
239
|
-
* align with `
|
|
188
|
+
* @param projectId Project ID to enable minting on.
|
|
189
|
+
* @param coreContract Core contract address for the given project.
|
|
190
|
+
* @param ownedNFTAddresses NFT core addresses of projects to be
|
|
191
|
+
* allowlisted. Indexes must align with `ownedNFTProjectIds`.
|
|
192
|
+
* @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
|
|
193
|
+
* holders shall be allowlisted to mint project `projectId`. Indexes must
|
|
194
|
+
* align with `ownedNFTAddresses`.
|
|
240
195
|
*/
|
|
241
196
|
function allowHoldersOfProjects(
|
|
242
|
-
uint256
|
|
243
|
-
address
|
|
244
|
-
address[]
|
|
245
|
-
uint256[]
|
|
197
|
+
uint256 projectId,
|
|
198
|
+
address coreContract,
|
|
199
|
+
address[] calldata ownedNFTAddresses,
|
|
200
|
+
uint256[] calldata ownedNFTProjectIds
|
|
246
201
|
) external {
|
|
247
202
|
AuthLib.onlyArtist({
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
203
|
+
projectId: projectId,
|
|
204
|
+
coreContract: coreContract,
|
|
205
|
+
sender: msg.sender
|
|
251
206
|
});
|
|
252
207
|
TokenHolderLib.allowHoldersOfProjects({
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
208
|
+
projectId: projectId,
|
|
209
|
+
coreContract: coreContract,
|
|
210
|
+
ownedNFTAddresses: ownedNFTAddresses,
|
|
211
|
+
ownedNFTProjectIds: ownedNFTProjectIds
|
|
258
212
|
});
|
|
259
|
-
|
|
260
|
-
// emit approve event
|
|
261
|
-
emit AllowedHoldersOfProjects(
|
|
262
|
-
_projectId,
|
|
263
|
-
_coreContract,
|
|
264
|
-
_ownedNFTAddresses,
|
|
265
|
-
_ownedNFTProjectIds
|
|
266
|
-
);
|
|
267
213
|
}
|
|
268
214
|
|
|
269
215
|
/**
|
|
270
|
-
* @notice Removes holders of NFTs at addresses `
|
|
271
|
-
* project IDs `
|
|
216
|
+
* @notice Removes holders of NFTs at addresses `ownedNFTAddresses`,
|
|
217
|
+
* project IDs `ownedNFTProjectIds` to mint on project `projectId`. If
|
|
272
218
|
* other projects owned by a holder are still allowed to mint, holder will
|
|
273
219
|
* maintain ability to purchase.
|
|
274
|
-
* `
|
|
275
|
-
* e.g. Removes holders of project `
|
|
276
|
-
* contract `
|
|
277
|
-
* @param
|
|
278
|
-
* @param
|
|
279
|
-
* @param
|
|
280
|
-
* from allowlist. Indexes must align with `
|
|
281
|
-
* @param
|
|
282
|
-
* holders will be removed from allowlist to mint project `
|
|
283
|
-
* Indexes must align with `
|
|
220
|
+
* `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
|
|
221
|
+
* e.g. Removes holders of project `ownedNFTProjectIds[0]` on token
|
|
222
|
+
* contract `ownedNFTAddresses[0]` from mint allowlist of `projectId`.
|
|
223
|
+
* @param projectId Project ID to enable minting on.
|
|
224
|
+
* @param coreContract Core contract address for the given project.
|
|
225
|
+
* @param ownedNFTAddresses NFT core addresses of projects to be removed
|
|
226
|
+
* from allowlist. Indexes must align with `ownedNFTProjectIds`.
|
|
227
|
+
* @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
|
|
228
|
+
* holders will be removed from allowlist to mint project `projectId`.
|
|
229
|
+
* Indexes must align with `ownedNFTAddresses`.
|
|
284
230
|
*/
|
|
285
231
|
function removeHoldersOfProjects(
|
|
286
|
-
uint256
|
|
287
|
-
address
|
|
288
|
-
address[]
|
|
289
|
-
uint256[]
|
|
232
|
+
uint256 projectId,
|
|
233
|
+
address coreContract,
|
|
234
|
+
address[] calldata ownedNFTAddresses,
|
|
235
|
+
uint256[] calldata ownedNFTProjectIds
|
|
290
236
|
) external {
|
|
291
237
|
AuthLib.onlyArtist({
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
238
|
+
projectId: projectId,
|
|
239
|
+
coreContract: coreContract,
|
|
240
|
+
sender: msg.sender
|
|
295
241
|
});
|
|
296
242
|
// require same length arrays
|
|
297
243
|
TokenHolderLib.removeHoldersOfProjects({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
244
|
+
projectId: projectId,
|
|
245
|
+
coreContract: coreContract,
|
|
246
|
+
ownedNFTAddresses: ownedNFTAddresses,
|
|
247
|
+
ownedNFTProjectIds: ownedNFTProjectIds
|
|
303
248
|
});
|
|
304
|
-
|
|
305
|
-
// emit removed event
|
|
306
|
-
emit RemovedHoldersOfProjects(
|
|
307
|
-
_projectId,
|
|
308
|
-
_coreContract,
|
|
309
|
-
_ownedNFTAddresses,
|
|
310
|
-
_ownedNFTProjectIds
|
|
311
|
-
);
|
|
312
249
|
}
|
|
313
250
|
|
|
314
251
|
/**
|
|
315
|
-
* @notice Allows holders of NFTs at addresses `
|
|
316
|
-
* project IDs `
|
|
317
|
-
* Also removes holders of NFTs at addresses `
|
|
318
|
-
* project IDs `
|
|
319
|
-
* `
|
|
320
|
-
* `
|
|
321
|
-
* `
|
|
322
|
-
* e.g. Allows holders of project `
|
|
323
|
-
* contract `
|
|
324
|
-
* `
|
|
325
|
-
* `
|
|
252
|
+
* @notice Allows holders of NFTs at addresses `ownedNFTAddressesAdd`,
|
|
253
|
+
* project IDs `ownedNFTProjectIdsAdd` to mint on project `projectId`.
|
|
254
|
+
* Also removes holders of NFTs at addresses `ownedNFTAddressesRemove`,
|
|
255
|
+
* project IDs `ownedNFTProjectIdsRemove` from minting on project
|
|
256
|
+
* `projectId`.
|
|
257
|
+
* `ownedNFTAddressesAdd` assumed to be aligned with
|
|
258
|
+
* `ownedNFTProjectIdsAdd`.
|
|
259
|
+
* e.g. Allows holders of project `ownedNFTProjectIdsAdd[0]` on token
|
|
260
|
+
* contract `ownedNFTAddressesAdd[0]` to mint `projectId`.
|
|
261
|
+
* `ownedNFTAddressesRemove` also assumed to be aligned with
|
|
262
|
+
* `ownedNFTProjectIdsRemove`.
|
|
326
263
|
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
327
264
|
* due to assumptions about tokenId and projectId relationships.
|
|
328
|
-
* @param
|
|
329
|
-
* @param
|
|
330
|
-
* @param
|
|
331
|
-
* allowlisted. Indexes must align with `
|
|
332
|
-
* @param
|
|
333
|
-
* whose holders shall be allowlisted to mint project `
|
|
334
|
-
* must align with `
|
|
335
|
-
* @param
|
|
265
|
+
* @param projectId Project ID to enable minting on.
|
|
266
|
+
* @param coreContract Core contract address for the given project.
|
|
267
|
+
* @param ownedNFTAddressesAdd NFT core addresses of projects to be
|
|
268
|
+
* allowlisted. Indexes must align with `ownedNFTProjectIdsAdd`.
|
|
269
|
+
* @param ownedNFTProjectIdsAdd Project IDs on `ownedNFTAddressesAdd`
|
|
270
|
+
* whose holders shall be allowlisted to mint project `projectId`. Indexes
|
|
271
|
+
* must align with `ownedNFTAddressesAdd`.
|
|
272
|
+
* @param ownedNFTAddressesRemove NFT core addresses of projects to be
|
|
336
273
|
* removed from allowlist. Indexes must align with
|
|
337
|
-
* `
|
|
338
|
-
* @param
|
|
339
|
-
* `
|
|
340
|
-
* to mint project `
|
|
341
|
-
* `
|
|
274
|
+
* `ownedNFTProjectIdsRemove`.
|
|
275
|
+
* @param ownedNFTProjectIdsRemove Project IDs on
|
|
276
|
+
* `ownedNFTAddressesRemove` whose holders will be removed from allowlist
|
|
277
|
+
* to mint project `projectId`. Indexes must align with
|
|
278
|
+
* `ownedNFTAddressesRemove`.
|
|
342
279
|
* @dev if a project is included in both add and remove arrays, it will be
|
|
343
280
|
* removed.
|
|
344
281
|
*/
|
|
345
282
|
function allowAndRemoveHoldersOfProjects(
|
|
346
|
-
uint256
|
|
347
|
-
address
|
|
348
|
-
address[]
|
|
349
|
-
uint256[]
|
|
350
|
-
address[]
|
|
351
|
-
uint256[]
|
|
283
|
+
uint256 projectId,
|
|
284
|
+
address coreContract,
|
|
285
|
+
address[] calldata ownedNFTAddressesAdd,
|
|
286
|
+
uint256[] calldata ownedNFTProjectIdsAdd,
|
|
287
|
+
address[] calldata ownedNFTAddressesRemove,
|
|
288
|
+
uint256[] calldata ownedNFTProjectIdsRemove
|
|
352
289
|
) external {
|
|
353
290
|
AuthLib.onlyArtist({
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
291
|
+
projectId: projectId,
|
|
292
|
+
coreContract: coreContract,
|
|
293
|
+
sender: msg.sender
|
|
357
294
|
});
|
|
358
295
|
TokenHolderLib.allowAndRemoveHoldersOfProjects({
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
_ownedNFTProjectIdsRemove: _ownedNFTProjectIdsRemove
|
|
296
|
+
projectId: projectId,
|
|
297
|
+
coreContract: coreContract,
|
|
298
|
+
ownedNFTAddressesAdd: ownedNFTAddressesAdd,
|
|
299
|
+
ownedNFTProjectIdsAdd: ownedNFTProjectIdsAdd,
|
|
300
|
+
ownedNFTAddressesRemove: ownedNFTAddressesRemove,
|
|
301
|
+
ownedNFTProjectIdsRemove: ownedNFTProjectIdsRemove
|
|
366
302
|
});
|
|
367
|
-
|
|
368
|
-
// emit events
|
|
369
|
-
emit AllowedHoldersOfProjects(
|
|
370
|
-
_projectId,
|
|
371
|
-
_coreContract,
|
|
372
|
-
_ownedNFTAddressesAdd,
|
|
373
|
-
_ownedNFTProjectIdsAdd
|
|
374
|
-
);
|
|
375
|
-
emit RemovedHoldersOfProjects(
|
|
376
|
-
_projectId,
|
|
377
|
-
_coreContract,
|
|
378
|
-
_ownedNFTAddressesRemove,
|
|
379
|
-
_ownedNFTProjectIdsRemove
|
|
380
|
-
);
|
|
381
303
|
}
|
|
382
304
|
|
|
383
305
|
/**
|
|
384
|
-
* @notice Sets auction details for project `
|
|
306
|
+
* @notice Sets auction details for project `projectId`.
|
|
385
307
|
* Requires one of the following:
|
|
386
308
|
* - The auction is unconfigured
|
|
387
309
|
* - The auction has not yet started
|
|
@@ -390,214 +312,207 @@ contract MinterDAExpHolderV5 is
|
|
|
390
312
|
* max invocations effectively grants the artist the ability to set a new
|
|
391
313
|
* auction at any point, since minter-local max invocations can be set by
|
|
392
314
|
* the artist.
|
|
393
|
-
* @param
|
|
394
|
-
* @param
|
|
395
|
-
* @param
|
|
396
|
-
* @param
|
|
315
|
+
* @param projectId Project ID to set auction details for.
|
|
316
|
+
* @param coreContract Core contract address for the given project.
|
|
317
|
+
* @param auctionTimestampStart Timestamp at which to start the auction.
|
|
318
|
+
* @param priceDecayHalfLifeSeconds The half life with which to decay the
|
|
397
319
|
* price (in seconds).
|
|
398
|
-
* @param
|
|
399
|
-
* @param
|
|
320
|
+
* @param startPrice Price at which to start the auction, in Wei.
|
|
321
|
+
* @param basePrice Resting price of the auction, in Wei.
|
|
400
322
|
* @dev Note that it is intentionally supported here that the configured
|
|
401
323
|
* price may be explicitly set to `0`.
|
|
402
324
|
*/
|
|
403
325
|
function setAuctionDetails(
|
|
404
|
-
uint256
|
|
405
|
-
address
|
|
406
|
-
uint40
|
|
407
|
-
uint40
|
|
408
|
-
uint256
|
|
409
|
-
uint256
|
|
326
|
+
uint256 projectId,
|
|
327
|
+
address coreContract,
|
|
328
|
+
uint40 auctionTimestampStart,
|
|
329
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
330
|
+
uint256 startPrice,
|
|
331
|
+
uint256 basePrice
|
|
410
332
|
) external {
|
|
411
333
|
AuthLib.onlyArtist({
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
334
|
+
projectId: projectId,
|
|
335
|
+
coreContract: coreContract,
|
|
336
|
+
sender: msg.sender
|
|
415
337
|
});
|
|
416
338
|
// CHECKS
|
|
417
|
-
DAExpLib.DAProjectConfig
|
|
418
|
-
storage _auctionProjectConfig = _auctionProjectConfigMapping[
|
|
419
|
-
_coreContract
|
|
420
|
-
][_projectId];
|
|
421
|
-
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
422
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
423
|
-
_coreContract
|
|
424
|
-
][_projectId];
|
|
425
|
-
|
|
426
339
|
require(
|
|
427
|
-
(
|
|
340
|
+
(priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
|
|
428
341
|
"Price decay half life must be greater than min allowable value"
|
|
429
342
|
);
|
|
430
343
|
|
|
431
344
|
// EFFECTS
|
|
432
345
|
bool maxHasBeenInvoked = MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
433
|
-
|
|
346
|
+
projectId,
|
|
347
|
+
coreContract
|
|
434
348
|
);
|
|
435
349
|
DAExpLib.setAuctionDetailsExp({
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
emit SetAuctionDetailsExp({
|
|
445
|
-
_projectId: _projectId,
|
|
446
|
-
_coreContract: _coreContract,
|
|
447
|
-
_auctionTimestampStart: _auctionTimestampStart,
|
|
448
|
-
_priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
|
|
449
|
-
_startPrice: _startPrice,
|
|
450
|
-
_basePrice: _basePrice
|
|
350
|
+
projectId: projectId,
|
|
351
|
+
coreContract: coreContract,
|
|
352
|
+
auctionTimestampStart: auctionTimestampStart,
|
|
353
|
+
priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
|
|
354
|
+
startPrice: startPrice.toUint88(),
|
|
355
|
+
basePrice: basePrice.toUint88(),
|
|
356
|
+
allowReconfigureAfterStart: maxHasBeenInvoked
|
|
451
357
|
});
|
|
452
358
|
|
|
453
359
|
// sync local max invocations if not initially populated
|
|
454
360
|
// @dev if local max invocations and maxHasBeenInvoked are both
|
|
455
361
|
// initial values, we know they have not been populated.
|
|
456
362
|
if (
|
|
457
|
-
MaxInvocationsLib.maxInvocationsIsUnconfigured(
|
|
458
|
-
|
|
459
|
-
|
|
363
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
364
|
+
projectId: projectId,
|
|
365
|
+
coreContract: coreContract
|
|
366
|
+
})
|
|
460
367
|
) {
|
|
461
|
-
syncProjectMaxInvocationsToCore(
|
|
368
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
369
|
+
projectId: projectId,
|
|
370
|
+
coreContract: coreContract
|
|
371
|
+
});
|
|
462
372
|
}
|
|
463
373
|
}
|
|
464
374
|
|
|
465
375
|
/**
|
|
466
376
|
* @notice Sets the minimum and maximum values that are settable for
|
|
467
|
-
* `
|
|
468
|
-
* @param
|
|
377
|
+
* `priceDecayHalfLifeSeconds` across all projects.
|
|
378
|
+
* @param minimumPriceDecayHalfLifeSeconds_ Minimum price decay half life
|
|
469
379
|
* (in seconds).
|
|
470
380
|
*/
|
|
471
381
|
function setMinimumPriceDecayHalfLifeSeconds(
|
|
472
|
-
uint256
|
|
382
|
+
uint256 minimumPriceDecayHalfLifeSeconds_
|
|
473
383
|
) external {
|
|
474
384
|
AuthLib.onlyMinterFilterAdminACL({
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
385
|
+
minterFilterAddress: minterFilterAddress,
|
|
386
|
+
sender: msg.sender,
|
|
387
|
+
contract_: address(this),
|
|
388
|
+
selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
|
|
479
389
|
});
|
|
480
390
|
require(
|
|
481
|
-
|
|
391
|
+
minimumPriceDecayHalfLifeSeconds_ > 0,
|
|
482
392
|
"Half life of zero not allowed"
|
|
483
393
|
);
|
|
484
|
-
minimumPriceDecayHalfLifeSeconds =
|
|
394
|
+
minimumPriceDecayHalfLifeSeconds = minimumPriceDecayHalfLifeSeconds_;
|
|
485
395
|
|
|
486
|
-
emit AuctionMinHalfLifeSecondsUpdated(
|
|
487
|
-
|
|
396
|
+
emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
|
|
397
|
+
minimumPriceDecayHalfLifeSeconds_
|
|
488
398
|
);
|
|
489
399
|
}
|
|
490
400
|
|
|
491
401
|
/**
|
|
492
|
-
* @notice Resets auction details for project `
|
|
402
|
+
* @notice Resets auction details for project `projectId`, zero-ing out all
|
|
493
403
|
* relevant auction fields. Not intended to be used in normal auction
|
|
494
404
|
* operation, but rather only in case of the need to halt an auction.
|
|
495
|
-
* @param
|
|
496
|
-
* @param
|
|
405
|
+
* @param projectId Project ID to set auction details for.
|
|
406
|
+
* @param coreContract Core contract address for the given project.
|
|
497
407
|
*/
|
|
498
408
|
function resetAuctionDetails(
|
|
499
|
-
uint256
|
|
500
|
-
address
|
|
409
|
+
uint256 projectId,
|
|
410
|
+
address coreContract
|
|
501
411
|
) external {
|
|
502
412
|
AuthLib.onlyCoreAdminACL({
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
413
|
+
coreContract: coreContract,
|
|
414
|
+
sender: msg.sender,
|
|
415
|
+
contract_: address(this),
|
|
416
|
+
selector: this.resetAuctionDetails.selector
|
|
507
417
|
});
|
|
508
418
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
419
|
+
DAExpLib.resetAuctionDetails({
|
|
420
|
+
projectId: projectId,
|
|
421
|
+
coreContract: coreContract
|
|
422
|
+
});
|
|
512
423
|
}
|
|
513
424
|
|
|
514
425
|
/**
|
|
515
|
-
* @notice Purchases a token from project `
|
|
426
|
+
* @notice Purchases a token from project `projectId`.
|
|
516
427
|
* Note: Collectors should not send excessive value with their purchase
|
|
517
428
|
* transaction, because the artist has the ability to change the auction
|
|
518
429
|
* details at any time, including the price.
|
|
519
|
-
* @param
|
|
520
|
-
* @param
|
|
521
|
-
* @param
|
|
430
|
+
* @param projectId Project ID to mint a token on.
|
|
431
|
+
* @param coreContract Core contract address for the given project.
|
|
432
|
+
* @param ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
522
433
|
* msg.sender being used to claim right to purchase.
|
|
523
|
-
* @param
|
|
434
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
524
435
|
* to claim right to purchase.
|
|
525
436
|
* @return tokenId Token ID of minted token
|
|
526
437
|
*/
|
|
527
438
|
function purchase(
|
|
528
|
-
uint256
|
|
529
|
-
address
|
|
530
|
-
address
|
|
531
|
-
uint256
|
|
439
|
+
uint256 projectId,
|
|
440
|
+
address coreContract,
|
|
441
|
+
address ownedNFTAddress,
|
|
442
|
+
uint256 ownedNFTTokenId
|
|
532
443
|
) external payable returns (uint256 tokenId) {
|
|
533
444
|
tokenId = purchaseTo({
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
445
|
+
to: msg.sender,
|
|
446
|
+
projectId: projectId,
|
|
447
|
+
coreContract: coreContract,
|
|
448
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
449
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
450
|
+
vault: address(0)
|
|
540
451
|
});
|
|
541
452
|
|
|
542
453
|
return tokenId;
|
|
543
454
|
}
|
|
544
455
|
|
|
545
456
|
/**
|
|
546
|
-
* @notice Purchases a token from project `
|
|
547
|
-
* the token's owner to `
|
|
457
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
458
|
+
* the token's owner to `to`.
|
|
548
459
|
* Note: Collectors should not send excessive value with their purchase
|
|
549
460
|
* transaction, because the artist has the ability to change the auction
|
|
550
461
|
* details at any time, including the price.
|
|
551
|
-
* @param
|
|
552
|
-
* @param
|
|
553
|
-
* @param
|
|
554
|
-
* @param
|
|
462
|
+
* @param to Address to be the new token's owner.
|
|
463
|
+
* @param projectId Project ID to mint a token on.
|
|
464
|
+
* @param coreContract Core contract address for the given project.
|
|
465
|
+
* @param ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
555
466
|
* msg.sender being used to claim right to purchase.
|
|
556
|
-
* @param
|
|
467
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
557
468
|
* to claim right to purchase.
|
|
558
469
|
* @return tokenId Token ID of minted token
|
|
559
470
|
*/
|
|
560
471
|
function purchaseTo(
|
|
561
|
-
address
|
|
562
|
-
uint256
|
|
563
|
-
address
|
|
564
|
-
address
|
|
565
|
-
uint256
|
|
472
|
+
address to,
|
|
473
|
+
uint256 projectId,
|
|
474
|
+
address coreContract,
|
|
475
|
+
address ownedNFTAddress,
|
|
476
|
+
uint256 ownedNFTTokenId
|
|
566
477
|
) external payable returns (uint256 tokenId) {
|
|
567
478
|
return
|
|
568
479
|
purchaseTo({
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
480
|
+
to: to,
|
|
481
|
+
projectId: projectId,
|
|
482
|
+
coreContract: coreContract,
|
|
483
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
484
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
485
|
+
vault: address(0)
|
|
575
486
|
});
|
|
576
487
|
}
|
|
577
488
|
|
|
578
489
|
// public getter functions
|
|
579
490
|
/**
|
|
580
491
|
* @notice Gets the maximum invocations project configuration.
|
|
581
|
-
* @param
|
|
582
|
-
* @param
|
|
492
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
493
|
+
* @param coreContract The address of the core contract.
|
|
583
494
|
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
584
495
|
* configuration data.
|
|
585
496
|
*/
|
|
586
497
|
function maxInvocationsProjectConfig(
|
|
587
|
-
uint256
|
|
588
|
-
address
|
|
498
|
+
uint256 projectId,
|
|
499
|
+
address coreContract
|
|
589
500
|
)
|
|
590
501
|
external
|
|
591
502
|
view
|
|
592
503
|
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
593
504
|
{
|
|
594
|
-
return
|
|
505
|
+
return
|
|
506
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
507
|
+
projectId: projectId,
|
|
508
|
+
coreContract: coreContract
|
|
509
|
+
});
|
|
595
510
|
}
|
|
596
511
|
|
|
597
512
|
/**
|
|
598
513
|
* @notice Retrieves the auction parameters for a specific project.
|
|
599
|
-
* @param
|
|
600
|
-
* @param
|
|
514
|
+
* @param projectId The unique identifier for the project.
|
|
515
|
+
* @param coreContract The address of the core contract for the project.
|
|
601
516
|
* @return timestampStart The start timestamp for the auction.
|
|
602
517
|
* @return priceDecayHalfLifeSeconds The half-life for the price decay
|
|
603
518
|
* during the auction, in seconds.
|
|
@@ -605,8 +520,8 @@ contract MinterDAExpHolderV5 is
|
|
|
605
520
|
* @return basePrice The base price of the auction.
|
|
606
521
|
*/
|
|
607
522
|
function projectAuctionParameters(
|
|
608
|
-
uint256
|
|
609
|
-
address
|
|
523
|
+
uint256 projectId,
|
|
524
|
+
address coreContract
|
|
610
525
|
)
|
|
611
526
|
external
|
|
612
527
|
view
|
|
@@ -617,38 +532,38 @@ contract MinterDAExpHolderV5 is
|
|
|
617
532
|
uint256 basePrice
|
|
618
533
|
)
|
|
619
534
|
{
|
|
620
|
-
DAExpLib.DAProjectConfig
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
535
|
+
DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
|
|
536
|
+
.getDAProjectConfig({
|
|
537
|
+
projectId: projectId,
|
|
538
|
+
coreContract: coreContract
|
|
539
|
+
});
|
|
540
|
+
timestampStart = auctionProjectConfig.timestampStart;
|
|
541
|
+
priceDecayHalfLifeSeconds = auctionProjectConfig
|
|
626
542
|
.priceDecayHalfLifeSeconds;
|
|
627
|
-
startPrice =
|
|
628
|
-
basePrice =
|
|
543
|
+
startPrice = auctionProjectConfig.startPrice;
|
|
544
|
+
basePrice = auctionProjectConfig.basePrice;
|
|
629
545
|
}
|
|
630
546
|
|
|
631
547
|
/**
|
|
632
|
-
* @notice Checks if the specified `
|
|
633
|
-
* @dev This function retrieves the cached value of `
|
|
548
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
549
|
+
* @dev This function retrieves the cached value of `coreContract` from
|
|
634
550
|
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
635
|
-
* returns the cached value. Otherwise, it calls the `
|
|
636
|
-
* function from the `SplitFundsLib` library to check if `
|
|
551
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
552
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
637
553
|
* is a valid engine contract.
|
|
638
|
-
* @dev This function will revert if the provided `
|
|
554
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
639
555
|
* a valid Engine or V3 Flagship contract.
|
|
640
|
-
* @param
|
|
641
|
-
* @return bool indicating if `
|
|
556
|
+
* @param coreContract The address of the contract to check.
|
|
557
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
642
558
|
*/
|
|
643
|
-
function isEngineView(address
|
|
644
|
-
SplitFundsLib.IsEngineCache storage isEngineCache =
|
|
645
|
-
|
|
646
|
-
];
|
|
559
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
560
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
561
|
+
.getIsEngineCacheConfig(coreContract);
|
|
647
562
|
if (isEngineCache.isCached) {
|
|
648
563
|
return isEngineCache.isEngine;
|
|
649
564
|
} else {
|
|
650
|
-
// @dev this calls the non-modifying variant of
|
|
651
|
-
return SplitFundsLib.getV3CoreIsEngineView(
|
|
565
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
566
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
652
567
|
}
|
|
653
568
|
}
|
|
654
569
|
|
|
@@ -663,17 +578,18 @@ contract MinterDAExpHolderV5 is
|
|
|
663
578
|
* possible because the V3 core contract only allows maximum invocations
|
|
664
579
|
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
665
580
|
* do not do input validation in this method as to whether or not the input
|
|
666
|
-
* @param
|
|
667
|
-
* @param
|
|
581
|
+
* @param projectId is an existing project ID.
|
|
582
|
+
* @param coreContract is an existing core contract address.
|
|
668
583
|
*/
|
|
669
584
|
function projectMaxHasBeenInvoked(
|
|
670
|
-
uint256
|
|
671
|
-
address
|
|
585
|
+
uint256 projectId,
|
|
586
|
+
address coreContract
|
|
672
587
|
) external view returns (bool) {
|
|
673
588
|
return
|
|
674
|
-
MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
675
|
-
|
|
676
|
-
|
|
589
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
590
|
+
projectId: projectId,
|
|
591
|
+
coreContract: coreContract
|
|
592
|
+
});
|
|
677
593
|
}
|
|
678
594
|
|
|
679
595
|
/**
|
|
@@ -692,26 +608,27 @@ contract MinterDAExpHolderV5 is
|
|
|
692
608
|
* increased. When this happens, the minter will enable minting, allowing
|
|
693
609
|
* the core contract to enforce the max invocations check. Based on this
|
|
694
610
|
* rationale, we intentionally do not do input validation in this method as
|
|
695
|
-
* to whether or not the input `
|
|
696
|
-
* @param
|
|
697
|
-
* @param
|
|
611
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
612
|
+
* @param projectId is an existing project ID.
|
|
613
|
+
* @param coreContract is an existing core contract address.
|
|
698
614
|
*/
|
|
699
615
|
function projectMaxInvocations(
|
|
700
|
-
uint256
|
|
701
|
-
address
|
|
616
|
+
uint256 projectId,
|
|
617
|
+
address coreContract
|
|
702
618
|
) external view returns (uint256) {
|
|
703
619
|
return
|
|
704
|
-
MaxInvocationsLib.getMaxInvocations(
|
|
705
|
-
|
|
706
|
-
|
|
620
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
621
|
+
projectId: projectId,
|
|
622
|
+
coreContract: coreContract
|
|
623
|
+
});
|
|
707
624
|
}
|
|
708
625
|
|
|
709
626
|
/**
|
|
710
627
|
* @notice Gets if price of token is configured, price of minting a
|
|
711
|
-
* token on project `
|
|
628
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
712
629
|
* used as payment. Supersedes any core contract price information.
|
|
713
|
-
* @param
|
|
714
|
-
* @param
|
|
630
|
+
* @param projectId Project ID to get price information for
|
|
631
|
+
* @param coreContract Contract address of the core contract
|
|
715
632
|
* @return isConfigured true only if token price has been configured on
|
|
716
633
|
* this minter
|
|
717
634
|
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
@@ -722,8 +639,8 @@ contract MinterDAExpHolderV5 is
|
|
|
722
639
|
* this minter. This minter always returns null address, reserved for ether
|
|
723
640
|
*/
|
|
724
641
|
function getPriceInfo(
|
|
725
|
-
uint256
|
|
726
|
-
address
|
|
642
|
+
uint256 projectId,
|
|
643
|
+
address coreContract
|
|
727
644
|
)
|
|
728
645
|
external
|
|
729
646
|
view
|
|
@@ -734,10 +651,11 @@ contract MinterDAExpHolderV5 is
|
|
|
734
651
|
address currencyAddress
|
|
735
652
|
)
|
|
736
653
|
{
|
|
737
|
-
DAExpLib.DAProjectConfig
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
654
|
+
DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
|
|
655
|
+
.getDAProjectConfig({
|
|
656
|
+
projectId: projectId,
|
|
657
|
+
coreContract: coreContract
|
|
658
|
+
});
|
|
741
659
|
isConfigured = (auctionProjectConfig.startPrice > 0);
|
|
742
660
|
if (!isConfigured) {
|
|
743
661
|
// In the case of unconfigured auction, return price of zero when
|
|
@@ -749,7 +667,10 @@ contract MinterDAExpHolderV5 is
|
|
|
749
667
|
// before auction starts.
|
|
750
668
|
tokenPriceInWei = auctionProjectConfig.startPrice;
|
|
751
669
|
} else {
|
|
752
|
-
tokenPriceInWei = DAExpLib.getPriceExp(
|
|
670
|
+
tokenPriceInWei = DAExpLib.getPriceExp({
|
|
671
|
+
projectId: projectId,
|
|
672
|
+
coreContract: coreContract
|
|
673
|
+
});
|
|
753
674
|
}
|
|
754
675
|
currencySymbol = "ETH";
|
|
755
676
|
currencyAddress = address(0);
|
|
@@ -759,141 +680,126 @@ contract MinterDAExpHolderV5 is
|
|
|
759
680
|
* @notice Checks if a specific NFT owner is allowed in a given project.
|
|
760
681
|
* @dev This function retrieves the allowance status of an NFT owner
|
|
761
682
|
* within a specific project from the allowedProjectHoldersMapping.
|
|
762
|
-
* @param
|
|
763
|
-
* @param
|
|
764
|
-
* @param
|
|
765
|
-
* @param
|
|
683
|
+
* @param projectId The ID of the project to check.
|
|
684
|
+
* @param coreContract Core contract address for the given project.
|
|
685
|
+
* @param ownedNFTAddress The address of the owned NFT contract.
|
|
686
|
+
* @param ownedNFTProjectId The ID of the owned NFT project.
|
|
766
687
|
* @return bool True if the NFT owner is allowed in the given project, False otherwise.
|
|
767
688
|
*/
|
|
768
689
|
function allowedProjectHolders(
|
|
769
|
-
uint256
|
|
770
|
-
address
|
|
771
|
-
address
|
|
772
|
-
uint256
|
|
690
|
+
uint256 projectId,
|
|
691
|
+
address coreContract,
|
|
692
|
+
address ownedNFTAddress,
|
|
693
|
+
uint256 ownedNFTProjectId
|
|
773
694
|
) external view returns (bool) {
|
|
774
695
|
return
|
|
775
|
-
|
|
776
|
-
.
|
|
696
|
+
TokenHolderLib
|
|
697
|
+
.getHolderProjectConfig({
|
|
698
|
+
projectId: projectId,
|
|
699
|
+
coreContract: coreContract
|
|
700
|
+
})
|
|
701
|
+
.allowedProjectHolders[ownedNFTAddress][ownedNFTProjectId];
|
|
777
702
|
}
|
|
778
703
|
|
|
779
704
|
/**
|
|
780
|
-
* @notice Returns if token is an allowlisted NFT for project `
|
|
781
|
-
* @param
|
|
782
|
-
* @param
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
705
|
+
* @notice Returns if token is an allowlisted NFT for project `projectId`.
|
|
706
|
+
* @param projectId Project ID to be checked.
|
|
707
|
+
* @param coreContract Core contract address for the given project.
|
|
708
|
+
* @param ownedNFTAddress ERC-721 NFT token address to be checked.
|
|
709
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID to be checked.
|
|
785
710
|
* @return bool Token is allowlisted
|
|
786
711
|
* @dev does not check if token has been used to purchase
|
|
787
712
|
* @dev assumes project ID can be derived from tokenId / 1_000_000
|
|
788
713
|
*/
|
|
789
714
|
function isAllowlistedNFT(
|
|
790
|
-
uint256
|
|
791
|
-
address
|
|
792
|
-
address
|
|
793
|
-
uint256
|
|
715
|
+
uint256 projectId,
|
|
716
|
+
address coreContract,
|
|
717
|
+
address ownedNFTAddress,
|
|
718
|
+
uint256 ownedNFTTokenId
|
|
794
719
|
) external view returns (bool) {
|
|
795
720
|
return
|
|
796
721
|
TokenHolderLib.isAllowlistedNFT({
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
_ownedNFTTokenId: _ownedNFTTokenId
|
|
722
|
+
projectId: projectId,
|
|
723
|
+
coreContract: coreContract,
|
|
724
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
725
|
+
ownedNFTTokenId: ownedNFTTokenId
|
|
802
726
|
});
|
|
803
727
|
}
|
|
804
728
|
|
|
805
729
|
/**
|
|
806
|
-
* @notice Syncs local maximum invocations of project `
|
|
730
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
807
731
|
* the value currently defined in the core contract.
|
|
808
|
-
* @param
|
|
809
|
-
* @param
|
|
732
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
733
|
+
* @param coreContract Core contract address for the given project.
|
|
810
734
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
811
735
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
812
736
|
*/
|
|
813
737
|
function syncProjectMaxInvocationsToCore(
|
|
814
|
-
uint256
|
|
815
|
-
address
|
|
738
|
+
uint256 projectId,
|
|
739
|
+
address coreContract
|
|
816
740
|
) public {
|
|
817
741
|
AuthLib.onlyArtist({
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
742
|
+
projectId: projectId,
|
|
743
|
+
coreContract: coreContract,
|
|
744
|
+
sender: msg.sender
|
|
821
745
|
});
|
|
822
746
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
|
|
828
|
-
_coreContract
|
|
829
|
-
][_projectId]
|
|
830
|
-
});
|
|
831
|
-
emit ProjectMaxInvocationsLimitUpdated(
|
|
832
|
-
_projectId,
|
|
833
|
-
_coreContract,
|
|
834
|
-
maxInvocations
|
|
835
|
-
);
|
|
747
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
748
|
+
projectId: projectId,
|
|
749
|
+
coreContract: coreContract
|
|
750
|
+
});
|
|
836
751
|
}
|
|
837
752
|
|
|
838
753
|
/**
|
|
839
|
-
* @notice Purchases a token from project `
|
|
840
|
-
* the token's owner to `
|
|
754
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
755
|
+
* the token's owner to `to`.
|
|
841
756
|
* Note: Collectors should not send excessive value with their purchase
|
|
842
757
|
* transaction, because the artist has the ability to change the auction
|
|
843
758
|
* details at any time, including the price.
|
|
844
|
-
* @param
|
|
845
|
-
* @param
|
|
846
|
-
* @param
|
|
847
|
-
* @param
|
|
759
|
+
* @param to Address to be the new token's owner.
|
|
760
|
+
* @param projectId Project ID to mint a token on.
|
|
761
|
+
* @param coreContract Core contract address for the given project.
|
|
762
|
+
* @param ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
848
763
|
* msg.sender being used to claim right to purchase.
|
|
849
|
-
* @param
|
|
764
|
+
* @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
850
765
|
* to claim right to purchase.
|
|
851
766
|
* @return tokenId Token ID of minted token
|
|
852
767
|
*/
|
|
853
768
|
function purchaseTo(
|
|
854
|
-
address
|
|
855
|
-
uint256
|
|
856
|
-
address
|
|
857
|
-
address
|
|
858
|
-
uint256
|
|
859
|
-
address
|
|
769
|
+
address to,
|
|
770
|
+
uint256 projectId,
|
|
771
|
+
address coreContract,
|
|
772
|
+
address ownedNFTAddress,
|
|
773
|
+
uint256 ownedNFTTokenId,
|
|
774
|
+
address vault
|
|
860
775
|
) public payable nonReentrant returns (uint256 tokenId) {
|
|
861
776
|
// CHECKS
|
|
862
|
-
MaxInvocationsLib
|
|
863
|
-
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
864
|
-
_coreContract
|
|
865
|
-
][_projectId];
|
|
866
|
-
|
|
867
|
-
DAExpLib.DAProjectConfig
|
|
868
|
-
storage _auctionProjectConfig = _auctionProjectConfigMapping[
|
|
869
|
-
_coreContract
|
|
870
|
-
][_projectId];
|
|
871
|
-
|
|
777
|
+
// pre-mint MaxInvocationsLib checks
|
|
872
778
|
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
873
779
|
// consumption after a project has been fully minted.
|
|
874
|
-
// `
|
|
780
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
875
781
|
// gas consumption, but if not in sync with the core contract's value,
|
|
876
782
|
// the core contract also enforces its own max invocation check during
|
|
877
783
|
// minting.
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
);
|
|
784
|
+
MaxInvocationsLib.preMintChecks({
|
|
785
|
+
projectId: projectId,
|
|
786
|
+
coreContract: coreContract
|
|
787
|
+
});
|
|
882
788
|
|
|
883
789
|
// getPriceExp reverts if auction is unconfigured or has not started
|
|
884
|
-
uint256 pricePerTokenInWei = DAExpLib.getPriceExp(
|
|
885
|
-
|
|
886
|
-
|
|
790
|
+
uint256 pricePerTokenInWei = DAExpLib.getPriceExp({
|
|
791
|
+
projectId: projectId,
|
|
792
|
+
coreContract: coreContract
|
|
793
|
+
});
|
|
887
794
|
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
888
795
|
|
|
889
796
|
// require token used to claim to be in set of allowlisted NFTs
|
|
890
797
|
require(
|
|
891
798
|
TokenHolderLib.isAllowlistedNFT({
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
_ownedNFTTokenId: _ownedNFTTokenId
|
|
799
|
+
projectId: projectId,
|
|
800
|
+
coreContract: coreContract,
|
|
801
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
802
|
+
ownedNFTTokenId: ownedNFTTokenId
|
|
897
803
|
}),
|
|
898
804
|
"Only allowlisted NFTs"
|
|
899
805
|
);
|
|
@@ -901,43 +807,43 @@ contract MinterDAExpHolderV5 is
|
|
|
901
807
|
// NOTE: delegate-vault handling **begins here**.
|
|
902
808
|
|
|
903
809
|
// handle that the vault may be either the `msg.sender` in the case
|
|
904
|
-
// that there is not a true vault, or may be `
|
|
810
|
+
// that there is not a true vault, or may be `vault` if one is
|
|
905
811
|
// provided explicitly (and it is valid).
|
|
906
|
-
address
|
|
907
|
-
if (
|
|
812
|
+
address vault_ = msg.sender;
|
|
813
|
+
if (vault != address(0)) {
|
|
908
814
|
// If a vault is provided, it must be valid, otherwise throw rather
|
|
909
815
|
// than optimistically-minting with original `msg.sender`.
|
|
910
816
|
// Note, we do not check `checkDelegateForAll` or `checkDelegateForContract` as well,
|
|
911
817
|
// as they are known to be implicitly checked by calling `checkDelegateForToken`.
|
|
912
|
-
bool isValidVault =
|
|
818
|
+
bool isValidVault = _delegationRegistryContract
|
|
913
819
|
.checkDelegateForToken({
|
|
914
820
|
delegate: msg.sender,
|
|
915
|
-
vault:
|
|
916
|
-
contract_:
|
|
917
|
-
tokenId:
|
|
821
|
+
vault: vault,
|
|
822
|
+
contract_: coreContract,
|
|
823
|
+
tokenId: ownedNFTTokenId
|
|
918
824
|
});
|
|
919
825
|
|
|
920
826
|
require(isValidVault, "Invalid delegate-vault pairing");
|
|
921
|
-
|
|
827
|
+
vault_ = vault;
|
|
922
828
|
}
|
|
923
829
|
|
|
924
830
|
// EFFECTS
|
|
925
|
-
tokenId =
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
831
|
+
tokenId = _minterFilter.mint_joo({
|
|
832
|
+
to: to,
|
|
833
|
+
projectId: projectId,
|
|
834
|
+
coreContract: coreContract,
|
|
835
|
+
sender: vault_
|
|
930
836
|
});
|
|
931
837
|
|
|
932
838
|
// NOTE: delegate-vault handling **ends here**.
|
|
933
839
|
|
|
934
|
-
MaxInvocationsLib.
|
|
935
|
-
tokenId,
|
|
936
|
-
|
|
937
|
-
);
|
|
840
|
+
MaxInvocationsLib.validateMintEffectsInvocations({
|
|
841
|
+
tokenId: tokenId,
|
|
842
|
+
coreContract: coreContract
|
|
843
|
+
});
|
|
938
844
|
|
|
939
845
|
// INTERACTIONS
|
|
940
|
-
// require
|
|
846
|
+
// require vault_ to own NFT used to redeem
|
|
941
847
|
/**
|
|
942
848
|
* @dev Considered an interaction because calling ownerOf on an NFT
|
|
943
849
|
* contract. Plan is to only integrate with AB/PBAB NFTs on the minter, but
|
|
@@ -945,20 +851,14 @@ contract MinterDAExpHolderV5 is
|
|
|
945
851
|
* function is non-reentrant, so this is extra cautious.
|
|
946
852
|
*/
|
|
947
853
|
TokenHolderLib.validateNFTOwnership({
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
854
|
+
ownedNFTAddress: ownedNFTAddress,
|
|
855
|
+
ownedNFTTokenId: ownedNFTTokenId,
|
|
856
|
+
targetOwner: vault_
|
|
951
857
|
});
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
);
|
|
957
|
-
SplitFundsLib.splitFundsETH({
|
|
958
|
-
_projectId: _projectId,
|
|
959
|
-
_pricePerTokenInWei: pricePerTokenInWei,
|
|
960
|
-
_coreContract: _coreContract,
|
|
961
|
-
_isEngine: isEngine
|
|
858
|
+
SplitFundsLib.splitFundsETHRefundSender({
|
|
859
|
+
projectId: projectId,
|
|
860
|
+
pricePerTokenInWei: pricePerTokenInWei,
|
|
861
|
+
coreContract: coreContract
|
|
962
862
|
});
|
|
963
863
|
|
|
964
864
|
return tokenId;
|