@artblocks/contracts 1.0.3 → 1.0.4
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 +32 -25
- 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 +125 -17
- package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +6 -6
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV0.sol/MinterDAExpV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV1.sol/MinterDAExpV1.json +2 -2
- 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/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/MinterDALin/MinterDALinV0.sol/MinterDALinV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV1.sol/MinterDALinV1.json +2 -2
- 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/archive/minter-suite/Minters/MinterHolder/MinterHolderV0.sol/MinterHolderV0.json +2 -2
- 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/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV0.sol/MinterMerkleV0.json +2 -2
- 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/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV0.sol/MinterSetPriceV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV1.sol/MinterSetPriceV1.json +2 -2
- 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/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +2 -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/engine/V2/GenArt721CoreV2_ENGINE_FLEX.sol/GenArt721CoreV2_ENGINE_FLEX.json +2 -2
- package/artifacts/contracts/engine/V2/GenArt721CoreV2_PBAB.sol/GenArt721CoreV2_PBAB.json +2 -2
- package/artifacts/contracts/engine/V2/GenArt721CoreV2_PRTNR.sol/GenArt721CoreV2_PRTNR.json +2 -2
- package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +2 -2
- package/artifacts/contracts/engine/V2/GenArt721MinterDAExp_PBAB.sol/GenArt721MinterDAExp_PBAB.json +2 -2
- package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +2 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +6 -6
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +6 -6
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +4 -4
- 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 +6 -6
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
- package/artifacts/contracts/engine-registry/EngineRegistryV0.sol/EngineRegistryV0.json +2 -2
- package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +6 -6
- package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IBonusContract.sol/IBonusContract.json +1 -1
- package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +1 -1
- package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IRandomizer.sol/IRandomizer.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IAdminACLV0.sol/IAdminACLV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IArtblocksRoyaltyOverride.sol/IArtblocksRoyaltyOverride.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IBonusContract.sol/IBonusContract.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ICoreRegistryV1.sol/ICoreRegistryV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDelegationRegistry.sol/IDelegationRegistry.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryCompatibleV0.sol/IDependencyRegistryCompatibleV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +3 -3
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IEngineRegistryV0.sol/IEngineRegistryV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlement_Mixin.sol/IFilteredMinterDAExpSettlement_Mixin.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV0.sol/IFilteredMinterDAExpV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV1.sol/IFilteredMinterDAExpV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV0.sol/IFilteredMinterDALinV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV1.sol/IFilteredMinterDALinV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV0.sol/IFilteredMinterHolderV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV1.sol/IFilteredMinterHolderV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV2.sol/IFilteredMinterHolderV2.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV0.sol/IFilteredMinterMerkleV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV1.sol/IFilteredMinterMerkleV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV2.sol/IFilteredMinterMerkleV2.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterSEAV0.sol/IFilteredMinterSEAV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV0.sol/IFilteredMinterV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV1.sol/IFilteredMinterV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV2.sol/IFilteredMinterV2.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractExposesHashSeed.sol/IGenArt721CoreContractExposesHashSeed.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol/IGenArt721CoreContractV3WithSharedRandomizer.json +24 -0
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IManifold.sol/IManifold.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterBaseV0.sol/IMinterBaseV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV0.sol/IMinterFilterV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol/IMinterFilterV1.json +86 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPICoreV0.sol/IMintingAPICoreV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPIMinterV0.sol/IMintingAPIMinterV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer.sol/IRandomizer.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerPolyptychV0.sol/IRandomizerPolyptychV0.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerV2.sol/IRandomizerV2.json +1 -1
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer_V3CoreBase.sol/IRandomizer_V3CoreBase.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +207 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +93 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +93 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +69 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +203 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +123 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +261 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +64 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +533 -0
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +42 -26
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol/IWETH.json +1 -1
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Address.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Counters.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/CustomERC721Metadata.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721Enumerable.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/GenArt721CoreV1.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/SafeMath.json +2 -2
- package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Strings.json +2 -2
- package/artifacts/contracts/legacy/GenArt721LegacyMinter.sol/GenArt721LegacyMinter.json +2 -2
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
- package/artifacts/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol/CustomERC721Metadata.json +3 -3
- package/artifacts/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol/IERC20.json +1 -1
- package/artifacts/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol/SafeMath.json +3 -3
- package/artifacts/contracts/libs/{0.5.x → v0.5.x}/Strings.sol/Strings.json +3 -3
- package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +10 -0
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol/BytecodeStorage.json +3 -3
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageReader.json +3 -3
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageWriter.json +3 -3
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol/Bytes32Strings.json +3 -3
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +3 -3
- package/artifacts/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol/SSTORE2.json +3 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +10 -0
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV0.sol/MinterFilterV0.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +58 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +1228 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +1146 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +909 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +1228 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV4.sol/MinterDALinV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +909 -0
- package/artifacts/contracts/minter-suite/Minters/MinterHolderV4.sol/MinterHolderV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV0.sol/MinterSEAV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +1325 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +848 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +1091 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +1075 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +1243 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +1167 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +772 -0
- package/artifacts/contracts/mock/BytecodeV0TextCR_DMock.sol/BytecodeV0TextCR_DMock.json +2 -2
- package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/BytecodeV1TextCR_DMock.sol/BytecodeV1TextCR_DMock.json +4 -4
- package/artifacts/contracts/mock/DeadReceiverBidderMock.sol/DeadReceiverBidderMock.json +25 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +28 -2
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +4 -4
- package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +2 -2
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -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/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
- package/artifacts/contracts/mock/SSTORE2Mock.sol/SSTORE2Mock.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/BasicRandomizer.sol/BasicRandomizer.json +2 -2
- 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 +48 -32
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +2 -2
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +2 -2
- package/contracts/AdminACLV0.sol +1 -1
- package/contracts/AdminACLV1.sol +1 -1
- package/contracts/DependencyRegistryV0.sol +216 -107
- package/contracts/GenArt721CoreV3.sol +27 -12
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol +3 -3
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol +3 -3
- package/contracts/engine/V2/GenArt721CoreV2_ENGINE_FLEX.sol +2 -2
- package/contracts/engine/V2/GenArt721CoreV2_PBAB.sol +2 -2
- package/contracts/engine/V2/GenArt721CoreV2_PRTNR.sol +3 -3
- package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +2 -2
- package/contracts/engine/V2/GenArt721MinterDAExp_PBAB.sol +1 -1
- package/contracts/engine/V2/GenArt721Minter_PBAB.sol +2 -2
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +29 -14
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +29 -14
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +9 -9
- package/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol +1 -1
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +20 -15
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IAdminACLV0_PROHIBITION.sol +1 -1
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +1 -1
- package/contracts/engine-registry/CoreRegistryV1.sol +1 -1
- package/contracts/engine-registry/EngineRegistryV0.sol +1 -1
- package/contracts/explorations/GenArt721CoreV3_Explorations.sol +27 -12
- package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol +2 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol +23 -0
- package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol +26 -0
- package/contracts/interfaces/v0.8.x/IRandomizer_V3CoreBase.sol +23 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +37 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +25 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +26 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +69 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +44 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +78 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +28 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +191 -0
- package/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol +42 -24
- package/contracts/legacy/GenArt721CoreV1.sol +2 -2
- package/contracts/legacy/GenArt721LegacyMinter.sol +5 -5
- package/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol +1 -1
- package/contracts/libs/v0.8.x/ABHelpers.sol +55 -0
- package/contracts/libs/v0.8.x/AuthLib.sol +197 -0
- package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +125 -0
- package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +109 -0
- package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +348 -0
- package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +175 -0
- package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +160 -0
- package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +320 -0
- package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +44 -0
- package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +390 -0
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +583 -0
- package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +153 -0
- package/contracts/minter-suite/MinterFilter/MinterFilterV0.sol +3 -3
- package/contracts/minter-suite/MinterFilter/MinterFilterV1.sol +5 -5
- package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +83 -9
- package/contracts/minter-suite/Minters/MinterBase_v0_1_1.sol +4 -4
- package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +966 -0
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +3 -3
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +1126 -0
- package/contracts/minter-suite/Minters/MinterDAExpV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterDAExpV5.sol +606 -0
- package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +952 -0
- package/contracts/minter-suite/Minters/MinterDALinV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterDALinV5.sol +591 -0
- package/contracts/minter-suite/Minters/MinterHolderV4.sol +4 -4
- package/contracts/minter-suite/Minters/MinterMerkleV5.sol +4 -4
- package/contracts/minter-suite/Minters/MinterPolyptychV0.sol +6 -6
- package/contracts/minter-suite/Minters/MinterSEAV0.sol +3 -3
- package/contracts/minter-suite/Minters/MinterSEAV1.sol +1190 -0
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol +5 -5
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +570 -0
- package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +821 -0
- package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +802 -0
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +1096 -0
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +992 -0
- package/contracts/minter-suite/Minters/MinterSetPriceV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +461 -0
- package/contracts/mock/BytecodeV0TextCR_DMock.sol +1 -1
- package/contracts/mock/BytecodeV1LibCallsMock.sol +1 -1
- package/contracts/mock/BytecodeV1TextCR_DMock.sol +1 -1
- package/contracts/mock/DeadReceiverBidderMock.sol +15 -0
- package/contracts/mock/DummySharedMinter.sol +2 -2
- package/contracts/mock/ERC20Mock.sol +16 -0
- package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +9 -9
- package/contracts/mock/MockAdminACLV0.sol +1 -1
- package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +1 -1
- package/contracts/mock/OriginRegisterMock.sol +1 -1
- package/contracts/mock/ReentrancyHolderMock.sol +1 -1
- package/contracts/mock/ReentrancyMerkleMock.sol +1 -1
- package/contracts/mock/ReentrancyMock.sol +1 -1
- package/contracts/mock/ReentrancySEAMock.sol +1 -1
- package/contracts/mock/SSTORE2Mock.sol +1 -1
- package/contracts/randomizer/deprecated/BasicRandomizer.sol +1 -1
- package/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol +2 -2
- package/contracts/randomizer/deprecated/RandomizerV2.sol +2 -2
- package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
- package/contracts/randomizer/shared/SharedRandomizerV0.sol +91 -76
- package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +2 -2
- package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +2 -2
- package/package.json +46 -31
- package/LICENSE +0 -165
- package/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol +0 -10
- /package/contracts/interfaces/{0.5.x → v0.5.x}/IBonusContract.sol +0 -0
- /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreContractV1.sol +0 -0
- /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreV2_PBAB.sol +0 -0
- /package/contracts/interfaces/{0.5.x → v0.5.x}/IRandomizer.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IAdminACLV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IArtblocksRoyaltyOverride.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IBonusContract.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IBytecodeStorageReader.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/ICoreRegistryV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IDelegationRegistry.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryCompatibleV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IEngineRegistryV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlement_Mixin.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV2.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV2.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterSEAV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV2.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractExposesHashSeed.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV1.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Base.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine_Flex.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreV2_PBAB.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IManifold.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterBaseV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPICoreV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPIMinterV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IPseudorandomAtomic.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerPolyptychV0.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerV2.sol +0 -0
- /package/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol +0 -0
- /package/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol +0 -0
- /package/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol +0 -0
- /package/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol +0 -0
- /package/contracts/libs/{0.5.x → v0.5.x}/Strings.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol +0 -0
|
@@ -0,0 +1,966 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
import "../../interfaces/v0.8.x/IDelegationRegistry.sol";
|
|
5
|
+
import "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
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
|
+
|
|
21
|
+
pragma solidity 0.8.19;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
25
|
+
* ETH when purchaser owns an allowlisted ERC-721 NFT. This contract does NOT
|
|
26
|
+
* track if a purchaser has/has not minted already -- it simply restricts
|
|
27
|
+
* purchasing to anybody that holds one or more of a specified list of ERC-721
|
|
28
|
+
* NFTs. Pricing is achieved using an automated, exponential Dutch-auction mechanism.
|
|
29
|
+
* This is designed to be used with GenArt721CoreContractV3 flagship or
|
|
30
|
+
* engine contracts.
|
|
31
|
+
* @author Art Blocks Inc.
|
|
32
|
+
* @notice Privileged Roles and Ownership:
|
|
33
|
+
* This contract is designed to be managed, with limited powers.
|
|
34
|
+
* Privileged roles and abilities are controlled by the project's artist, which
|
|
35
|
+
* can be modified by the core contract's Admin ACL contract. Both of these
|
|
36
|
+
* roles hold extensive power and can modify minter details.
|
|
37
|
+
* Care must be taken to ensure that the admin ACL contract and artist
|
|
38
|
+
* addresses are secure behind a multi-sig or other access control mechanism.
|
|
39
|
+
* ----------------------------------------------------------------------------
|
|
40
|
+
* The following functions are restricted to the minter filter's Admin ACL
|
|
41
|
+
* contract:
|
|
42
|
+
* - setMinimumPriceDecayHalfLifeSeconds
|
|
43
|
+
* ----------------------------------------------------------------------------
|
|
44
|
+
* The following functions are restricted to the core contract's Admin ACL
|
|
45
|
+
* contract:
|
|
46
|
+
* - resetAuctionDetails (note: this will prevent minting until a new auction
|
|
47
|
+
* is created)
|
|
48
|
+
* ----------------------------------------------------------------------------
|
|
49
|
+
* The following functions are restricted to a project's artist:
|
|
50
|
+
* - setAuctionDetails (note: this may only be called when there is no active
|
|
51
|
+
* auction)
|
|
52
|
+
* - syncProjectMaxInvocationsToCore
|
|
53
|
+
* - manuallyLimitProjectMaxInvocations
|
|
54
|
+
* - allowHoldersOfProjects
|
|
55
|
+
* - removeHoldersOfProjects
|
|
56
|
+
* - allowAndRemoveHoldersOfProjects
|
|
57
|
+
* ----------------------------------------------------------------------------
|
|
58
|
+
* Additional admin and artist privileged roles may be described on other
|
|
59
|
+
* contracts that this minter integrates with.
|
|
60
|
+
*
|
|
61
|
+
* This contract allows gated minting with support for vaults to delegate minting
|
|
62
|
+
* privileges via an external delegation registry. This means a vault holding an
|
|
63
|
+
* allowed token can delegate minting privileges to a wallet that is not holding an
|
|
64
|
+
* allowed token, enabling the vault to remain air-gapped while still allowing minting.
|
|
65
|
+
* The delegation registry contract is responsible for managing these delegations,
|
|
66
|
+
* and is available at the address returned by the public immutable
|
|
67
|
+
* `delegationRegistryAddress`. At the time of writing, the delegation
|
|
68
|
+
* registry enables easy delegation configuring at https://delegate.cash/.
|
|
69
|
+
* Art Blocks does not guarentee the security of the delegation registry, and
|
|
70
|
+
* users should take care to ensure that the delegation registry is secure.
|
|
71
|
+
* Delegations must be configured by the vault owner prior to purchase. Supported
|
|
72
|
+
* delegation types include token-level, contract-level (via genArt721CoreAddress), or
|
|
73
|
+
* wallet-level delegation. Contract-level delegations must be configured for the core
|
|
74
|
+
* token contract as returned by the public immutable variable `genArt721CoreAddress`.
|
|
75
|
+
*
|
|
76
|
+
* @dev Note that while this minter makes use of `block.timestamp` and it is
|
|
77
|
+
* technically possible that this value is manipulated by block producers, such
|
|
78
|
+
* manipulation will not have material impact on the price values of this minter
|
|
79
|
+
* given the business practices for how pricing is congfigured for this minter
|
|
80
|
+
* and that variations on the order of less than a minute should not
|
|
81
|
+
* meaningfully impact price given the minimum allowable price decay rate that
|
|
82
|
+
* this minter intends to support.
|
|
83
|
+
*/
|
|
84
|
+
contract MinterDAExpHolderV5 is
|
|
85
|
+
ReentrancyGuard,
|
|
86
|
+
ISharedMinterV0,
|
|
87
|
+
ISharedMinterDAV0,
|
|
88
|
+
ISharedMinterDAExpV0,
|
|
89
|
+
ISharedMinterHolderV0
|
|
90
|
+
{
|
|
91
|
+
using SafeCast for uint256;
|
|
92
|
+
// add Enumerable Set methods
|
|
93
|
+
using EnumerableSet for EnumerableSet.AddressSet;
|
|
94
|
+
|
|
95
|
+
/// Minter filter address this minter interacts with
|
|
96
|
+
address public immutable minterFilterAddress;
|
|
97
|
+
|
|
98
|
+
/// Minter filter this minter may interact with.
|
|
99
|
+
IMinterFilterV1 private immutable minterFilter;
|
|
100
|
+
|
|
101
|
+
// Delegation registry address
|
|
102
|
+
address public immutable delegationRegistryAddress;
|
|
103
|
+
|
|
104
|
+
// Delegation registry address
|
|
105
|
+
IDelegationRegistry private immutable delegationRegistryContract;
|
|
106
|
+
|
|
107
|
+
/// minterType for this minter
|
|
108
|
+
string public constant minterType = "MinterDAExpHolderV5";
|
|
109
|
+
|
|
110
|
+
/// minter version for this minter
|
|
111
|
+
string public constant minterVersion = "v5.0.0";
|
|
112
|
+
|
|
113
|
+
//// Minimum price decay half life: price must decay with a half life of at
|
|
114
|
+
/// least this amount (must cut in half at least every N seconds).
|
|
115
|
+
uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
|
|
116
|
+
|
|
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
|
+
/**
|
|
167
|
+
* @notice Initializes contract to be a Filtered Minter for
|
|
168
|
+
* `_minterFilter` minter filter.
|
|
169
|
+
* @param _minterFilter Minter filter for which this will be a
|
|
170
|
+
* filtered minter.
|
|
171
|
+
*/
|
|
172
|
+
constructor(
|
|
173
|
+
address _minterFilter,
|
|
174
|
+
address _delegationRegistryAddress
|
|
175
|
+
) ReentrancyGuard() {
|
|
176
|
+
minterFilterAddress = _minterFilter;
|
|
177
|
+
minterFilter = IMinterFilterV1(_minterFilter);
|
|
178
|
+
|
|
179
|
+
delegationRegistryAddress = _delegationRegistryAddress;
|
|
180
|
+
delegationRegistryContract = IDelegationRegistry(
|
|
181
|
+
_delegationRegistryAddress
|
|
182
|
+
);
|
|
183
|
+
emit DelegationRegistryUpdated(_delegationRegistryAddress);
|
|
184
|
+
emit AuctionMinHalfLifeSecondsUpdated(minimumPriceDecayHalfLifeSeconds);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @notice Manually sets the local maximum invocations of project `_projectId`
|
|
189
|
+
* with the provided `_maxInvocations`, checking that `_maxInvocations` is less
|
|
190
|
+
* than or equal to the value of project `_project_id`'s maximum invocations that is
|
|
191
|
+
* set on the core contract.
|
|
192
|
+
* @dev Note that a `_maxInvocations` of 0 can only be set if the current `invocations`
|
|
193
|
+
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
194
|
+
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
195
|
+
* @param _projectId Project ID to set the maximum invocations for.
|
|
196
|
+
* @param _coreContract Core contract address for the given project.
|
|
197
|
+
* @param _maxInvocations Maximum invocations to set for the project.
|
|
198
|
+
*/
|
|
199
|
+
function manuallyLimitProjectMaxInvocations(
|
|
200
|
+
uint256 _projectId,
|
|
201
|
+
address _coreContract,
|
|
202
|
+
uint24 _maxInvocations
|
|
203
|
+
) external {
|
|
204
|
+
AuthLib.onlyArtist({
|
|
205
|
+
_projectId: _projectId,
|
|
206
|
+
_coreContract: _coreContract,
|
|
207
|
+
_sender: msg.sender
|
|
208
|
+
});
|
|
209
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
210
|
+
_projectId: _projectId,
|
|
211
|
+
_coreContract: _coreContract,
|
|
212
|
+
_maxInvocations: _maxInvocations,
|
|
213
|
+
maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
|
|
214
|
+
_coreContract
|
|
215
|
+
][_projectId]
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
emit ProjectMaxInvocationsLimitUpdated(
|
|
219
|
+
_projectId,
|
|
220
|
+
_coreContract,
|
|
221
|
+
_maxInvocations
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @notice Allows holders of NFTs at addresses `_ownedNFTAddresses`,
|
|
227
|
+
* project IDs `_ownedNFTProjectIds` to mint on project `_projectId`.
|
|
228
|
+
* `_ownedNFTAddresses` assumed to be aligned with `_ownedNFTProjectIds`.
|
|
229
|
+
* e.g. Allows holders of project `_ownedNFTProjectIds[0]` on token
|
|
230
|
+
* contract `_ownedNFTAddresses[0]` to mint `_projectId`.
|
|
231
|
+
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
232
|
+
* due to assumptions about tokenId and projectId relationships.
|
|
233
|
+
* @param _projectId Project ID to enable minting on.
|
|
234
|
+
* @param _coreContract Core contract address for the given project.
|
|
235
|
+
* @param _ownedNFTAddresses NFT core addresses of projects to be
|
|
236
|
+
* allowlisted. Indexes must align with `_ownedNFTProjectIds`.
|
|
237
|
+
* @param _ownedNFTProjectIds Project IDs on `_ownedNFTAddresses` whose
|
|
238
|
+
* holders shall be allowlisted to mint project `_projectId`. Indexes must
|
|
239
|
+
* align with `_ownedNFTAddresses`.
|
|
240
|
+
*/
|
|
241
|
+
function allowHoldersOfProjects(
|
|
242
|
+
uint256 _projectId,
|
|
243
|
+
address _coreContract,
|
|
244
|
+
address[] memory _ownedNFTAddresses,
|
|
245
|
+
uint256[] memory _ownedNFTProjectIds
|
|
246
|
+
) external {
|
|
247
|
+
AuthLib.onlyArtist({
|
|
248
|
+
_projectId: _projectId,
|
|
249
|
+
_coreContract: _coreContract,
|
|
250
|
+
_sender: msg.sender
|
|
251
|
+
});
|
|
252
|
+
TokenHolderLib.allowHoldersOfProjects({
|
|
253
|
+
holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
|
|
254
|
+
_projectId
|
|
255
|
+
],
|
|
256
|
+
_ownedNFTAddresses: _ownedNFTAddresses,
|
|
257
|
+
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// emit approve event
|
|
261
|
+
emit AllowedHoldersOfProjects(
|
|
262
|
+
_projectId,
|
|
263
|
+
_coreContract,
|
|
264
|
+
_ownedNFTAddresses,
|
|
265
|
+
_ownedNFTProjectIds
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @notice Removes holders of NFTs at addresses `_ownedNFTAddresses`,
|
|
271
|
+
* project IDs `_ownedNFTProjectIds` to mint on project `_projectId`. If
|
|
272
|
+
* other projects owned by a holder are still allowed to mint, holder will
|
|
273
|
+
* maintain ability to purchase.
|
|
274
|
+
* `_ownedNFTAddresses` assumed to be aligned with `_ownedNFTProjectIds`.
|
|
275
|
+
* e.g. Removes holders of project `_ownedNFTProjectIds[0]` on token
|
|
276
|
+
* contract `_ownedNFTAddresses[0]` from mint allowlist of `_projectId`.
|
|
277
|
+
* @param _projectId Project ID to enable minting on.
|
|
278
|
+
* @param _coreContract Core contract address for the given project.
|
|
279
|
+
* @param _ownedNFTAddresses NFT core addresses of projects to be removed
|
|
280
|
+
* from allowlist. Indexes must align with `_ownedNFTProjectIds`.
|
|
281
|
+
* @param _ownedNFTProjectIds Project IDs on `_ownedNFTAddresses` whose
|
|
282
|
+
* holders will be removed from allowlist to mint project `_projectId`.
|
|
283
|
+
* Indexes must align with `_ownedNFTAddresses`.
|
|
284
|
+
*/
|
|
285
|
+
function removeHoldersOfProjects(
|
|
286
|
+
uint256 _projectId,
|
|
287
|
+
address _coreContract,
|
|
288
|
+
address[] memory _ownedNFTAddresses,
|
|
289
|
+
uint256[] memory _ownedNFTProjectIds
|
|
290
|
+
) external {
|
|
291
|
+
AuthLib.onlyArtist({
|
|
292
|
+
_projectId: _projectId,
|
|
293
|
+
_coreContract: _coreContract,
|
|
294
|
+
_sender: msg.sender
|
|
295
|
+
});
|
|
296
|
+
// require same length arrays
|
|
297
|
+
TokenHolderLib.removeHoldersOfProjects({
|
|
298
|
+
holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
|
|
299
|
+
_projectId
|
|
300
|
+
],
|
|
301
|
+
_ownedNFTAddresses: _ownedNFTAddresses,
|
|
302
|
+
_ownedNFTProjectIds: _ownedNFTProjectIds
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
// emit removed event
|
|
306
|
+
emit RemovedHoldersOfProjects(
|
|
307
|
+
_projectId,
|
|
308
|
+
_coreContract,
|
|
309
|
+
_ownedNFTAddresses,
|
|
310
|
+
_ownedNFTProjectIds
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @notice Allows holders of NFTs at addresses `_ownedNFTAddressesAdd`,
|
|
316
|
+
* project IDs `_ownedNFTProjectIdsAdd` to mint on project `_projectId`.
|
|
317
|
+
* Also removes holders of NFTs at addresses `_ownedNFTAddressesRemove`,
|
|
318
|
+
* project IDs `_ownedNFTProjectIdsRemove` from minting on project
|
|
319
|
+
* `_projectId`.
|
|
320
|
+
* `_ownedNFTAddressesAdd` assumed to be aligned with
|
|
321
|
+
* `_ownedNFTProjectIdsAdd`.
|
|
322
|
+
* e.g. Allows holders of project `_ownedNFTProjectIdsAdd[0]` on token
|
|
323
|
+
* contract `_ownedNFTAddressesAdd[0]` to mint `_projectId`.
|
|
324
|
+
* `_ownedNFTAddressesRemove` also assumed to be aligned with
|
|
325
|
+
* `_ownedNFTProjectIdsRemove`.
|
|
326
|
+
* WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
|
|
327
|
+
* due to assumptions about tokenId and projectId relationships.
|
|
328
|
+
* @param _projectId Project ID to enable minting on.
|
|
329
|
+
* @param _coreContract Core contract address for the given project.
|
|
330
|
+
* @param _ownedNFTAddressesAdd NFT core addresses of projects to be
|
|
331
|
+
* allowlisted. Indexes must align with `_ownedNFTProjectIdsAdd`.
|
|
332
|
+
* @param _ownedNFTProjectIdsAdd Project IDs on `_ownedNFTAddressesAdd`
|
|
333
|
+
* whose holders shall be allowlisted to mint project `_projectId`. Indexes
|
|
334
|
+
* must align with `_ownedNFTAddressesAdd`.
|
|
335
|
+
* @param _ownedNFTAddressesRemove NFT core addresses of projects to be
|
|
336
|
+
* removed from allowlist. Indexes must align with
|
|
337
|
+
* `_ownedNFTProjectIdsRemove`.
|
|
338
|
+
* @param _ownedNFTProjectIdsRemove Project IDs on
|
|
339
|
+
* `_ownedNFTAddressesRemove` whose holders will be removed from allowlist
|
|
340
|
+
* to mint project `_projectId`. Indexes must align with
|
|
341
|
+
* `_ownedNFTAddressesRemove`.
|
|
342
|
+
* @dev if a project is included in both add and remove arrays, it will be
|
|
343
|
+
* removed.
|
|
344
|
+
*/
|
|
345
|
+
function allowAndRemoveHoldersOfProjects(
|
|
346
|
+
uint256 _projectId,
|
|
347
|
+
address _coreContract,
|
|
348
|
+
address[] memory _ownedNFTAddressesAdd,
|
|
349
|
+
uint256[] memory _ownedNFTProjectIdsAdd,
|
|
350
|
+
address[] memory _ownedNFTAddressesRemove,
|
|
351
|
+
uint256[] memory _ownedNFTProjectIdsRemove
|
|
352
|
+
) external {
|
|
353
|
+
AuthLib.onlyArtist({
|
|
354
|
+
_projectId: _projectId,
|
|
355
|
+
_coreContract: _coreContract,
|
|
356
|
+
_sender: msg.sender
|
|
357
|
+
});
|
|
358
|
+
TokenHolderLib.allowAndRemoveHoldersOfProjects({
|
|
359
|
+
holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
|
|
360
|
+
_projectId
|
|
361
|
+
],
|
|
362
|
+
_ownedNFTAddressesAdd: _ownedNFTAddressesAdd,
|
|
363
|
+
_ownedNFTProjectIdsAdd: _ownedNFTProjectIdsAdd,
|
|
364
|
+
_ownedNFTAddressesRemove: _ownedNFTAddressesRemove,
|
|
365
|
+
_ownedNFTProjectIdsRemove: _ownedNFTProjectIdsRemove
|
|
366
|
+
});
|
|
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
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* @notice Sets auction details for project `_projectId`.
|
|
385
|
+
* Requires one of the following:
|
|
386
|
+
* - The auction is unconfigured
|
|
387
|
+
* - The auction has not yet started
|
|
388
|
+
* - The minter-local max invocations have been reached
|
|
389
|
+
* @dev Note that allowing the artist to set auction details after reaching
|
|
390
|
+
* max invocations effectively grants the artist the ability to set a new
|
|
391
|
+
* auction at any point, since minter-local max invocations can be set by
|
|
392
|
+
* the artist.
|
|
393
|
+
* @param _projectId Project ID to set auction details for.
|
|
394
|
+
* @param _coreContract Core contract address for the given project.
|
|
395
|
+
* @param _auctionTimestampStart Timestamp at which to start the auction.
|
|
396
|
+
* @param _priceDecayHalfLifeSeconds The half life with which to decay the
|
|
397
|
+
* price (in seconds).
|
|
398
|
+
* @param _startPrice Price at which to start the auction, in Wei.
|
|
399
|
+
* @param _basePrice Resting price of the auction, in Wei.
|
|
400
|
+
* @dev Note that it is intentionally supported here that the configured
|
|
401
|
+
* price may be explicitly set to `0`.
|
|
402
|
+
*/
|
|
403
|
+
function setAuctionDetails(
|
|
404
|
+
uint256 _projectId,
|
|
405
|
+
address _coreContract,
|
|
406
|
+
uint40 _auctionTimestampStart,
|
|
407
|
+
uint40 _priceDecayHalfLifeSeconds,
|
|
408
|
+
uint256 _startPrice,
|
|
409
|
+
uint256 _basePrice
|
|
410
|
+
) external {
|
|
411
|
+
AuthLib.onlyArtist({
|
|
412
|
+
_projectId: _projectId,
|
|
413
|
+
_coreContract: _coreContract,
|
|
414
|
+
_sender: msg.sender
|
|
415
|
+
});
|
|
416
|
+
// 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
|
+
require(
|
|
427
|
+
(_priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
|
|
428
|
+
"Price decay half life must be greater than min allowable value"
|
|
429
|
+
);
|
|
430
|
+
|
|
431
|
+
// EFFECTS
|
|
432
|
+
bool maxHasBeenInvoked = MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
433
|
+
_maxInvocationsProjectConfig
|
|
434
|
+
);
|
|
435
|
+
DAExpLib.setAuctionDetailsExp({
|
|
436
|
+
_DAProjectConfig: _auctionProjectConfig,
|
|
437
|
+
_auctionTimestampStart: _auctionTimestampStart,
|
|
438
|
+
_priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
|
|
439
|
+
_startPrice: _startPrice.toUint88(),
|
|
440
|
+
_basePrice: _basePrice.toUint88(),
|
|
441
|
+
_allowReconfigureAfterStart: maxHasBeenInvoked
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
emit SetAuctionDetailsExp({
|
|
445
|
+
_projectId: _projectId,
|
|
446
|
+
_coreContract: _coreContract,
|
|
447
|
+
_auctionTimestampStart: _auctionTimestampStart,
|
|
448
|
+
_priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
|
|
449
|
+
_startPrice: _startPrice,
|
|
450
|
+
_basePrice: _basePrice
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
// sync local max invocations if not initially populated
|
|
454
|
+
// @dev if local max invocations and maxHasBeenInvoked are both
|
|
455
|
+
// initial values, we know they have not been populated.
|
|
456
|
+
if (
|
|
457
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured(
|
|
458
|
+
_maxInvocationsProjectConfig
|
|
459
|
+
)
|
|
460
|
+
) {
|
|
461
|
+
syncProjectMaxInvocationsToCore(_projectId, _coreContract);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* @notice Sets the minimum and maximum values that are settable for
|
|
467
|
+
* `_priceDecayHalfLifeSeconds` across all projects.
|
|
468
|
+
* @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
|
|
469
|
+
* (in seconds).
|
|
470
|
+
*/
|
|
471
|
+
function setMinimumPriceDecayHalfLifeSeconds(
|
|
472
|
+
uint256 _minimumPriceDecayHalfLifeSeconds
|
|
473
|
+
) external {
|
|
474
|
+
AuthLib.onlyMinterFilterAdminACL({
|
|
475
|
+
_minterFilterAddress: minterFilterAddress,
|
|
476
|
+
_sender: msg.sender,
|
|
477
|
+
_contract: address(this),
|
|
478
|
+
_selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
|
|
479
|
+
});
|
|
480
|
+
require(
|
|
481
|
+
_minimumPriceDecayHalfLifeSeconds > 0,
|
|
482
|
+
"Half life of zero not allowed"
|
|
483
|
+
);
|
|
484
|
+
minimumPriceDecayHalfLifeSeconds = _minimumPriceDecayHalfLifeSeconds;
|
|
485
|
+
|
|
486
|
+
emit AuctionMinHalfLifeSecondsUpdated(
|
|
487
|
+
_minimumPriceDecayHalfLifeSeconds
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @notice Resets auction details for project `_projectId`, zero-ing out all
|
|
493
|
+
* relevant auction fields. Not intended to be used in normal auction
|
|
494
|
+
* operation, but rather only in case of the need to halt an auction.
|
|
495
|
+
* @param _projectId Project ID to set auction details for.
|
|
496
|
+
* @param _coreContract Core contract address for the given project.
|
|
497
|
+
*/
|
|
498
|
+
function resetAuctionDetails(
|
|
499
|
+
uint256 _projectId,
|
|
500
|
+
address _coreContract
|
|
501
|
+
) external {
|
|
502
|
+
AuthLib.onlyCoreAdminACL({
|
|
503
|
+
_coreContract: _coreContract,
|
|
504
|
+
_sender: msg.sender,
|
|
505
|
+
_contract: address(this),
|
|
506
|
+
_selector: this.resetAuctionDetails.selector
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
delete _auctionProjectConfigMapping[_coreContract][_projectId];
|
|
510
|
+
|
|
511
|
+
emit ResetAuctionDetails(_projectId, _coreContract);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @notice Purchases a token from project `_projectId`.
|
|
516
|
+
* Note: Collectors should not send excessive value with their purchase
|
|
517
|
+
* transaction, because the artist has the ability to change the auction
|
|
518
|
+
* details at any time, including the price.
|
|
519
|
+
* @param _projectId Project ID to mint a token on.
|
|
520
|
+
* @param _coreContract Core contract address for the given project.
|
|
521
|
+
* @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
522
|
+
* msg.sender being used to claim right to purchase.
|
|
523
|
+
* @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
524
|
+
* to claim right to purchase.
|
|
525
|
+
* @return tokenId Token ID of minted token
|
|
526
|
+
*/
|
|
527
|
+
function purchase(
|
|
528
|
+
uint256 _projectId,
|
|
529
|
+
address _coreContract,
|
|
530
|
+
address _ownedNFTAddress,
|
|
531
|
+
uint256 _ownedNFTTokenId
|
|
532
|
+
) external payable returns (uint256 tokenId) {
|
|
533
|
+
tokenId = purchaseTo({
|
|
534
|
+
_to: msg.sender,
|
|
535
|
+
_projectId: _projectId,
|
|
536
|
+
_coreContract: _coreContract,
|
|
537
|
+
_ownedNFTAddress: _ownedNFTAddress,
|
|
538
|
+
_ownedNFTTokenId: _ownedNFTTokenId,
|
|
539
|
+
_vault: address(0)
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
return tokenId;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* @notice Purchases a token from project `_projectId` and sets
|
|
547
|
+
* the token's owner to `_to`.
|
|
548
|
+
* Note: Collectors should not send excessive value with their purchase
|
|
549
|
+
* transaction, because the artist has the ability to change the auction
|
|
550
|
+
* details at any time, including the price.
|
|
551
|
+
* @param _to Address to be the new token's owner.
|
|
552
|
+
* @param _projectId Project ID to mint a token on.
|
|
553
|
+
* @param _coreContract Core contract address for the given project.
|
|
554
|
+
* @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
555
|
+
* msg.sender being used to claim right to purchase.
|
|
556
|
+
* @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
557
|
+
* to claim right to purchase.
|
|
558
|
+
* @return tokenId Token ID of minted token
|
|
559
|
+
*/
|
|
560
|
+
function purchaseTo(
|
|
561
|
+
address _to,
|
|
562
|
+
uint256 _projectId,
|
|
563
|
+
address _coreContract,
|
|
564
|
+
address _ownedNFTAddress,
|
|
565
|
+
uint256 _ownedNFTTokenId
|
|
566
|
+
) external payable returns (uint256 tokenId) {
|
|
567
|
+
return
|
|
568
|
+
purchaseTo({
|
|
569
|
+
_to: _to,
|
|
570
|
+
_projectId: _projectId,
|
|
571
|
+
_coreContract: _coreContract,
|
|
572
|
+
_ownedNFTAddress: _ownedNFTAddress,
|
|
573
|
+
_ownedNFTTokenId: _ownedNFTTokenId,
|
|
574
|
+
_vault: address(0)
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// public getter functions
|
|
579
|
+
/**
|
|
580
|
+
* @notice Gets the maximum invocations project configuration.
|
|
581
|
+
* @param _projectId The ID of the project whose data needs to be fetched.
|
|
582
|
+
* @param _coreContract The address of the core contract.
|
|
583
|
+
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
584
|
+
* configuration data.
|
|
585
|
+
*/
|
|
586
|
+
function maxInvocationsProjectConfig(
|
|
587
|
+
uint256 _projectId,
|
|
588
|
+
address _coreContract
|
|
589
|
+
)
|
|
590
|
+
external
|
|
591
|
+
view
|
|
592
|
+
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
593
|
+
{
|
|
594
|
+
return _maxInvocationsProjectConfigMapping[_coreContract][_projectId];
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @notice Retrieves the auction parameters for a specific project.
|
|
599
|
+
* @param _projectId The unique identifier for the project.
|
|
600
|
+
* @param _coreContract The address of the core contract for the project.
|
|
601
|
+
* @return timestampStart The start timestamp for the auction.
|
|
602
|
+
* @return priceDecayHalfLifeSeconds The half-life for the price decay
|
|
603
|
+
* during the auction, in seconds.
|
|
604
|
+
* @return startPrice The starting price of the auction.
|
|
605
|
+
* @return basePrice The base price of the auction.
|
|
606
|
+
*/
|
|
607
|
+
function projectAuctionParameters(
|
|
608
|
+
uint256 _projectId,
|
|
609
|
+
address _coreContract
|
|
610
|
+
)
|
|
611
|
+
external
|
|
612
|
+
view
|
|
613
|
+
returns (
|
|
614
|
+
uint40 timestampStart,
|
|
615
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
616
|
+
uint256 startPrice,
|
|
617
|
+
uint256 basePrice
|
|
618
|
+
)
|
|
619
|
+
{
|
|
620
|
+
DAExpLib.DAProjectConfig
|
|
621
|
+
storage _auctionProjectConfig = _auctionProjectConfigMapping[
|
|
622
|
+
_coreContract
|
|
623
|
+
][_projectId];
|
|
624
|
+
timestampStart = _auctionProjectConfig.timestampStart;
|
|
625
|
+
priceDecayHalfLifeSeconds = _auctionProjectConfig
|
|
626
|
+
.priceDecayHalfLifeSeconds;
|
|
627
|
+
startPrice = _auctionProjectConfig.startPrice;
|
|
628
|
+
basePrice = _auctionProjectConfig.basePrice;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* @notice Checks if the specified `_coreContract` is a valid engine contract.
|
|
633
|
+
* @dev This function retrieves the cached value of `_coreContract` from
|
|
634
|
+
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
635
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngine`
|
|
636
|
+
* function from the `SplitFundsLib` library to check if `_coreContract`
|
|
637
|
+
* is a valid engine contract.
|
|
638
|
+
* @dev This function will revert if the provided `_coreContract` is not
|
|
639
|
+
* a valid Engine or V3 Flagship contract.
|
|
640
|
+
* @param _coreContract The address of the contract to check.
|
|
641
|
+
* @return bool indicating if `_coreContract` is a valid engine contract.
|
|
642
|
+
*/
|
|
643
|
+
function isEngineView(address _coreContract) external view returns (bool) {
|
|
644
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = _isEngineCaches[
|
|
645
|
+
_coreContract
|
|
646
|
+
];
|
|
647
|
+
if (isEngineCache.isCached) {
|
|
648
|
+
return isEngineCache.isEngine;
|
|
649
|
+
} else {
|
|
650
|
+
// @dev this calls the non-modifying variant of getV3CoreIsEngine
|
|
651
|
+
return SplitFundsLib.getV3CoreIsEngineView(_coreContract);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* @notice projectId => has project reached its maximum number of
|
|
657
|
+
* invocations? Note that this returns a local cache of the core contract's
|
|
658
|
+
* state, and may be out of sync with the core contract. This is
|
|
659
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
660
|
+
* project's maximum invocations has been reached. A false negative will
|
|
661
|
+
* only result in a gas cost increase, since the core contract will still
|
|
662
|
+
* enforce a maxInvocation check during minting. A false positive is not
|
|
663
|
+
* possible because the V3 core contract only allows maximum invocations
|
|
664
|
+
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
665
|
+
* do not do input validation in this method as to whether or not the input
|
|
666
|
+
* @param _projectId is an existing project ID.
|
|
667
|
+
* @param _coreContract is an existing core contract address.
|
|
668
|
+
*/
|
|
669
|
+
function projectMaxHasBeenInvoked(
|
|
670
|
+
uint256 _projectId,
|
|
671
|
+
address _coreContract
|
|
672
|
+
) external view returns (bool) {
|
|
673
|
+
return
|
|
674
|
+
MaxInvocationsLib.getMaxHasBeenInvoked(
|
|
675
|
+
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @notice projectId => project's maximum number of invocations.
|
|
681
|
+
* Optionally synced with core contract value, for gas optimization.
|
|
682
|
+
* Note that this returns a local cache of the core contract's
|
|
683
|
+
* state, and may be out of sync with the core contract. This is
|
|
684
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
685
|
+
* project's maximum invocations has been reached.
|
|
686
|
+
* @dev A number greater than the core contract's project max invocations
|
|
687
|
+
* will only result in a gas cost increase, since the core contract will
|
|
688
|
+
* still enforce a maxInvocation check during minting. A number less than
|
|
689
|
+
* the core contract's project max invocations is only possible when the
|
|
690
|
+
* project's max invocations have not been synced on this minter, since the
|
|
691
|
+
* V3 core contract only allows maximum invocations to be reduced, not
|
|
692
|
+
* increased. When this happens, the minter will enable minting, allowing
|
|
693
|
+
* the core contract to enforce the max invocations check. Based on this
|
|
694
|
+
* rationale, we intentionally do not do input validation in this method as
|
|
695
|
+
* to whether or not the input `_projectId` is an existing project ID.
|
|
696
|
+
* @param _projectId is an existing project ID.
|
|
697
|
+
* @param _coreContract is an existing core contract address.
|
|
698
|
+
*/
|
|
699
|
+
function projectMaxInvocations(
|
|
700
|
+
uint256 _projectId,
|
|
701
|
+
address _coreContract
|
|
702
|
+
) external view returns (uint256) {
|
|
703
|
+
return
|
|
704
|
+
MaxInvocationsLib.getMaxInvocations(
|
|
705
|
+
_maxInvocationsProjectConfigMapping[_coreContract][_projectId]
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* @notice Gets if price of token is configured, price of minting a
|
|
711
|
+
* token on project `_projectId`, and currency symbol and address to be
|
|
712
|
+
* used as payment. Supersedes any core contract price information.
|
|
713
|
+
* @param _projectId Project ID to get price information for
|
|
714
|
+
* @param _coreContract Contract address of the core contract
|
|
715
|
+
* @return isConfigured true only if token price has been configured on
|
|
716
|
+
* this minter
|
|
717
|
+
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
718
|
+
* if price has not yet been configured
|
|
719
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
720
|
+
* minter. This minter always returns "ETH"
|
|
721
|
+
* @return currencyAddress currency address for purchases of project on
|
|
722
|
+
* this minter. This minter always returns null address, reserved for ether
|
|
723
|
+
*/
|
|
724
|
+
function getPriceInfo(
|
|
725
|
+
uint256 _projectId,
|
|
726
|
+
address _coreContract
|
|
727
|
+
)
|
|
728
|
+
external
|
|
729
|
+
view
|
|
730
|
+
returns (
|
|
731
|
+
bool isConfigured,
|
|
732
|
+
uint256 tokenPriceInWei,
|
|
733
|
+
string memory currencySymbol,
|
|
734
|
+
address currencyAddress
|
|
735
|
+
)
|
|
736
|
+
{
|
|
737
|
+
DAExpLib.DAProjectConfig
|
|
738
|
+
storage auctionProjectConfig = _auctionProjectConfigMapping[
|
|
739
|
+
_coreContract
|
|
740
|
+
][_projectId];
|
|
741
|
+
isConfigured = (auctionProjectConfig.startPrice > 0);
|
|
742
|
+
if (!isConfigured) {
|
|
743
|
+
// In the case of unconfigured auction, return price of zero when
|
|
744
|
+
// getPriceExp would otherwise revert
|
|
745
|
+
tokenPriceInWei = 0;
|
|
746
|
+
} else if (block.timestamp <= auctionProjectConfig.timestampStart) {
|
|
747
|
+
// Provide a reasonable value for `tokenPriceInWei` when
|
|
748
|
+
// getPriceExp would otherwise revert, using the starting price
|
|
749
|
+
// before auction starts.
|
|
750
|
+
tokenPriceInWei = auctionProjectConfig.startPrice;
|
|
751
|
+
} else {
|
|
752
|
+
tokenPriceInWei = DAExpLib.getPriceExp(auctionProjectConfig);
|
|
753
|
+
}
|
|
754
|
+
currencySymbol = "ETH";
|
|
755
|
+
currencyAddress = address(0);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* @notice Checks if a specific NFT owner is allowed in a given project.
|
|
760
|
+
* @dev This function retrieves the allowance status of an NFT owner
|
|
761
|
+
* within a specific project from the allowedProjectHoldersMapping.
|
|
762
|
+
* @param _projectId The ID of the project to check.
|
|
763
|
+
* @param _coreContract Core contract address for the given project.
|
|
764
|
+
* @param _ownedNFTAddress The address of the owned NFT contract.
|
|
765
|
+
* @param _ownedNFTProjectId The ID of the owned NFT project.
|
|
766
|
+
* @return bool True if the NFT owner is allowed in the given project, False otherwise.
|
|
767
|
+
*/
|
|
768
|
+
function allowedProjectHolders(
|
|
769
|
+
uint256 _projectId,
|
|
770
|
+
address _coreContract,
|
|
771
|
+
address _ownedNFTAddress,
|
|
772
|
+
uint256 _ownedNFTProjectId
|
|
773
|
+
) external view returns (bool) {
|
|
774
|
+
return
|
|
775
|
+
_allowedProjectHoldersMapping[_coreContract][_projectId]
|
|
776
|
+
.allowedProjectHolders[_ownedNFTAddress][_ownedNFTProjectId];
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* @notice Returns if token is an allowlisted NFT for project `_projectId`.
|
|
781
|
+
* @param _projectId Project ID to be checked.
|
|
782
|
+
* @param _coreContract Core contract address for the given project.
|
|
783
|
+
* @param _ownedNFTAddress ERC-721 NFT token address to be checked.
|
|
784
|
+
* @param _ownedNFTTokenId ERC-721 NFT token ID to be checked.
|
|
785
|
+
* @return bool Token is allowlisted
|
|
786
|
+
* @dev does not check if token has been used to purchase
|
|
787
|
+
* @dev assumes project ID can be derived from tokenId / 1_000_000
|
|
788
|
+
*/
|
|
789
|
+
function isAllowlistedNFT(
|
|
790
|
+
uint256 _projectId,
|
|
791
|
+
address _coreContract,
|
|
792
|
+
address _ownedNFTAddress,
|
|
793
|
+
uint256 _ownedNFTTokenId
|
|
794
|
+
) external view returns (bool) {
|
|
795
|
+
return
|
|
796
|
+
TokenHolderLib.isAllowlistedNFT({
|
|
797
|
+
holderProjectConfig: _allowedProjectHoldersMapping[
|
|
798
|
+
_coreContract
|
|
799
|
+
][_projectId],
|
|
800
|
+
_ownedNFTAddress: _ownedNFTAddress,
|
|
801
|
+
_ownedNFTTokenId: _ownedNFTTokenId
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* @notice Syncs local maximum invocations of project `_projectId` based on
|
|
807
|
+
* the value currently defined in the core contract.
|
|
808
|
+
* @param _projectId Project ID to set the maximum invocations for.
|
|
809
|
+
* @param _coreContract Core contract address for the given project.
|
|
810
|
+
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
811
|
+
* core contracts shall still enforce a maxInvocation check during mint.
|
|
812
|
+
*/
|
|
813
|
+
function syncProjectMaxInvocationsToCore(
|
|
814
|
+
uint256 _projectId,
|
|
815
|
+
address _coreContract
|
|
816
|
+
) public {
|
|
817
|
+
AuthLib.onlyArtist({
|
|
818
|
+
_projectId: _projectId,
|
|
819
|
+
_coreContract: _coreContract,
|
|
820
|
+
_sender: msg.sender
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
uint256 maxInvocations = MaxInvocationsLib
|
|
824
|
+
.syncProjectMaxInvocationsToCore({
|
|
825
|
+
_projectId: _projectId,
|
|
826
|
+
_coreContract: _coreContract,
|
|
827
|
+
maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
|
|
828
|
+
_coreContract
|
|
829
|
+
][_projectId]
|
|
830
|
+
});
|
|
831
|
+
emit ProjectMaxInvocationsLimitUpdated(
|
|
832
|
+
_projectId,
|
|
833
|
+
_coreContract,
|
|
834
|
+
maxInvocations
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @notice Purchases a token from project `_projectId` and sets
|
|
840
|
+
* the token's owner to `_to`.
|
|
841
|
+
* Note: Collectors should not send excessive value with their purchase
|
|
842
|
+
* transaction, because the artist has the ability to change the auction
|
|
843
|
+
* details at any time, including the price.
|
|
844
|
+
* @param _to Address to be the new token's owner.
|
|
845
|
+
* @param _projectId Project ID to mint a token on.
|
|
846
|
+
* @param _coreContract Core contract address for the given project.
|
|
847
|
+
* @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
|
|
848
|
+
* msg.sender being used to claim right to purchase.
|
|
849
|
+
* @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
|
|
850
|
+
* to claim right to purchase.
|
|
851
|
+
* @return tokenId Token ID of minted token
|
|
852
|
+
*/
|
|
853
|
+
function purchaseTo(
|
|
854
|
+
address _to,
|
|
855
|
+
uint256 _projectId,
|
|
856
|
+
address _coreContract,
|
|
857
|
+
address _ownedNFTAddress,
|
|
858
|
+
uint256 _ownedNFTTokenId,
|
|
859
|
+
address _vault
|
|
860
|
+
) public payable nonReentrant returns (uint256 tokenId) {
|
|
861
|
+
// CHECKS
|
|
862
|
+
MaxInvocationsLib.MaxInvocationsProjectConfig
|
|
863
|
+
storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
|
|
864
|
+
_coreContract
|
|
865
|
+
][_projectId];
|
|
866
|
+
|
|
867
|
+
DAExpLib.DAProjectConfig
|
|
868
|
+
storage _auctionProjectConfig = _auctionProjectConfigMapping[
|
|
869
|
+
_coreContract
|
|
870
|
+
][_projectId];
|
|
871
|
+
|
|
872
|
+
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
873
|
+
// consumption after a project has been fully minted.
|
|
874
|
+
// `_maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
875
|
+
// gas consumption, but if not in sync with the core contract's value,
|
|
876
|
+
// the core contract also enforces its own max invocation check during
|
|
877
|
+
// minting.
|
|
878
|
+
require(
|
|
879
|
+
!_maxInvocationsProjectConfig.maxHasBeenInvoked,
|
|
880
|
+
"Max invocations reached"
|
|
881
|
+
);
|
|
882
|
+
|
|
883
|
+
// getPriceExp reverts if auction is unconfigured or has not started
|
|
884
|
+
uint256 pricePerTokenInWei = DAExpLib.getPriceExp(
|
|
885
|
+
_auctionProjectConfig
|
|
886
|
+
);
|
|
887
|
+
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
888
|
+
|
|
889
|
+
// require token used to claim to be in set of allowlisted NFTs
|
|
890
|
+
require(
|
|
891
|
+
TokenHolderLib.isAllowlistedNFT({
|
|
892
|
+
holderProjectConfig: _allowedProjectHoldersMapping[
|
|
893
|
+
_coreContract
|
|
894
|
+
][_projectId],
|
|
895
|
+
_ownedNFTAddress: _ownedNFTAddress,
|
|
896
|
+
_ownedNFTTokenId: _ownedNFTTokenId
|
|
897
|
+
}),
|
|
898
|
+
"Only allowlisted NFTs"
|
|
899
|
+
);
|
|
900
|
+
|
|
901
|
+
// NOTE: delegate-vault handling **begins here**.
|
|
902
|
+
|
|
903
|
+
// handle that the vault may be either the `msg.sender` in the case
|
|
904
|
+
// that there is not a true vault, or may be `_vault` if one is
|
|
905
|
+
// provided explicitly (and it is valid).
|
|
906
|
+
address vault = msg.sender;
|
|
907
|
+
if (_vault != address(0)) {
|
|
908
|
+
// If a vault is provided, it must be valid, otherwise throw rather
|
|
909
|
+
// than optimistically-minting with original `msg.sender`.
|
|
910
|
+
// Note, we do not check `checkDelegateForAll` or `checkDelegateForContract` as well,
|
|
911
|
+
// as they are known to be implicitly checked by calling `checkDelegateForToken`.
|
|
912
|
+
bool isValidVault = delegationRegistryContract
|
|
913
|
+
.checkDelegateForToken({
|
|
914
|
+
delegate: msg.sender,
|
|
915
|
+
vault: _vault,
|
|
916
|
+
contract_: _coreContract,
|
|
917
|
+
tokenId: _ownedNFTTokenId
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
require(isValidVault, "Invalid delegate-vault pairing");
|
|
921
|
+
vault = _vault;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
// EFFECTS
|
|
925
|
+
tokenId = minterFilter.mint_joo({
|
|
926
|
+
_to: _to,
|
|
927
|
+
_projectId: _projectId,
|
|
928
|
+
_coreContract: _coreContract,
|
|
929
|
+
_sender: vault
|
|
930
|
+
});
|
|
931
|
+
|
|
932
|
+
// NOTE: delegate-vault handling **ends here**.
|
|
933
|
+
|
|
934
|
+
MaxInvocationsLib.validatePurchaseEffectsInvocations(
|
|
935
|
+
tokenId,
|
|
936
|
+
_maxInvocationsProjectConfig
|
|
937
|
+
);
|
|
938
|
+
|
|
939
|
+
// INTERACTIONS
|
|
940
|
+
// require vault to own NFT used to redeem
|
|
941
|
+
/**
|
|
942
|
+
* @dev Considered an interaction because calling ownerOf on an NFT
|
|
943
|
+
* contract. Plan is to only integrate with AB/PBAB NFTs on the minter, but
|
|
944
|
+
* in case other NFTs are registered, better to check here. Also,
|
|
945
|
+
* function is non-reentrant, so this is extra cautious.
|
|
946
|
+
*/
|
|
947
|
+
TokenHolderLib.validateNFTOwnership({
|
|
948
|
+
_ownedNFTAddress: _ownedNFTAddress,
|
|
949
|
+
_ownedNFTTokenId: _ownedNFTTokenId,
|
|
950
|
+
_targetOwner: vault
|
|
951
|
+
});
|
|
952
|
+
|
|
953
|
+
bool isEngine = SplitFundsLib.isEngine(
|
|
954
|
+
_coreContract,
|
|
955
|
+
_isEngineCaches[_coreContract]
|
|
956
|
+
);
|
|
957
|
+
SplitFundsLib.splitFundsETH({
|
|
958
|
+
_projectId: _projectId,
|
|
959
|
+
_pricePerTokenInWei: pricePerTokenInWei,
|
|
960
|
+
_coreContract: _coreContract,
|
|
961
|
+
_isEngine: isEngine
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
return tokenId;
|
|
965
|
+
}
|
|
966
|
+
}
|