@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
|
@@ -0,0 +1,853 @@
|
|
|
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 {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
9
|
+
import {ISharedMinterSEAV0} from "../../interfaces/v0.8.x/ISharedMinterSEAV0.sol";
|
|
10
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
11
|
+
|
|
12
|
+
import {ABHelpers} from "../../libs/v0.8.x/ABHelpers.sol";
|
|
13
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
14
|
+
import {SEALib} from "../../libs/v0.8.x/minter-libs/SEALib.sol";
|
|
15
|
+
import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
|
|
16
|
+
import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
|
|
17
|
+
|
|
18
|
+
import {ReentrancyGuard} from "@openzeppelin-4.7/contracts/security/ReentrancyGuard.sol";
|
|
19
|
+
import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
|
|
20
|
+
import {Math} from "@openzeppelin-4.7/contracts/utils/math/Math.sol";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title Filtered Minter contract that allows tokens to be minted with ETH.
|
|
24
|
+
* Pricing is achieved using an automated serial English Auction mechanism.
|
|
25
|
+
* This is designed to be used with GenArt721CoreContractV3 flagship or
|
|
26
|
+
* engine contracts.
|
|
27
|
+
* @author Art Blocks Inc.
|
|
28
|
+
* @notice This contract was inspired by the release mechanism implemented by
|
|
29
|
+
* nouns.wtf, and we thank them for their pioneering work in this area.
|
|
30
|
+
/*********************************
|
|
31
|
+
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
|
|
32
|
+
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
|
|
33
|
+
* ░░░░░░█████████░░█████████░░░ *
|
|
34
|
+
* ░░░░░░██░░░████░░██░░░████░░░ *
|
|
35
|
+
* ░░██████░░░████████░░░████░░░ *
|
|
36
|
+
* ░░██░░██░░░████░░██░░░████░░░ *
|
|
37
|
+
* ░░██░░██░░░████░░██░░░████░░░ *
|
|
38
|
+
* ░░░░░░█████████░░█████████░░░ *
|
|
39
|
+
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
|
|
40
|
+
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
|
|
41
|
+
*********************************
|
|
42
|
+
* @notice Bid Front-Running:
|
|
43
|
+
* Collectors can front-run bids to become the highest bidder by bidding any
|
|
44
|
+
* amount sufficiently higher than the current highest bid, considering the
|
|
45
|
+
* minter-level configured value of `minterMinBidIncrementPercentage`. For
|
|
46
|
+
* instance, if current bid is 1 ETH, and collector A sends a transaction with
|
|
47
|
+
* a bid of 2.50 ETH, collector B may send a transaction with a bid of 2.499
|
|
48
|
+
* ETH, that if successfully front-runs Collector A's transaction, is able to
|
|
49
|
+
* cause collector A's transaction to revert. This is a difficult problem to
|
|
50
|
+
* get around in a decentralized system with public bids, and we have chosen to
|
|
51
|
+
* keep the minter simple and transparent, and leave it up to collectors to
|
|
52
|
+
* understand the risks of front-running and bid accordingly.
|
|
53
|
+
* @notice Token Ownership:
|
|
54
|
+
* This minter contract may own up to two tokens at a time for a given project.
|
|
55
|
+
* The first possible token owned is the token that is currently being
|
|
56
|
+
* auctioned. During the auction, the token is owned by the minter contract.
|
|
57
|
+
* Once the auction ends, the token is transferred to the winning bidder via a
|
|
58
|
+
* call to "settle" the auction.
|
|
59
|
+
* The second possible token owned is the token that will be auctioned next.
|
|
60
|
+
* This token is minted to and owned by the minter contract whenever possible
|
|
61
|
+
* (i.e. when the project's max invocations has not been reached) when an
|
|
62
|
+
* artist configures their project on this minter, or when a new auction is
|
|
63
|
+
* started. The purpose of this token is to allow users to have a preview of
|
|
64
|
+
* the next token that will be auctioned, even before the auction has started.
|
|
65
|
+
* @notice Privileged Roles and Ownership:
|
|
66
|
+
* This contract is designed to be managed, with limited powers.
|
|
67
|
+
* Privileged roles and abilities are controlled by the core contract's Admin
|
|
68
|
+
* ACL contract and a project's artist. Both of these roles hold extensive
|
|
69
|
+
* power and can modify minter details.
|
|
70
|
+
* Care must be taken to ensure that the admin ACL contract and artist
|
|
71
|
+
* addresses are secure behind a multi-sig or other access control mechanism.
|
|
72
|
+
* ----------------------------------------------------------------------------
|
|
73
|
+
* The following functions are restricted to the core contract's Admin ACL
|
|
74
|
+
* contract:
|
|
75
|
+
* - ejectNextTokenTo
|
|
76
|
+
* ----------------------------------------------------------------------------
|
|
77
|
+
* The following functions are restricted to this minter's minter filter's
|
|
78
|
+
* Admin ACL contract:
|
|
79
|
+
* - updateMinterTimeBufferSeconds
|
|
80
|
+
* - updateRefundGasLimit
|
|
81
|
+
* ----------------------------------------------------------------------------
|
|
82
|
+
* The following functions are restricted to a project's artist:
|
|
83
|
+
* - syncProjectMaxInvocationsToCore
|
|
84
|
+
* - manuallyLimitProjectMaxInvocations
|
|
85
|
+
* - configureFutureAuctions
|
|
86
|
+
* - tryPopulateNextToken
|
|
87
|
+
* ----------------------------------------------------------------------------
|
|
88
|
+
* The following functions are restricted to a project's artist or the core
|
|
89
|
+
* contract's Admin ACL contract:
|
|
90
|
+
* - resetFutureAuctionDetails
|
|
91
|
+
* ----------------------------------------------------------------------------
|
|
92
|
+
* Additional admin and artist privileged roles may be described on other
|
|
93
|
+
* contracts that this minter integrates with.
|
|
94
|
+
* ----------------------------------------------------------------------------
|
|
95
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
96
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
97
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
98
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
99
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
100
|
+
* checks performed by this minter's Minter Filter.
|
|
101
|
+
*
|
|
102
|
+
* @dev Note that while this minter makes use of `block.timestamp` and it is
|
|
103
|
+
* technically possible that this value is manipulated by block producers, such
|
|
104
|
+
* manipulation will not have material impact on the ability for collectors to
|
|
105
|
+
* place a bid before auction end time. This is due to the admin-configured
|
|
106
|
+
* `minterTimeBufferSeconds` parameter, which will used to ensure that
|
|
107
|
+
* collectors have sufficient time to place a bid after the final bid and
|
|
108
|
+
* before the auction end time.
|
|
109
|
+
*/
|
|
110
|
+
contract MinterSEAV1 is ReentrancyGuard, ISharedMinterV0, ISharedMinterSEAV0 {
|
|
111
|
+
using SafeCast for uint256;
|
|
112
|
+
|
|
113
|
+
/// @notice Minter filter address this minter interacts with
|
|
114
|
+
address public immutable minterFilterAddress;
|
|
115
|
+
|
|
116
|
+
/// @notice Minter filter this minter may interact with.
|
|
117
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
118
|
+
|
|
119
|
+
/// @notice minterType for this minter
|
|
120
|
+
string public constant minterType = "MinterSEAV1";
|
|
121
|
+
|
|
122
|
+
/// @notice minter version for this minter
|
|
123
|
+
string public constant minterVersion = "v1.0.0";
|
|
124
|
+
|
|
125
|
+
/// @notice Minimum auction duration
|
|
126
|
+
uint256 public constant MIN_AUCTION_DURATION_SECONDS = 60; // seconds
|
|
127
|
+
|
|
128
|
+
// minter-wide, AdminACL-configurable parameters, where AdminACL is the
|
|
129
|
+
// admin of this minter's MinterFilter.
|
|
130
|
+
// ----------------------------------------
|
|
131
|
+
|
|
132
|
+
/** @notice minimum time remaining in auction after a new bid is placed
|
|
133
|
+
* configureable by admin, default to 120 seconds
|
|
134
|
+
* max uint32 ~= 4.3e9 sec ~= 136 years
|
|
135
|
+
* @dev used when determining the buffer time for any new bid on the
|
|
136
|
+
* minter, across all projects
|
|
137
|
+
*/
|
|
138
|
+
uint32 internal _minterTimeBufferSeconds = 120;
|
|
139
|
+
|
|
140
|
+
/** @notice Gas limit for refunding ETH to bidders
|
|
141
|
+
* configurable by admin, default to 30,000
|
|
142
|
+
* max uint24 ~= 16 million gas, more than enough for a refund
|
|
143
|
+
* @dev SENDALL fallback is used to refund ETH if this limit is exceeded
|
|
144
|
+
*/
|
|
145
|
+
uint24 internal _minterRefundGasLimit = 30_000;
|
|
146
|
+
|
|
147
|
+
// MODIFIERS
|
|
148
|
+
// @dev contract uses modifier-like internal functions instead of modifiers
|
|
149
|
+
// to reduce contract bytecode size
|
|
150
|
+
// @dev contract uses AuthLib for some modifier-like functions
|
|
151
|
+
|
|
152
|
+
// function to require that a value is non-zero
|
|
153
|
+
function _onlyNonZero(uint256 _value) internal pure {
|
|
154
|
+
require(_value != 0, "Only non-zero");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @notice Initializes contract to be a shared, filtered minter for
|
|
159
|
+
* minter filter `minterFilter`
|
|
160
|
+
* @param minterFilter Minter filter for which this will be a minter
|
|
161
|
+
*/
|
|
162
|
+
constructor(address minterFilter) ReentrancyGuard() {
|
|
163
|
+
minterFilterAddress = minterFilter;
|
|
164
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
165
|
+
// emit events indicating default minter configuration values
|
|
166
|
+
emit SEALib.MinAuctionDurationSecondsUpdated(
|
|
167
|
+
MIN_AUCTION_DURATION_SECONDS
|
|
168
|
+
);
|
|
169
|
+
emit SEALib.MinterTimeBufferUpdated(_minterTimeBufferSeconds);
|
|
170
|
+
emit SEALib.MinterRefundGasLimitUpdated(_minterRefundGasLimit);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
175
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
176
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
177
|
+
* set on the core contract.
|
|
178
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
179
|
+
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
180
|
+
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
181
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
182
|
+
* @param coreContract Core contract address for the given project.
|
|
183
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
184
|
+
*/
|
|
185
|
+
function manuallyLimitProjectMaxInvocations(
|
|
186
|
+
uint256 projectId,
|
|
187
|
+
address coreContract,
|
|
188
|
+
uint24 maxInvocations
|
|
189
|
+
) external {
|
|
190
|
+
AuthLib.onlyArtist({
|
|
191
|
+
projectId: projectId,
|
|
192
|
+
coreContract: coreContract,
|
|
193
|
+
sender: msg.sender
|
|
194
|
+
});
|
|
195
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
196
|
+
projectId: projectId,
|
|
197
|
+
coreContract: coreContract,
|
|
198
|
+
maxInvocations: maxInvocations
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
// @dev the following is unique behavior to this minter
|
|
202
|
+
// for convenience, try to mint and assign a token to the project's
|
|
203
|
+
// next slot
|
|
204
|
+
SEALib.tryMintTokenToNextSlot({
|
|
205
|
+
projectId: projectId,
|
|
206
|
+
coreContract: coreContract,
|
|
207
|
+
minterFilter: _minterFilter
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @notice Sets the minter-wide time buffer in seconds. The time buffer is
|
|
213
|
+
* the minimum amount of time that must pass between the final bid and the
|
|
214
|
+
* the end of an auction. Auctions are extended if a new bid is placed
|
|
215
|
+
* within this time buffer of the auction end time.
|
|
216
|
+
* @param minterTimeBufferSeconds Time buffer in seconds.
|
|
217
|
+
*/
|
|
218
|
+
function updateMinterTimeBufferSeconds(
|
|
219
|
+
uint32 minterTimeBufferSeconds
|
|
220
|
+
) external {
|
|
221
|
+
// CHECKS
|
|
222
|
+
_onlyNonZero(minterTimeBufferSeconds);
|
|
223
|
+
AuthLib.onlyMinterFilterAdminACL({
|
|
224
|
+
minterFilterAddress: minterFilterAddress,
|
|
225
|
+
sender: msg.sender,
|
|
226
|
+
contract_: address(this),
|
|
227
|
+
selector: this.updateMinterTimeBufferSeconds.selector
|
|
228
|
+
});
|
|
229
|
+
// EFFECTS
|
|
230
|
+
_minterTimeBufferSeconds = minterTimeBufferSeconds;
|
|
231
|
+
emit SEALib.MinterTimeBufferUpdated(minterTimeBufferSeconds);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @notice Sets the gas limit during ETH refunds when a collector is
|
|
236
|
+
* outbid. This value should be set to a value that is high enough to
|
|
237
|
+
* ensure that refunds are successful for commonly used wallets, but low
|
|
238
|
+
* enough to avoid excessive abuse of refund gas allowance during a new
|
|
239
|
+
* bid.
|
|
240
|
+
* @dev max gas limit is ~16M, which is considered well over a future-safe
|
|
241
|
+
* upper bound.
|
|
242
|
+
* @param minterRefundGasLimit Gas limit to set for refunds. Must be
|
|
243
|
+
* between 7,000 and max uint24 (~16M).
|
|
244
|
+
*/
|
|
245
|
+
function updateRefundGasLimit(uint24 minterRefundGasLimit) external {
|
|
246
|
+
// CHECKS
|
|
247
|
+
AuthLib.onlyMinterFilterAdminACL({
|
|
248
|
+
minterFilterAddress: minterFilterAddress,
|
|
249
|
+
sender: msg.sender,
|
|
250
|
+
contract_: address(this),
|
|
251
|
+
selector: this.updateRefundGasLimit.selector
|
|
252
|
+
});
|
|
253
|
+
// @dev max gas limit implicitly checked by using uint24 input arg
|
|
254
|
+
// @dev min gas limit is based on rounding up current cost to send ETH
|
|
255
|
+
// to a Gnosis Safe wallet, which accesses cold address and emits event
|
|
256
|
+
require(minterRefundGasLimit >= 7_000, "Only gte 7_000");
|
|
257
|
+
// EFFECTS
|
|
258
|
+
_minterRefundGasLimit = minterRefundGasLimit;
|
|
259
|
+
emit SEALib.MinterRefundGasLimitUpdated(minterRefundGasLimit);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @notice Sets auction details for project `projectId`.
|
|
264
|
+
* If project does not have a "next token" assigned, this function attempts
|
|
265
|
+
* to mint a token and assign it to the project's next token slot.
|
|
266
|
+
* @param projectId Project ID to set future auction details for.
|
|
267
|
+
* @param coreContract Core contract address for the given project.
|
|
268
|
+
* @param timestampStart Timestamp after which new auctions may be
|
|
269
|
+
* started. Note that this is not the timestamp of the auction start, but
|
|
270
|
+
* rather the timestamp after which a auction may be started. Also note
|
|
271
|
+
* that the passed value here must either be in the future, or `0` (which
|
|
272
|
+
* indicates that auctions are immediately startable).
|
|
273
|
+
* @param auctionDurationSeconds Duration of new auctions, in seconds,
|
|
274
|
+
* before any extensions due to bids being placed inside buffer period near
|
|
275
|
+
* the end of an auction.
|
|
276
|
+
* @param basePrice reserve price (minimum starting bid price), in wei.
|
|
277
|
+
* Must be greater than 0, but may be as low as 1 wei.
|
|
278
|
+
* @param minBidIncrementPercentage Minimum percentage amount that a new
|
|
279
|
+
* bid must be over the previous bid. Must be greater than 0, and may be as
|
|
280
|
+
* high as 255. Recommended value is 5%. Values represent whole
|
|
281
|
+
* percentages, so a value of 5 represents 5%.
|
|
282
|
+
* @dev `basePrice` of zero not allowed to prevent accidental
|
|
283
|
+
* misconfiguration of auctions
|
|
284
|
+
*/
|
|
285
|
+
function configureFutureAuctions(
|
|
286
|
+
uint256 projectId,
|
|
287
|
+
address coreContract,
|
|
288
|
+
uint256 timestampStart,
|
|
289
|
+
uint256 auctionDurationSeconds,
|
|
290
|
+
uint256 basePrice,
|
|
291
|
+
uint8 minBidIncrementPercentage
|
|
292
|
+
) external {
|
|
293
|
+
// CHECKS
|
|
294
|
+
_onlyNonZero(basePrice);
|
|
295
|
+
_onlyNonZero(minBidIncrementPercentage);
|
|
296
|
+
AuthLib.onlyArtist({
|
|
297
|
+
projectId: projectId,
|
|
298
|
+
coreContract: coreContract,
|
|
299
|
+
sender: msg.sender
|
|
300
|
+
});
|
|
301
|
+
require(
|
|
302
|
+
auctionDurationSeconds >= MIN_AUCTION_DURATION_SECONDS,
|
|
303
|
+
"Auction duration below minimum"
|
|
304
|
+
);
|
|
305
|
+
SEALib.configureFutureAuctions({
|
|
306
|
+
projectId: projectId,
|
|
307
|
+
coreContract: coreContract,
|
|
308
|
+
timestampStart: timestampStart,
|
|
309
|
+
auctionDurationSeconds: auctionDurationSeconds,
|
|
310
|
+
basePrice: basePrice,
|
|
311
|
+
minBidIncrementPercentage: minBidIncrementPercentage
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
// for convenience, sync local max invocations to the core contract if
|
|
315
|
+
// and only if max invocations have not already been synced.
|
|
316
|
+
// @dev do not sync if max invocations have already been synced, as
|
|
317
|
+
// local max invocations could have been manually set to be
|
|
318
|
+
// intentionally less than the core contract's max invocations.
|
|
319
|
+
// sync local max invocations if not initially populated
|
|
320
|
+
if (
|
|
321
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
322
|
+
projectId: projectId,
|
|
323
|
+
coreContract: coreContract
|
|
324
|
+
})
|
|
325
|
+
) {
|
|
326
|
+
syncProjectMaxInvocationsToCore({
|
|
327
|
+
projectId: projectId,
|
|
328
|
+
coreContract: coreContract
|
|
329
|
+
});
|
|
330
|
+
// @dev syncProjectMaxInvocationsToCore function calls
|
|
331
|
+
// SEALib.tryMintTokenToNextSlot, so we do not call it here.
|
|
332
|
+
} else {
|
|
333
|
+
// for convenience, try to mint to next token slot
|
|
334
|
+
SEALib.tryMintTokenToNextSlot({
|
|
335
|
+
projectId: projectId,
|
|
336
|
+
coreContract: coreContract,
|
|
337
|
+
minterFilter: _minterFilter
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @notice Resets future auction configuration for project `projectId` on
|
|
344
|
+
* core contract `coreContract`, zero-ing out all details having to do
|
|
345
|
+
* with future auction parameters.
|
|
346
|
+
* This is not intended to be used in normal operation, but rather only in
|
|
347
|
+
* case of the need to halt the creation of any future auctions.
|
|
348
|
+
* Does not affect any project max invocation details.
|
|
349
|
+
* Does not affect any project next token details (i.e. if a next token is
|
|
350
|
+
* assigned, it will remain assigned and held by the minter until auction
|
|
351
|
+
* details are reconfigured).
|
|
352
|
+
* @param projectId Project ID to reset future auction configuration
|
|
353
|
+
* details for.
|
|
354
|
+
* @param coreContract Core contract address for the given project.
|
|
355
|
+
*/
|
|
356
|
+
function resetFutureAuctionDetails(
|
|
357
|
+
uint256 projectId,
|
|
358
|
+
address coreContract
|
|
359
|
+
) external {
|
|
360
|
+
AuthLib.onlyCoreAdminACLOrArtist({
|
|
361
|
+
projectId: projectId,
|
|
362
|
+
coreContract: coreContract,
|
|
363
|
+
sender: msg.sender,
|
|
364
|
+
contract_: address(this),
|
|
365
|
+
selector: this.resetFutureAuctionDetails.selector
|
|
366
|
+
});
|
|
367
|
+
// reset to initial values
|
|
368
|
+
SEALib.resetFutureAuctionDetails({
|
|
369
|
+
projectId: projectId,
|
|
370
|
+
coreContract: coreContract
|
|
371
|
+
});
|
|
372
|
+
// @dev do not affect next token or max invocations
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @notice Admin-only function that ejects a project's "next token" from
|
|
377
|
+
* the minter and sends it to the input `to` address.
|
|
378
|
+
* This function is only intended for use in the edge case where the minter
|
|
379
|
+
* has a "next token" assigned to a project, but the project has been reset
|
|
380
|
+
* via `resetFutureAuctionDetails`, and the artist does not want an auction to be
|
|
381
|
+
* started for the "next token". This function also protects against the
|
|
382
|
+
* unforseen case where the minter is in an unexpected state where it has a
|
|
383
|
+
* "next token" assigned to a project, but for some reason the project is
|
|
384
|
+
* unable to begin a new auction due to a bug.
|
|
385
|
+
* @dev only a single token may be actively assigned to a project's "next
|
|
386
|
+
* token" slot at any given time. This function will eject the token, and
|
|
387
|
+
* no further tokens will be assigned to the project's "next token" slot,
|
|
388
|
+
* unless the project is subsequently reconfigured via an artist call to
|
|
389
|
+
* `configureFutureAuctions`.
|
|
390
|
+
* @param projectId Project ID to eject next token for.
|
|
391
|
+
* @param coreContract Core contract address for the given project.
|
|
392
|
+
* @param to Address to send the ejected token to.
|
|
393
|
+
*/
|
|
394
|
+
function ejectNextTokenTo(
|
|
395
|
+
uint256 projectId,
|
|
396
|
+
address coreContract,
|
|
397
|
+
address to
|
|
398
|
+
) external {
|
|
399
|
+
AuthLib.onlyCoreAdminACL({
|
|
400
|
+
coreContract: coreContract,
|
|
401
|
+
sender: msg.sender,
|
|
402
|
+
contract_: address(this),
|
|
403
|
+
selector: this.ejectNextTokenTo.selector
|
|
404
|
+
});
|
|
405
|
+
SEALib.ejectNextTokenTo({
|
|
406
|
+
projectId: projectId,
|
|
407
|
+
coreContract: coreContract,
|
|
408
|
+
to: to
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* @notice Settles any complete auction for token `settleTokenId` (if
|
|
414
|
+
* applicable), then attempts to create a bid for token
|
|
415
|
+
* `bidTokenId` with bid amount and bidder address equal to
|
|
416
|
+
* `msg.value` and `msg.sender`, respectively.
|
|
417
|
+
* Intended to gracefully handle the case where a user is front-run by
|
|
418
|
+
* one or more transactions to settle and/or initialize a new auction,
|
|
419
|
+
* potentially still placing a bid on the auction for the token ID if the
|
|
420
|
+
* bid value is sufficiently higher than the current highest bid.
|
|
421
|
+
* Note that the use of `bidTokenId` is to prevent the possibility of
|
|
422
|
+
* transactions that are stuck in the pending pool for long periods of time
|
|
423
|
+
* from unintentionally bidding on auctions for future tokens.
|
|
424
|
+
* Note that calls to `settleAuction` and `createBid` are possible
|
|
425
|
+
* to be called in separate transactions, but this function is provided for
|
|
426
|
+
* convenience and executes both of those functions in a single
|
|
427
|
+
* transaction, while handling front-running as gracefully as possible.
|
|
428
|
+
* @param settleTokenId Token ID to settle auction for.
|
|
429
|
+
* @param bidTokenId Token ID to bid on.
|
|
430
|
+
* @param coreContract Core contract address for the given project.
|
|
431
|
+
* @dev this function is not non-reentrant, but the underlying calls are
|
|
432
|
+
* to non-reentrant functions.
|
|
433
|
+
*/
|
|
434
|
+
function settleAuctionAndCreateBid(
|
|
435
|
+
uint256 settleTokenId,
|
|
436
|
+
uint256 bidTokenId,
|
|
437
|
+
address coreContract
|
|
438
|
+
) external payable {
|
|
439
|
+
// ensure tokens are in the same project
|
|
440
|
+
require(
|
|
441
|
+
ABHelpers.tokenIdToProjectId(settleTokenId) ==
|
|
442
|
+
ABHelpers.tokenIdToProjectId(bidTokenId),
|
|
443
|
+
"Only tokens in same project"
|
|
444
|
+
);
|
|
445
|
+
// settle completed auction, if applicable
|
|
446
|
+
settleAuction({tokenId: settleTokenId, coreContract: coreContract});
|
|
447
|
+
// attempt to bid on next token
|
|
448
|
+
createBid({tokenId: bidTokenId, coreContract: coreContract});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* @notice View function to return the current minter-level configuration
|
|
453
|
+
* details.
|
|
454
|
+
* @return minAuctionDurationSeconds Minimum auction duration in seconds.
|
|
455
|
+
* Note that this value is a constant on this version of the minter.
|
|
456
|
+
* @return minterTimeBufferSeconds Buffer time in seconds
|
|
457
|
+
* @return minterRefundGasLimit Gas limit for refunding ETH
|
|
458
|
+
*/
|
|
459
|
+
function minterConfigurationDetails()
|
|
460
|
+
external
|
|
461
|
+
view
|
|
462
|
+
returns (
|
|
463
|
+
uint256 minAuctionDurationSeconds,
|
|
464
|
+
uint32 minterTimeBufferSeconds,
|
|
465
|
+
uint24 minterRefundGasLimit
|
|
466
|
+
)
|
|
467
|
+
{
|
|
468
|
+
minAuctionDurationSeconds = MIN_AUCTION_DURATION_SECONDS;
|
|
469
|
+
minterTimeBufferSeconds = _minterTimeBufferSeconds;
|
|
470
|
+
minterRefundGasLimit = _minterRefundGasLimit;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* @notice Gets the maximum invocations project configuration.
|
|
475
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
476
|
+
* @param coreContract The address of the core contract.
|
|
477
|
+
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
478
|
+
* configuration data.
|
|
479
|
+
*/
|
|
480
|
+
function maxInvocationsProjectConfig(
|
|
481
|
+
uint256 projectId,
|
|
482
|
+
address coreContract
|
|
483
|
+
)
|
|
484
|
+
external
|
|
485
|
+
view
|
|
486
|
+
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
487
|
+
{
|
|
488
|
+
return
|
|
489
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
490
|
+
projectId: projectId,
|
|
491
|
+
coreContract: coreContract
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @notice projectId => has project reached its maximum number of
|
|
497
|
+
* invocations? Note that this returns a local cache of the core contract's
|
|
498
|
+
* state, and may be out of sync with the core contract. This is
|
|
499
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
500
|
+
* project's maximum invocations has been reached. A false negative will
|
|
501
|
+
* only result in a gas cost increase, since the core contract will still
|
|
502
|
+
* enforce a maxInvocation check during minting. A false positive is not
|
|
503
|
+
* possible because the V3 core contract only allows maximum invocations
|
|
504
|
+
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
505
|
+
* do not do input validation in this method as to whether or not the input
|
|
506
|
+
* @param projectId is an existing project ID.
|
|
507
|
+
* @param coreContract is an existing core contract address.
|
|
508
|
+
*/
|
|
509
|
+
function projectMaxHasBeenInvoked(
|
|
510
|
+
uint256 projectId,
|
|
511
|
+
address coreContract
|
|
512
|
+
) external view returns (bool) {
|
|
513
|
+
return
|
|
514
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
515
|
+
projectId: projectId,
|
|
516
|
+
coreContract: coreContract
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* @notice projectId => project's maximum number of invocations.
|
|
522
|
+
* Optionally synced with core contract value, for gas optimization.
|
|
523
|
+
* Note that this returns a local cache of the core contract's
|
|
524
|
+
* state, and may be out of sync with the core contract. This is
|
|
525
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
526
|
+
* project's maximum invocations has been reached.
|
|
527
|
+
* @dev A number greater than the core contract's project max invocations
|
|
528
|
+
* will only result in a gas cost increase, since the core contract will
|
|
529
|
+
* still enforce a maxInvocation check during minting. A number less than
|
|
530
|
+
* the core contract's project max invocations is only possible when the
|
|
531
|
+
* project's max invocations have not been synced on this minter, since the
|
|
532
|
+
* V3 core contract only allows maximum invocations to be reduced, not
|
|
533
|
+
* increased. When this happens, the minter will enable minting, allowing
|
|
534
|
+
* the core contract to enforce the max invocations check. Based on this
|
|
535
|
+
* rationale, we intentionally do not do input validation in this method as
|
|
536
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
537
|
+
* @param projectId is an existing project ID.
|
|
538
|
+
* @param coreContract is an existing core contract address.
|
|
539
|
+
*/
|
|
540
|
+
function projectMaxInvocations(
|
|
541
|
+
uint256 projectId,
|
|
542
|
+
address coreContract
|
|
543
|
+
) external view returns (uint256) {
|
|
544
|
+
return
|
|
545
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
546
|
+
projectId: projectId,
|
|
547
|
+
coreContract: coreContract
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
553
|
+
* @dev This function retrieves the cached value of `isEngine` from
|
|
554
|
+
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
555
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
556
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
557
|
+
* is a valid engine contract.
|
|
558
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
559
|
+
* a valid Engine or V3 Flagship contract.
|
|
560
|
+
* @param coreContract The address of the contract to check.
|
|
561
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
562
|
+
*/
|
|
563
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
564
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
565
|
+
.getIsEngineCacheConfig(coreContract);
|
|
566
|
+
if (isEngineCache.isCached) {
|
|
567
|
+
return isEngineCache.isEngine;
|
|
568
|
+
} else {
|
|
569
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
570
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @notice projectId => SEA project configuration details.
|
|
576
|
+
* Note that in the case of no auction being initialized for the project,
|
|
577
|
+
* the returned `auction` will be the default struct.
|
|
578
|
+
* @param projectId The project ID
|
|
579
|
+
* @param coreContract The core contract address
|
|
580
|
+
* @return SEAProjectConfig_ The SEA project configuration details
|
|
581
|
+
*/
|
|
582
|
+
function SEAProjectConfigurationDetails(
|
|
583
|
+
uint256 projectId,
|
|
584
|
+
address coreContract
|
|
585
|
+
) external view returns (SEALib.SEAProjectConfig memory SEAProjectConfig_) {
|
|
586
|
+
SEAProjectConfig_ = SEALib.getSEAProjectConfig({
|
|
587
|
+
projectId: projectId,
|
|
588
|
+
coreContract: coreContract
|
|
589
|
+
});
|
|
590
|
+
// clean up next token number to handle case where it is stale
|
|
591
|
+
SEAProjectConfig_.nextTokenNumber = SEAProjectConfig_
|
|
592
|
+
.nextTokenNumberIsPopulated
|
|
593
|
+
? SEAProjectConfig_.nextTokenNumber
|
|
594
|
+
: 0;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @notice projectId => active auction details.
|
|
599
|
+
* @dev reverts if no auction exists for the project.
|
|
600
|
+
* @param projectId The project ID
|
|
601
|
+
* @param coreContract The core contract address
|
|
602
|
+
*/
|
|
603
|
+
function projectActiveAuctionDetails(
|
|
604
|
+
uint256 projectId,
|
|
605
|
+
address coreContract
|
|
606
|
+
) external view returns (SEALib.Auction memory auction) {
|
|
607
|
+
return
|
|
608
|
+
SEALib.projectActiveAuctionDetails({
|
|
609
|
+
projectId: projectId,
|
|
610
|
+
coreContract: coreContract
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* @notice Convenience function that returns either the current token ID
|
|
616
|
+
* being auctioned, or the next expected token ID to be auction if no
|
|
617
|
+
* auction is currently initialized or if the current auction has concluded
|
|
618
|
+
* (block.timestamp > auction.endTime).
|
|
619
|
+
* This is intended to be useful for frontends or scripts that intend to
|
|
620
|
+
* call `createBid` or `settleAuctionAndCreateBid`, which requires a
|
|
621
|
+
* target bid token ID to be passed in as an argument.
|
|
622
|
+
* The function reverts if a project does not have an active auction and
|
|
623
|
+
* the next expected token ID has not been populated.
|
|
624
|
+
* @param projectId The project ID being queried
|
|
625
|
+
* @param coreContract The core contract address
|
|
626
|
+
* @return The current token ID being auctioned, or the next token ID to be
|
|
627
|
+
* auctioned if a new auction is ready to be created.
|
|
628
|
+
*/
|
|
629
|
+
function getTokenToBid(
|
|
630
|
+
uint256 projectId,
|
|
631
|
+
address coreContract
|
|
632
|
+
) external view returns (uint256) {
|
|
633
|
+
return
|
|
634
|
+
SEALib.getTokenToBid({
|
|
635
|
+
projectId: projectId,
|
|
636
|
+
coreContract: coreContract
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* @notice View function that returns the next token ID to be auctioned
|
|
642
|
+
* by this minter for project `projectId`.
|
|
643
|
+
* Reverts if the next token ID has not been populated for the project.
|
|
644
|
+
* @param projectId The project ID being queried
|
|
645
|
+
* @param coreContract The core contract address
|
|
646
|
+
* @return nextTokenId The next token ID to be auctioned by this minter
|
|
647
|
+
*/
|
|
648
|
+
function getNextTokenId(
|
|
649
|
+
uint256 projectId,
|
|
650
|
+
address coreContract
|
|
651
|
+
) external view returns (uint256 nextTokenId) {
|
|
652
|
+
return
|
|
653
|
+
SEALib.getNextTokenId({
|
|
654
|
+
projectId: projectId,
|
|
655
|
+
coreContract: coreContract
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* @notice Gets price info to become the leading bidder on a token auction.
|
|
661
|
+
* If artist has not called `configureFutureAuctions` and there is no
|
|
662
|
+
* active token auction accepting bids, `isConfigured` will be false, and a
|
|
663
|
+
* dummy price of zero is assigned to `tokenPriceInWei`.
|
|
664
|
+
* If there is an active auction accepting bids, `isConfigured` will be
|
|
665
|
+
* true, and `tokenPriceInWei` will be the sum of the current bid value and
|
|
666
|
+
* the minimum bid increment due to the minter's
|
|
667
|
+
* `minterMinBidIncrementPercentage`.
|
|
668
|
+
* If there is an auction that has ended (no longer accepting bids), but
|
|
669
|
+
* the project is configured, `isConfigured` will be true, and
|
|
670
|
+
* `tokenPriceInWei` will be the minimum initial bid price for the next
|
|
671
|
+
* token auction.
|
|
672
|
+
* Also returns currency symbol and address to be being used as payment,
|
|
673
|
+
* which for this minter is ETH only.
|
|
674
|
+
* @param projectId Project ID to get price information for.
|
|
675
|
+
* @param coreContract Core contract to get price information for.
|
|
676
|
+
* @return isConfigured true only if project auctions are configured.
|
|
677
|
+
* @return tokenPriceInWei price in wei to become the leading bidder on a
|
|
678
|
+
* token auction.
|
|
679
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
680
|
+
* minter. This minter always returns "ETH"
|
|
681
|
+
* @return currencyAddress currency address for purchases of project on
|
|
682
|
+
* this minter. This minter always returns null address, reserved for ether
|
|
683
|
+
*/
|
|
684
|
+
function getPriceInfo(
|
|
685
|
+
uint256 projectId,
|
|
686
|
+
address coreContract
|
|
687
|
+
)
|
|
688
|
+
external
|
|
689
|
+
view
|
|
690
|
+
returns (
|
|
691
|
+
bool isConfigured,
|
|
692
|
+
uint256 tokenPriceInWei,
|
|
693
|
+
string memory currencySymbol,
|
|
694
|
+
address currencyAddress
|
|
695
|
+
)
|
|
696
|
+
{
|
|
697
|
+
(isConfigured, tokenPriceInWei) = SEALib.getPriceInfo({
|
|
698
|
+
projectId: projectId,
|
|
699
|
+
coreContract: coreContract
|
|
700
|
+
});
|
|
701
|
+
// currency is always ETH
|
|
702
|
+
currencySymbol = "ETH";
|
|
703
|
+
currencyAddress = address(0);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
708
|
+
* the value currently defined in the core contract.
|
|
709
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
710
|
+
* @param coreContract Core contract address for the given project.
|
|
711
|
+
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
712
|
+
* core contracts shall still enforce a maxInvocation check during mint.
|
|
713
|
+
*/
|
|
714
|
+
function syncProjectMaxInvocationsToCore(
|
|
715
|
+
uint256 projectId,
|
|
716
|
+
address coreContract
|
|
717
|
+
) public {
|
|
718
|
+
AuthLib.onlyArtist({
|
|
719
|
+
projectId: projectId,
|
|
720
|
+
coreContract: coreContract,
|
|
721
|
+
sender: msg.sender
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
725
|
+
projectId: projectId,
|
|
726
|
+
coreContract: coreContract
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
// for convenience, try to mint and assign a token to the project's
|
|
730
|
+
// next slot
|
|
731
|
+
SEALib.tryMintTokenToNextSlot({
|
|
732
|
+
projectId: projectId,
|
|
733
|
+
coreContract: coreContract,
|
|
734
|
+
minterFilter: _minterFilter
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @notice Emergency, Artist-only function that attempts to mint a new
|
|
740
|
+
* token and set it as the the next token to be auctioned for project
|
|
741
|
+
* `projectId`.
|
|
742
|
+
* Note: This function is only included for emergency, unforseen use cases,
|
|
743
|
+
* and should not be used in normal operation. It is here only for
|
|
744
|
+
* redundant protection against an unforseen edge case where the minter
|
|
745
|
+
* does not have a populated "next token", but there are still invocations
|
|
746
|
+
* remaining on the project.
|
|
747
|
+
* This function reverts if the project is not configured on this minter.
|
|
748
|
+
* This function returns early and does not modify state when:
|
|
749
|
+
* - the minter already has a populated "next token" for the project
|
|
750
|
+
* - the project has reached its maximum invocations on the core contract
|
|
751
|
+
* or minter
|
|
752
|
+
* @dev This function is gated to only the project's artist to prevent
|
|
753
|
+
* early minting of tokens by other users.
|
|
754
|
+
* @param projectId The project ID
|
|
755
|
+
* @param coreContract The core contract address for the given project.
|
|
756
|
+
*/
|
|
757
|
+
function tryPopulateNextToken(
|
|
758
|
+
uint256 projectId,
|
|
759
|
+
address coreContract
|
|
760
|
+
) public nonReentrant {
|
|
761
|
+
AuthLib.onlyArtist({
|
|
762
|
+
projectId: projectId,
|
|
763
|
+
coreContract: coreContract,
|
|
764
|
+
sender: msg.sender
|
|
765
|
+
});
|
|
766
|
+
// CHECKS
|
|
767
|
+
// revert if project is not configured on this minter
|
|
768
|
+
require(
|
|
769
|
+
SEALib.projectIsConfigured({
|
|
770
|
+
projectId: projectId,
|
|
771
|
+
coreContract: coreContract
|
|
772
|
+
}),
|
|
773
|
+
"Project not configured"
|
|
774
|
+
);
|
|
775
|
+
// INTERACTIONS
|
|
776
|
+
// attempt to mint new token to this minter contract, only if max
|
|
777
|
+
// invocations has not been reached
|
|
778
|
+
SEALib.tryMintTokenToNextSlot({
|
|
779
|
+
projectId: projectId,
|
|
780
|
+
coreContract: coreContract,
|
|
781
|
+
minterFilter: _minterFilter
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* @notice Settles a completed auction for `tokenId`, if it exists and is
|
|
787
|
+
* not yet settled.
|
|
788
|
+
* Function reverts if there is no initialized auction for the project.
|
|
789
|
+
* Function returns early (does not modify state) if
|
|
790
|
+
* - there is an auction that has already been settled for the project
|
|
791
|
+
* - there is an auction for a different token ID on the project
|
|
792
|
+
* (likely due to a front-run)
|
|
793
|
+
* This function reverts if the auction for `tokenId` exists, but has not
|
|
794
|
+
* yet ended.
|
|
795
|
+
* @param tokenId Token ID to settle auction for.
|
|
796
|
+
* @param coreContract Core contract address for the given token.
|
|
797
|
+
*/
|
|
798
|
+
function settleAuction(
|
|
799
|
+
uint256 tokenId,
|
|
800
|
+
address coreContract
|
|
801
|
+
) public nonReentrant {
|
|
802
|
+
SEALib.settleAuction({tokenId: tokenId, coreContract: coreContract});
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* @notice Enters a bid for token `tokenId`.
|
|
807
|
+
* If an auction for token `tokenId` does not exist, an auction will be
|
|
808
|
+
* initialized as long as any existing auction for the project has been
|
|
809
|
+
* settled.
|
|
810
|
+
* In order to successfully place the bid, the token bid must be:
|
|
811
|
+
* - greater than or equal to a project's minimum bid price if a new
|
|
812
|
+
* auction is initialized
|
|
813
|
+
* - sufficiently greater than the current highest bid, according to the
|
|
814
|
+
* minter's bid increment percentage `minterMinBidIncrementPercentage`,
|
|
815
|
+
* if an auction for the token already exists
|
|
816
|
+
* If the bid is unsuccessful, the transaction will revert.
|
|
817
|
+
* If the bid is successful, but outbid by another bid before the auction
|
|
818
|
+
* ends, the funds will be noncustodially returned to the bidder's address,
|
|
819
|
+
* `msg.sender`. A fallback method of sending funds back to the bidder via
|
|
820
|
+
* SELFDESTRUCT (SENDALL) prevents denial of service attacks, even if the
|
|
821
|
+
* original bidder reverts or runs out of gas during receive or fallback.
|
|
822
|
+
* ------------------------------------------------------------------------
|
|
823
|
+
* WARNING: bidders must be prepared to handle the case where their bid is
|
|
824
|
+
* outbid and their funds are returned to the original `msg.sender` address
|
|
825
|
+
* via SELFDESTRUCT (SENDALL).
|
|
826
|
+
* ------------------------------------------------------------------------
|
|
827
|
+
* Note that the use of `tokenId` is to prevent the possibility of
|
|
828
|
+
* transactions that are stuck in the pending pool for long periods of time
|
|
829
|
+
* from unintentionally bidding on auctions for future tokens.
|
|
830
|
+
* If a new auction is initialized during this call, the project's next
|
|
831
|
+
* token will be attempted to be minted to this minter contract, preparing
|
|
832
|
+
* it for the next auction. If the project's next token cannot be minted
|
|
833
|
+
* due to e.g. reaching the maximum invocations on the core contract or
|
|
834
|
+
* minter, the project's next token will not be minted.
|
|
835
|
+
* @param tokenId Token ID being bid on.
|
|
836
|
+
* @param coreContract Core contract address for the given project.
|
|
837
|
+
* @dev nonReentrant modifier is used to prevent reentrancy attacks, e.g.
|
|
838
|
+
* an an auto-bidder that would be able to atomically outbid a user's
|
|
839
|
+
* new bid via a reentrant call to createBid.
|
|
840
|
+
*/
|
|
841
|
+
function createBid(
|
|
842
|
+
uint256 tokenId,
|
|
843
|
+
address coreContract
|
|
844
|
+
) public payable nonReentrant {
|
|
845
|
+
SEALib.createBid({
|
|
846
|
+
tokenId: tokenId,
|
|
847
|
+
coreContract: coreContract,
|
|
848
|
+
minterTimeBufferSeconds: _minterTimeBufferSeconds,
|
|
849
|
+
minterRefundGasLimit: _minterRefundGasLimit,
|
|
850
|
+
minterFilter: _minterFilter
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
}
|