@artblocks/contracts 1.0.3 → 1.1.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 +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 +212 -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 -11
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +6 -11
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +6 -11
- 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 -11
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
- 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 +7 -7
- 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 +22 -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 +104 -19
- 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 +114 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +50 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +128 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +97 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +29 -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 +117 -0
- package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +52 -36
- 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 +67 -0
- 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 +67 -0
- 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 +36 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +37 -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 +261 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +55 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +48 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +42 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +86 -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 +96 -40
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +662 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -20
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +619 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +418 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +662 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV4.sol/MinterDALinV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +418 -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 +659 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +452 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +600 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +633 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +782 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +676 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +356 -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 +6 -11
- 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/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/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 +58 -42
- 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 +300 -123
- 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/archive/readme.md +16 -0
- package/contracts/engine/README.md +21 -0
- 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 +31 -22
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +31 -22
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +12 -18
- package/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol +1 -1
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +23 -24
- 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 +58 -65
- 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}/ICoreRegistryV1.sol +6 -8
- package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol +5 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol +23 -0
- package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol +45 -19
- package/contracts/interfaces/v0.8.x/IRandomizer_V3CoreBase.sol +23 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +28 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +12 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +12 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +13 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +41 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +34 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +15 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +28 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +43 -0
- package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +123 -0
- 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 +196 -0
- package/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol +5 -5
- package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +250 -0
- package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
- package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +216 -0
- package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
- package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +488 -0
- package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +384 -0
- package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +240 -0
- package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +995 -0
- package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +166 -0
- package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +770 -0
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +741 -0
- package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +291 -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 +414 -297
- package/contracts/minter-suite/Minters/MinterBase_v0_1_1.sol +4 -4
- package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +866 -0
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +4 -57
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +886 -0
- package/contracts/minter-suite/Minters/MinterDAExpV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterDAExpV5.sol +545 -0
- package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +857 -0
- package/contracts/minter-suite/Minters/MinterDALinV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterDALinV5.sol +534 -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 +853 -0
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol +5 -5
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +545 -0
- package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +730 -0
- package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +714 -0
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +1012 -0
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +868 -0
- package/contracts/minter-suite/Minters/MinterSetPriceV4.sol +3 -3
- package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +414 -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 +11 -18
- 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/ReentrancyHolderMockShared.sol +59 -0
- package/contracts/mock/ReentrancyMerkleMock.sol +1 -1
- package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
- package/contracts/mock/ReentrancyMock.sol +1 -1
- package/contracts/mock/ReentrancyMockShared.sol +48 -0
- package/contracts/mock/ReentrancySEAMock.sol +1 -1
- package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
- 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 +134 -111
- package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +2 -2
- package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +2 -2
- package/package.json +57 -36
- package/LICENSE +0 -165
- package/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol +0 -10
- package/contracts/interfaces/0.8.x/ISharedRandomizerV0.sol +0 -105
- /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}/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}/ERC721_PackedHashSeed.sol +0 -0
- /package/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
2
|
// Created By: Art Blocks Inc.
|
|
3
3
|
|
|
4
|
-
import "../../interfaces/
|
|
5
|
-
import "../../interfaces/
|
|
6
|
-
import "../../interfaces/
|
|
4
|
+
import "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
5
|
+
import "../../interfaces/v0.8.x/IMinterFilterV0.sol";
|
|
6
|
+
import "../../interfaces/v0.8.x/IFilteredMinterDAExpV1.sol";
|
|
7
7
|
import "./MinterBase_v0_1_1.sol";
|
|
8
8
|
|
|
9
9
|
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
// @dev fixed to specific solidity version for clarity and for more clear
|
|
5
|
+
// source code verification purposes.
|
|
6
|
+
pragma solidity 0.8.19;
|
|
7
|
+
|
|
8
|
+
import {ISharedMinterSimplePurchaseV0} from "../../interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.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 {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
13
|
+
|
|
14
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
15
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
16
|
+
import {DAExpLib} from "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
|
|
17
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
18
|
+
|
|
19
|
+
import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
|
|
20
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
24
|
+
* ETH. Pricing is achieved using an automated, exponential Dutch-auction mechanism.
|
|
25
|
+
* This is designed to be used with GenArt721CoreContractV3 flagship or
|
|
26
|
+
* engine contracts.
|
|
27
|
+
* @author Art Blocks Inc.
|
|
28
|
+
* @notice Privileged Roles and Ownership:
|
|
29
|
+
* This contract is designed to be managed, with limited powers.
|
|
30
|
+
* Privileged roles and abilities are controlled by the project's artist, which
|
|
31
|
+
* can be modified by the core contract's Admin ACL contract. Both of these
|
|
32
|
+
* roles hold extensive power and can modify minter details.
|
|
33
|
+
* Care must be taken to ensure that the admin ACL contract and artist
|
|
34
|
+
* addresses are secure behind a multi-sig or other access control mechanism.
|
|
35
|
+
* ----------------------------------------------------------------------------
|
|
36
|
+
* The following functions are restricted to the minter filter's Admin ACL
|
|
37
|
+
* contract:
|
|
38
|
+
* - setMinimumPriceDecayHalfLifeSeconds
|
|
39
|
+
* ----------------------------------------------------------------------------
|
|
40
|
+
* The following functions are restricted to the core contract's Admin ACL
|
|
41
|
+
* contract:
|
|
42
|
+
* - resetAuctionDetails (note: this will prevent minting until a new auction
|
|
43
|
+
* is created)
|
|
44
|
+
* ----------------------------------------------------------------------------
|
|
45
|
+
* The following functions are restricted to a project's artist:
|
|
46
|
+
* - setAuctionDetails (note: this may only be called when there is no active
|
|
47
|
+
* auction)
|
|
48
|
+
* - syncProjectMaxInvocationsToCore
|
|
49
|
+
* - manuallyLimitProjectMaxInvocations
|
|
50
|
+
* ----------------------------------------------------------------------------
|
|
51
|
+
* Additional admin and artist privileged roles may be described on other
|
|
52
|
+
* contracts that this minter integrates with.
|
|
53
|
+
* ----------------------------------------------------------------------------
|
|
54
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
55
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
56
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
57
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
58
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
59
|
+
* checks performed by this minter's Minter Filter.
|
|
60
|
+
*
|
|
61
|
+
* @dev Note that while this minter makes use of `block.timestamp` and it is
|
|
62
|
+
* technically possible that this value is manipulated by block producers, such
|
|
63
|
+
* manipulation will not have material impact on the price values of this minter
|
|
64
|
+
* given the business practices for how pricing is congfigured for this minter
|
|
65
|
+
* and that variations on the order of less than a minute should not
|
|
66
|
+
* meaningfully impact price given the minimum allowable price decay rate that
|
|
67
|
+
* this minter intends to support.
|
|
68
|
+
*/
|
|
69
|
+
contract MinterDAExpV5 is
|
|
70
|
+
ReentrancyGuard,
|
|
71
|
+
ISharedMinterSimplePurchaseV0,
|
|
72
|
+
ISharedMinterV0,
|
|
73
|
+
ISharedMinterDAV0,
|
|
74
|
+
ISharedMinterDAExpV0
|
|
75
|
+
{
|
|
76
|
+
using SafeCast for uint256;
|
|
77
|
+
/// Minter filter address this minter interacts with
|
|
78
|
+
address public immutable minterFilterAddress;
|
|
79
|
+
|
|
80
|
+
/// Minter filter this minter may interact with.
|
|
81
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
82
|
+
|
|
83
|
+
/// minterType for this minter
|
|
84
|
+
string public constant minterType = "MinterDAExpV5";
|
|
85
|
+
|
|
86
|
+
/// minter version for this minter
|
|
87
|
+
string public constant minterVersion = "v5.0.0";
|
|
88
|
+
|
|
89
|
+
uint256 constant ONE_MILLION = 1_000_000;
|
|
90
|
+
//// Minimum price decay half life: price must decay with a half life of at
|
|
91
|
+
/// least this amount (must cut in half at least every N seconds).
|
|
92
|
+
uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @notice Initializes contract to be a Filtered Minter for
|
|
96
|
+
* `minterFilter` minter filter.
|
|
97
|
+
* @param minterFilter Minter filter for which this will be a
|
|
98
|
+
* filtered minter.
|
|
99
|
+
*/
|
|
100
|
+
constructor(address minterFilter) ReentrancyGuard() {
|
|
101
|
+
minterFilterAddress = minterFilter;
|
|
102
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
103
|
+
emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
|
|
104
|
+
minimumPriceDecayHalfLifeSeconds
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
110
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
111
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
112
|
+
* set on the core contract.
|
|
113
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
114
|
+
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
115
|
+
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
116
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
117
|
+
* @param coreContract Core contract address for the given project.
|
|
118
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
119
|
+
*/
|
|
120
|
+
function manuallyLimitProjectMaxInvocations(
|
|
121
|
+
uint256 projectId,
|
|
122
|
+
address coreContract,
|
|
123
|
+
uint24 maxInvocations
|
|
124
|
+
) external {
|
|
125
|
+
AuthLib.onlyArtist({
|
|
126
|
+
projectId: projectId,
|
|
127
|
+
coreContract: coreContract,
|
|
128
|
+
sender: msg.sender
|
|
129
|
+
});
|
|
130
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
131
|
+
projectId: projectId,
|
|
132
|
+
coreContract: coreContract,
|
|
133
|
+
maxInvocations: maxInvocations
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @notice Sets auction details for project `projectId`.
|
|
139
|
+
* Requires one of the following:
|
|
140
|
+
* - The auction is unconfigured
|
|
141
|
+
* - The auction has not yet started
|
|
142
|
+
* - The minter-local max invocations have been reached
|
|
143
|
+
* @dev Note that allowing the artist to set auction details after reaching
|
|
144
|
+
* max invocations effectively grants the artist the ability to set a new
|
|
145
|
+
* auction at any point, since minter-local max invocations can be set by
|
|
146
|
+
* the artist.
|
|
147
|
+
* @param projectId Project ID to set auction details for.
|
|
148
|
+
* @param coreContract Core contract address for the given project.
|
|
149
|
+
* @param auctionTimestampStart Timestamp at which to start the auction.
|
|
150
|
+
* @param priceDecayHalfLifeSeconds The half life with which to decay the
|
|
151
|
+
* price (in seconds).
|
|
152
|
+
* @param startPrice Price at which to start the auction, in Wei.
|
|
153
|
+
* @param basePrice Resting price of the auction, in Wei.
|
|
154
|
+
* @dev Note that it is intentionally supported here that the configured
|
|
155
|
+
* price may be explicitly set to `0`.
|
|
156
|
+
*/
|
|
157
|
+
function setAuctionDetails(
|
|
158
|
+
uint256 projectId,
|
|
159
|
+
address coreContract,
|
|
160
|
+
uint40 auctionTimestampStart,
|
|
161
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
162
|
+
uint256 startPrice,
|
|
163
|
+
uint256 basePrice
|
|
164
|
+
) external {
|
|
165
|
+
AuthLib.onlyArtist({
|
|
166
|
+
projectId: projectId,
|
|
167
|
+
coreContract: coreContract,
|
|
168
|
+
sender: msg.sender
|
|
169
|
+
});
|
|
170
|
+
// CHECKS
|
|
171
|
+
require(
|
|
172
|
+
(priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
|
|
173
|
+
"Price decay half life must be greater than min allowable value"
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
// EFFECTS
|
|
177
|
+
bool maxHasBeenInvoked = MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
178
|
+
projectId: projectId,
|
|
179
|
+
coreContract: coreContract
|
|
180
|
+
});
|
|
181
|
+
DAExpLib.setAuctionDetailsExp({
|
|
182
|
+
projectId: projectId,
|
|
183
|
+
coreContract: coreContract,
|
|
184
|
+
auctionTimestampStart: auctionTimestampStart,
|
|
185
|
+
priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
|
|
186
|
+
startPrice: startPrice.toUint88(),
|
|
187
|
+
basePrice: basePrice.toUint88(),
|
|
188
|
+
allowReconfigureAfterStart: maxHasBeenInvoked
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// sync local max invocations if not initially populated
|
|
192
|
+
// @dev if local max invocations and maxHasBeenInvoked are both
|
|
193
|
+
// initial values, we know they have not been populated.
|
|
194
|
+
if (
|
|
195
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
196
|
+
projectId: projectId,
|
|
197
|
+
coreContract: coreContract
|
|
198
|
+
})
|
|
199
|
+
) {
|
|
200
|
+
syncProjectMaxInvocationsToCore({
|
|
201
|
+
projectId: projectId,
|
|
202
|
+
coreContract: coreContract
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @notice Sets the minimum and maximum values that are settable for
|
|
209
|
+
* `priceDecayHalfLifeSeconds` across all projects.
|
|
210
|
+
* @param minimumPriceDecayHalfLifeSeconds_ Minimum price decay half life
|
|
211
|
+
* (in seconds).
|
|
212
|
+
*/
|
|
213
|
+
function setMinimumPriceDecayHalfLifeSeconds(
|
|
214
|
+
uint256 minimumPriceDecayHalfLifeSeconds_
|
|
215
|
+
) external {
|
|
216
|
+
AuthLib.onlyMinterFilterAdminACL({
|
|
217
|
+
minterFilterAddress: minterFilterAddress,
|
|
218
|
+
sender: msg.sender,
|
|
219
|
+
contract_: address(this),
|
|
220
|
+
selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
|
|
221
|
+
});
|
|
222
|
+
require(
|
|
223
|
+
minimumPriceDecayHalfLifeSeconds_ > 0,
|
|
224
|
+
"Half life of zero not allowed"
|
|
225
|
+
);
|
|
226
|
+
minimumPriceDecayHalfLifeSeconds = minimumPriceDecayHalfLifeSeconds_;
|
|
227
|
+
|
|
228
|
+
emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
|
|
229
|
+
minimumPriceDecayHalfLifeSeconds_
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @notice Resets auction details for project `projectId`, zero-ing out all
|
|
235
|
+
* relevant auction fields. Not intended to be used in normal auction
|
|
236
|
+
* operation, but rather only in case of the need to halt an auction.
|
|
237
|
+
* @param projectId Project ID to set auction details for.
|
|
238
|
+
* @param coreContract Core contract address for the given project.
|
|
239
|
+
*/
|
|
240
|
+
function resetAuctionDetails(
|
|
241
|
+
uint256 projectId,
|
|
242
|
+
address coreContract
|
|
243
|
+
) external {
|
|
244
|
+
AuthLib.onlyCoreAdminACL({
|
|
245
|
+
coreContract: coreContract,
|
|
246
|
+
sender: msg.sender,
|
|
247
|
+
contract_: address(this),
|
|
248
|
+
selector: this.resetAuctionDetails.selector
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
DAExpLib.resetAuctionDetails({
|
|
252
|
+
projectId: projectId,
|
|
253
|
+
coreContract: coreContract
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @notice Purchases a token from project `projectId`.
|
|
259
|
+
* Note: Collectors should not send excessive value with their purchase
|
|
260
|
+
* transaction, because the artist has the ability to change the auction
|
|
261
|
+
* details at any time, including the price.
|
|
262
|
+
* @param projectId Project ID to mint a token on.
|
|
263
|
+
* @param coreContract Core contract address for the given project.
|
|
264
|
+
* @return tokenId Token ID of minted token
|
|
265
|
+
*/
|
|
266
|
+
function purchase(
|
|
267
|
+
uint256 projectId,
|
|
268
|
+
address coreContract
|
|
269
|
+
) external payable returns (uint256 tokenId) {
|
|
270
|
+
tokenId = purchaseTo({
|
|
271
|
+
to: msg.sender,
|
|
272
|
+
projectId: projectId,
|
|
273
|
+
coreContract: coreContract
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
return tokenId;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// public getter functions
|
|
280
|
+
/**
|
|
281
|
+
* @notice Gets the maximum invocations project configuration.
|
|
282
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
283
|
+
* @param coreContract The address of the core contract.
|
|
284
|
+
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
285
|
+
* configuration data.
|
|
286
|
+
*/
|
|
287
|
+
function maxInvocationsProjectConfig(
|
|
288
|
+
uint256 projectId,
|
|
289
|
+
address coreContract
|
|
290
|
+
)
|
|
291
|
+
external
|
|
292
|
+
view
|
|
293
|
+
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
294
|
+
{
|
|
295
|
+
return
|
|
296
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
297
|
+
projectId: projectId,
|
|
298
|
+
coreContract: coreContract
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @notice Retrieves the auction parameters for a specific project.
|
|
304
|
+
* @param projectId The unique identifier for the project.
|
|
305
|
+
* @param coreContract The address of the core contract for the project.
|
|
306
|
+
* @return timestampStart The start timestamp for the auction.
|
|
307
|
+
* @return priceDecayHalfLifeSeconds The half-life for the price decay
|
|
308
|
+
* during the auction, in seconds.
|
|
309
|
+
* @return startPrice The starting price of the auction.
|
|
310
|
+
* @return basePrice The base price of the auction.
|
|
311
|
+
*/
|
|
312
|
+
function projectAuctionParameters(
|
|
313
|
+
uint256 projectId,
|
|
314
|
+
address coreContract
|
|
315
|
+
)
|
|
316
|
+
external
|
|
317
|
+
view
|
|
318
|
+
returns (
|
|
319
|
+
uint40 timestampStart,
|
|
320
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
321
|
+
uint256 startPrice,
|
|
322
|
+
uint256 basePrice
|
|
323
|
+
)
|
|
324
|
+
{
|
|
325
|
+
DAExpLib.DAProjectConfig storage _auctionProjectConfig = DAExpLib
|
|
326
|
+
.getDAProjectConfig(projectId, coreContract);
|
|
327
|
+
timestampStart = _auctionProjectConfig.timestampStart;
|
|
328
|
+
priceDecayHalfLifeSeconds = _auctionProjectConfig
|
|
329
|
+
.priceDecayHalfLifeSeconds;
|
|
330
|
+
startPrice = _auctionProjectConfig.startPrice;
|
|
331
|
+
basePrice = _auctionProjectConfig.basePrice;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
336
|
+
* @dev This function retrieves the cached value of `coreContract` from
|
|
337
|
+
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
338
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
339
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
340
|
+
* is a valid engine contract.
|
|
341
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
342
|
+
* a valid Engine or V3 Flagship contract.
|
|
343
|
+
* @param coreContract The address of the contract to check.
|
|
344
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
345
|
+
*/
|
|
346
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
347
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
348
|
+
.getIsEngineCacheConfig(coreContract);
|
|
349
|
+
if (isEngineCache.isCached) {
|
|
350
|
+
return isEngineCache.isEngine;
|
|
351
|
+
} else {
|
|
352
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
353
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @notice projectId => has project reached its maximum number of
|
|
359
|
+
* invocations? Note that this returns a local cache of the core contract's
|
|
360
|
+
* state, and may be out of sync with the core contract. This is
|
|
361
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
362
|
+
* project's maximum invocations has been reached. A false negative will
|
|
363
|
+
* only result in a gas cost increase, since the core contract will still
|
|
364
|
+
* enforce a maxInvocation check during minting. A false positive is not
|
|
365
|
+
* possible because the V3 core contract only allows maximum invocations
|
|
366
|
+
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
367
|
+
* do not do input validation in this method as to whether or not the input
|
|
368
|
+
* @param projectId is an existing project ID.
|
|
369
|
+
* @param coreContract is an existing core contract address.
|
|
370
|
+
*/
|
|
371
|
+
function projectMaxHasBeenInvoked(
|
|
372
|
+
uint256 projectId,
|
|
373
|
+
address coreContract
|
|
374
|
+
) external view returns (bool) {
|
|
375
|
+
return
|
|
376
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
377
|
+
projectId: projectId,
|
|
378
|
+
coreContract: coreContract
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* @notice projectId => project's maximum number of invocations.
|
|
384
|
+
* Optionally synced with core contract value, for gas optimization.
|
|
385
|
+
* Note that this returns a local cache of the core contract's
|
|
386
|
+
* state, and may be out of sync with the core contract. This is
|
|
387
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
388
|
+
* project's maximum invocations has been reached.
|
|
389
|
+
* @dev A number greater than the core contract's project max invocations
|
|
390
|
+
* will only result in a gas cost increase, since the core contract will
|
|
391
|
+
* still enforce a maxInvocation check during minting. A number less than
|
|
392
|
+
* the core contract's project max invocations is only possible when the
|
|
393
|
+
* project's max invocations have not been synced on this minter, since the
|
|
394
|
+
* V3 core contract only allows maximum invocations to be reduced, not
|
|
395
|
+
* increased. When this happens, the minter will enable minting, allowing
|
|
396
|
+
* the core contract to enforce the max invocations check. Based on this
|
|
397
|
+
* rationale, we intentionally do not do input validation in this method as
|
|
398
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
399
|
+
* @param projectId is an existing project ID.
|
|
400
|
+
* @param coreContract is an existing core contract address.
|
|
401
|
+
*/
|
|
402
|
+
function projectMaxInvocations(
|
|
403
|
+
uint256 projectId,
|
|
404
|
+
address coreContract
|
|
405
|
+
) external view returns (uint256) {
|
|
406
|
+
return
|
|
407
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
408
|
+
projectId: projectId,
|
|
409
|
+
coreContract: coreContract
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @notice Gets if price of token is configured, price of minting a
|
|
415
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
416
|
+
* used as payment. Supersedes any core contract price information.
|
|
417
|
+
* @param projectId Project ID to get price information for
|
|
418
|
+
* @param coreContract Contract address of the core contract
|
|
419
|
+
* @return isConfigured true only if token price has been configured on
|
|
420
|
+
* this minter
|
|
421
|
+
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
422
|
+
* if price has not yet been configured
|
|
423
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
424
|
+
* minter. This minter always returns "ETH"
|
|
425
|
+
* @return currencyAddress currency address for purchases of project on
|
|
426
|
+
* this minter. This minter always returns null address, reserved for ether
|
|
427
|
+
*/
|
|
428
|
+
function getPriceInfo(
|
|
429
|
+
uint256 projectId,
|
|
430
|
+
address coreContract
|
|
431
|
+
)
|
|
432
|
+
external
|
|
433
|
+
view
|
|
434
|
+
returns (
|
|
435
|
+
bool isConfigured,
|
|
436
|
+
uint256 tokenPriceInWei,
|
|
437
|
+
string memory currencySymbol,
|
|
438
|
+
address currencyAddress
|
|
439
|
+
)
|
|
440
|
+
{
|
|
441
|
+
DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
|
|
442
|
+
.getDAProjectConfig({
|
|
443
|
+
projectId: projectId,
|
|
444
|
+
coreContract: coreContract
|
|
445
|
+
});
|
|
446
|
+
isConfigured = (auctionProjectConfig.startPrice > 0);
|
|
447
|
+
if (!isConfigured) {
|
|
448
|
+
// In the case of unconfigured auction, return price of zero when
|
|
449
|
+
// getPriceExp would otherwise revert
|
|
450
|
+
tokenPriceInWei = 0;
|
|
451
|
+
} else if (block.timestamp <= auctionProjectConfig.timestampStart) {
|
|
452
|
+
// Provide a reasonable value for `tokenPriceInWei` when
|
|
453
|
+
// getPriceExp would otherwise revert, using the starting price
|
|
454
|
+
// before auction starts.
|
|
455
|
+
tokenPriceInWei = auctionProjectConfig.startPrice;
|
|
456
|
+
} else {
|
|
457
|
+
tokenPriceInWei = DAExpLib.getPriceExp({
|
|
458
|
+
projectId: projectId,
|
|
459
|
+
coreContract: coreContract
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
currencySymbol = "ETH";
|
|
463
|
+
currencyAddress = address(0);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
468
|
+
* the value currently defined in the core contract.
|
|
469
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
470
|
+
* @param coreContract Core contract address for the given project.
|
|
471
|
+
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
472
|
+
* core contracts shall still enforce a maxInvocation check during mint.
|
|
473
|
+
*/
|
|
474
|
+
function syncProjectMaxInvocationsToCore(
|
|
475
|
+
uint256 projectId,
|
|
476
|
+
address coreContract
|
|
477
|
+
) public {
|
|
478
|
+
AuthLib.onlyArtist({
|
|
479
|
+
projectId: projectId,
|
|
480
|
+
coreContract: coreContract,
|
|
481
|
+
sender: msg.sender
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
485
|
+
projectId: projectId,
|
|
486
|
+
coreContract: coreContract
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
492
|
+
* the token's owner to `to`.
|
|
493
|
+
* Note: Collectors should not send excessive value with their purchase
|
|
494
|
+
* transaction, because the artist has the ability to change the auction
|
|
495
|
+
* details at any time, including the price.
|
|
496
|
+
* @param to Address to be the new token's owner.
|
|
497
|
+
* @param projectId Project ID to mint a token on.
|
|
498
|
+
* @param coreContract Core contract address for the given project.
|
|
499
|
+
* @return tokenId Token ID of minted token
|
|
500
|
+
*/
|
|
501
|
+
function purchaseTo(
|
|
502
|
+
address to,
|
|
503
|
+
uint256 projectId,
|
|
504
|
+
address coreContract
|
|
505
|
+
) public payable nonReentrant returns (uint256 tokenId) {
|
|
506
|
+
// CHECKS
|
|
507
|
+
// pre-mint MaxInvocationsLib checks
|
|
508
|
+
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
509
|
+
// consumption after a project has been fully minted.
|
|
510
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
511
|
+
// gas consumption, but if not in sync with the core contract's value,
|
|
512
|
+
// the core contract also enforces its own max invocation check during
|
|
513
|
+
// minting.
|
|
514
|
+
MaxInvocationsLib.preMintChecks(projectId, coreContract);
|
|
515
|
+
|
|
516
|
+
// getPriceExp reverts if auction is unconfigured or has not started
|
|
517
|
+
uint256 pricePerTokenInWei = DAExpLib.getPriceExp({
|
|
518
|
+
projectId: projectId,
|
|
519
|
+
coreContract: coreContract
|
|
520
|
+
});
|
|
521
|
+
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
522
|
+
|
|
523
|
+
// EFFECTS
|
|
524
|
+
tokenId = _minterFilter.mint_joo({
|
|
525
|
+
to: to,
|
|
526
|
+
projectId: projectId,
|
|
527
|
+
coreContract: coreContract,
|
|
528
|
+
sender: msg.sender
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
MaxInvocationsLib.validatePurchaseEffectsInvocations({
|
|
532
|
+
tokenId: tokenId,
|
|
533
|
+
coreContract: coreContract
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
// INTERACTIONS
|
|
537
|
+
SplitFundsLib.splitFundsETHRefundSender({
|
|
538
|
+
projectId: projectId,
|
|
539
|
+
pricePerTokenInWei: pricePerTokenInWei,
|
|
540
|
+
coreContract: coreContract
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
return tokenId;
|
|
544
|
+
}
|
|
545
|
+
}
|