@artblocks/contracts 1.2.0 → 1.3.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 +22 -38
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +201 -0
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +201 -0
- package/artifacts/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +174 -55
- package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +2493 -0
- package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +311 -0
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +15 -2
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +15 -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/MinterDAExp/MinterDAExpV4.sol/MinterDAExpV4.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/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.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/MinterDALin/MinterDALinV4.sol/MinterDALinV4.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/MinterHolder/MinterHolderV4.sol/MinterHolderV4.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/MinterMerkle/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +37 -0
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSEA/MinterSEAV0.sol/MinterSEAV0.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/MinterSetPrice/MinterSetPriceV4.sol/MinterSetPriceV4.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/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +20 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +48 -12
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +76 -40
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +15 -2
- 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 +15 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +37 -0
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
- package/artifacts/contracts/generator/AddressChunks.sol/AddressChunks.json +10 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +333 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/ILegacyGenArt721CoreV2_PBAB_Flex.json +47 -0
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol/IBytecodeStorageReader_Base.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +13 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDelegateRegistry.sol/IDelegateRegistry.json +820 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +183 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol/IGenArt721CoreProjectScriptV0.json +59 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol/IGenArt721CoreProjectScriptV1.json +64 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol/IGenArt721CoreTokenHashProviderV0.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol/IGenArt721CoreTokenHashProviderV1.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol/IGenArt721GeneratorV0.json +63 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol/IPMPAugmentHook.json +83 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol/IPMPConfigureHook.json +80 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPV0.sol/IPMPV0.json +402 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol/IUniversalBytecodeStorageReader.json +69 -0
- package/artifacts/contracts/interfaces/v0.8.x/IWeb3Call.sol/IWeb3Call.json +47 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol/ERC721SeaDropStructsErrorsAndEvents.json +43 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol/INonFungibleSeaDropToken.json +715 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol/ISeaDrop.json +1571 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol/ISeaDropTokenContractMetadata.json +345 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol/SeaDropErrorsAndEvents.json +717 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol/DelegateRegistry.json +846 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol/RegistryHashes.json +10 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol/RegistryOps.json +10 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol/RegistryStorage.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ImmutableStringArray.sol/ImmutableStringArray.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +9 -22
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol/MinPriceLib.json +24 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.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 +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +664 -0
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +387 -0
- package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +1206 -0
- package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -0
- package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +2 -2
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
- package/artifacts/contracts/mock/ImmutableStringArrayMock.sol/ImmutableStringArrayMock.json +69 -0
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -0
- package/artifacts/contracts/mock/MockPMPAugmentHook.sol/MockPMPAugmentHook.json +214 -0
- package/artifacts/contracts/mock/MockPMPConfigureHook.sol/MockPMPConfigureHook.json +236 -0
- 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/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
- package/artifacts/contracts/web3call/PMPV0.sol/PMPV0.json +629 -0
- package/artifacts/contracts/web3call/Web3Call.sol/Web3Call.json +66 -0
- package/artifacts/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol/AbstractPMPAugmentHook.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/IUniswapV2Pair.json +60 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +107 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +96 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +141 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +99 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +99 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +107 -0
- package/artifacts/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol/AbstractPMPConfigureHook.json +80 -0
- package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
- package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol +128 -0
- package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
- package/contracts/BytecodeStorageV2Writer.sol +69 -0
- package/contracts/DependencyRegistryV0.sol +296 -88
- package/contracts/GenArt721CoreV3_Curated.sol +133 -0
- package/contracts/OwnedCreate2FactoryV0.sol +173 -0
- package/contracts/engine/V3/EngineFactoryV0.sol +10 -2
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +139 -70
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +148 -72
- package/contracts/generator/AddressChunks.sol +106 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +1163 -0
- package/contracts/generator/scripty-support/Scripty.sol +5 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +5 -3
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol +20 -0
- package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +5 -0
- package/contracts/interfaces/v0.8.x/IDelegateRegistry.sol +318 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +96 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +13 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +3 -1
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol +23 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol +11 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol +9 -0
- package/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol +14 -0
- package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
- package/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol +31 -0
- package/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol +25 -0
- package/contracts/interfaces/v0.8.x/IPMPV0.sol +224 -0
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +10 -4
- package/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol +33 -0
- package/contracts/interfaces/v0.8.x/IWeb3Call.sol +28 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol +58 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol +186 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol +337 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol +152 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol +320 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol +146 -0
- package/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol +753 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol +359 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol +31 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol +87 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +14 -3
- package/contracts/libs/v0.8.x/ImmutableStringArray.sol +289 -0
- package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +16 -4
- package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +107 -0
- package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
- package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
- package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
- package/contracts/mock/ImmutableStringArrayMock.sol +47 -0
- package/contracts/mock/MockFileStore.sol +22 -0
- package/contracts/mock/MockPMPAugmentHook.sol +170 -0
- package/contracts/mock/MockPMPConfigureHook.sol +78 -0
- package/contracts/web3call/PMPV0.sol +1125 -0
- package/contracts/web3call/Web3Call.sol +25 -0
- package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +46 -0
- package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol +103 -0
- package/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol +66 -0
- package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +73 -0
- package/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol +88 -0
- package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +62 -0
- package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +60 -0
- package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +61 -0
- package/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol +69 -0
- package/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol +41 -0
- package/package.json +23 -21
|
@@ -0,0 +1,462 @@
|
|
|
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 {ISharedMinterMinPriceV0} from "../../interfaces/v0.8.x/ISharedMinterMinPriceV0.sol";
|
|
9
|
+
import {ISharedMinterSimplePurchaseV0} from "../../interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol";
|
|
10
|
+
import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
|
|
11
|
+
import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
|
|
12
|
+
|
|
13
|
+
import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
|
|
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 {SetPriceLib} from "../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
|
|
17
|
+
import {MinPriceLib} from "../../libs/v0.8.x/minter-libs/MinPriceLib.sol";
|
|
18
|
+
|
|
19
|
+
import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title Shared, filtered Minter contract that allows tokens to be minted with
|
|
23
|
+
* a minimum fee in ETH.
|
|
24
|
+
* This is designed to be used with GenArt721CoreContractV3 contracts.
|
|
25
|
+
* @author Art Blocks Inc.
|
|
26
|
+
* @notice Privileged Roles and Ownership:
|
|
27
|
+
* This contract is designed to be managed, with limited powers.
|
|
28
|
+
* Privileged roles and abilities are controlled by the project's artist, which
|
|
29
|
+
* can be modified by the core contract's Admin ACL contract. Both of these
|
|
30
|
+
* roles hold extensive power and can modify minter details.
|
|
31
|
+
* Care must be taken to ensure that the admin ACL contract and artist
|
|
32
|
+
* addresses are secure behind a multi-sig or other access control mechanism.
|
|
33
|
+
* ----------------------------------------------------------------------------
|
|
34
|
+
* The following functions are restricted to the minter filter's admin ACL:
|
|
35
|
+
* - updateMinMintFee
|
|
36
|
+
* ----------------------------------------------------------------------------
|
|
37
|
+
* The following functions are restricted to a project's artist:
|
|
38
|
+
* - updatePricePerTokenInWei
|
|
39
|
+
* - syncProjectMaxInvocationsToCore
|
|
40
|
+
* - manuallyLimitProjectMaxInvocations
|
|
41
|
+
* ----------------------------------------------------------------------------
|
|
42
|
+
* Additional admin and artist privileged roles may be described on other
|
|
43
|
+
* contracts that this minter integrates with.
|
|
44
|
+
* ----------------------------------------------------------------------------
|
|
45
|
+
* @notice Caution: While Engine projects must be registered on the Art Blocks
|
|
46
|
+
* Core Registry to assign this minter, this minter does not enforce that a
|
|
47
|
+
* project is registered when configured or queried. This is primarily for gas
|
|
48
|
+
* optimization purposes. It is, therefore, possible that fake projects may be
|
|
49
|
+
* configured on this minter, but they will not be able to mint tokens due to
|
|
50
|
+
* checks performed by this minter's Minter Filter.
|
|
51
|
+
*/
|
|
52
|
+
contract MinterMinPriceV0 is
|
|
53
|
+
ReentrancyGuard,
|
|
54
|
+
ISharedMinterSimplePurchaseV0,
|
|
55
|
+
ISharedMinterV0
|
|
56
|
+
{
|
|
57
|
+
/// Minter filter address this minter interacts with
|
|
58
|
+
address public immutable minterFilterAddress;
|
|
59
|
+
|
|
60
|
+
/// Minter filter this minter may interact with.
|
|
61
|
+
IMinterFilterV1 private immutable _minterFilter;
|
|
62
|
+
|
|
63
|
+
/// minterType for this minter
|
|
64
|
+
string public constant minterType = "MinterMinPriceV0";
|
|
65
|
+
|
|
66
|
+
/// minter version for this minter
|
|
67
|
+
string public constant minterVersion = "v0.0.0";
|
|
68
|
+
|
|
69
|
+
// MODIFIERS
|
|
70
|
+
// @dev contract uses modifier-like internal functions instead of modifiers
|
|
71
|
+
// to reduce contract bytecode size
|
|
72
|
+
// @dev contract uses AuthLib for some modifier-like functions
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @notice Initializes contract to be a Filtered Minter for
|
|
76
|
+
* `minterFilter` minter filter.
|
|
77
|
+
* @param minterFilter Minter filter for which this will be a
|
|
78
|
+
* filtered minter.
|
|
79
|
+
* @param minMintFee_ Min mint fee for this minter, applied to all
|
|
80
|
+
* and-on projects that use this minter.
|
|
81
|
+
*/
|
|
82
|
+
constructor(address minterFilter, uint256 minMintFee_) ReentrancyGuard() {
|
|
83
|
+
minterFilterAddress = minterFilter;
|
|
84
|
+
_minterFilter = IMinterFilterV1(minterFilter);
|
|
85
|
+
|
|
86
|
+
MinPriceLib.updateMinMintFee({newMinMintFee: minMintFee_});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @notice Updates the min mint fee for this minter.
|
|
91
|
+
* This function is restricted to the minter filter's admin.
|
|
92
|
+
* This function is intended to be used to update the min mint fee
|
|
93
|
+
* for this minter, which is applied to all and-on projects that use this
|
|
94
|
+
* minter. This function does not update the price per token for existing
|
|
95
|
+
* projects that have already been initialized.
|
|
96
|
+
* @param newMinMintFee New min mint fee for this minter.
|
|
97
|
+
*/
|
|
98
|
+
function updateMinMintFee(uint256 newMinMintFee) external {
|
|
99
|
+
// CHECKS
|
|
100
|
+
AuthLib.onlyMinterFilterAdminACL({
|
|
101
|
+
minterFilterAddress: minterFilterAddress,
|
|
102
|
+
sender: msg.sender,
|
|
103
|
+
contract_: address(this),
|
|
104
|
+
selector: this.updateMinMintFee.selector
|
|
105
|
+
});
|
|
106
|
+
// EFFECTS
|
|
107
|
+
MinPriceLib.updateMinMintFee({newMinMintFee: newMinMintFee});
|
|
108
|
+
// @dev this update applies to an-on projects to call `updatePricePerTokenInWei`
|
|
109
|
+
// on this minter. There is no need to sync this value to existing projects.
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @notice Manually sets the local maximum invocations of project `projectId`
|
|
114
|
+
* with the provided `maxInvocations`, checking that `maxInvocations` is less
|
|
115
|
+
* than or equal to the value of project `project_id`'s maximum invocations that is
|
|
116
|
+
* set on the core contract.
|
|
117
|
+
* @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
|
|
118
|
+
* value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
|
|
119
|
+
* this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
|
|
120
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
121
|
+
* @param coreContract Core contract address for the given project.
|
|
122
|
+
* @param maxInvocations Maximum invocations to set for the project.
|
|
123
|
+
*/
|
|
124
|
+
function manuallyLimitProjectMaxInvocations(
|
|
125
|
+
uint256 projectId,
|
|
126
|
+
address coreContract,
|
|
127
|
+
uint24 maxInvocations
|
|
128
|
+
) external {
|
|
129
|
+
AuthLib.onlyArtist({
|
|
130
|
+
projectId: projectId,
|
|
131
|
+
coreContract: coreContract,
|
|
132
|
+
sender: msg.sender
|
|
133
|
+
});
|
|
134
|
+
MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
|
|
135
|
+
projectId: projectId,
|
|
136
|
+
coreContract: coreContract,
|
|
137
|
+
maxInvocations: maxInvocations
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @notice Updates this minter's price per token of project `projectId`
|
|
143
|
+
* to be '_pricePerTokenInWei`, in Wei.
|
|
144
|
+
* Reverts if price per token is less than the min mint fee.
|
|
145
|
+
* @param projectId Project ID to set the price per token for.
|
|
146
|
+
* @param coreContract Core contract address for the given project.
|
|
147
|
+
* @param pricePerTokenInWei Price per token to set for the project, in Wei.
|
|
148
|
+
* Must be greater than or equal to the min mint fee.
|
|
149
|
+
*/
|
|
150
|
+
function updatePricePerTokenInWei(
|
|
151
|
+
uint256 projectId,
|
|
152
|
+
address coreContract,
|
|
153
|
+
uint248 pricePerTokenInWei
|
|
154
|
+
) external {
|
|
155
|
+
AuthLib.onlyArtist({
|
|
156
|
+
projectId: projectId,
|
|
157
|
+
coreContract: coreContract,
|
|
158
|
+
sender: msg.sender
|
|
159
|
+
});
|
|
160
|
+
// require configured price gte min mint fee
|
|
161
|
+
// @dev intentionally support price > min mint fee, to handle cases
|
|
162
|
+
// such as opt-in premium off-chain services
|
|
163
|
+
require(
|
|
164
|
+
pricePerTokenInWei >= MinPriceLib.getMinMintFee(),
|
|
165
|
+
"Only gte min mint fee"
|
|
166
|
+
);
|
|
167
|
+
// price per token is the input price per token
|
|
168
|
+
SetPriceLib.updatePricePerToken({
|
|
169
|
+
projectId: projectId,
|
|
170
|
+
coreContract: coreContract,
|
|
171
|
+
pricePerToken: pricePerTokenInWei
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// for convenience, sync local max invocations to the core contract if
|
|
175
|
+
// and only if max invocations have not already been synced.
|
|
176
|
+
// @dev do not sync if max invocations have already been synced, as
|
|
177
|
+
// local max invocations could have been manually set to be
|
|
178
|
+
// intentionally less than the core contract's max invocations.
|
|
179
|
+
// @dev if local maxInvocations and maxHasBeenInvoked are both
|
|
180
|
+
// initial values, we know they have not been populated on this minter
|
|
181
|
+
if (
|
|
182
|
+
MaxInvocationsLib.maxInvocationsIsUnconfigured({
|
|
183
|
+
projectId: projectId,
|
|
184
|
+
coreContract: coreContract
|
|
185
|
+
})
|
|
186
|
+
) {
|
|
187
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
188
|
+
projectId: projectId,
|
|
189
|
+
coreContract: coreContract
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @notice Purchases a token from project `projectId`.
|
|
196
|
+
* @param projectId Project ID to mint a token on.
|
|
197
|
+
* @param coreContract Core contract address for the given project.
|
|
198
|
+
* @return tokenId Token ID of minted token
|
|
199
|
+
*/
|
|
200
|
+
function purchase(
|
|
201
|
+
uint256 projectId,
|
|
202
|
+
address coreContract
|
|
203
|
+
) external payable returns (uint256 tokenId) {
|
|
204
|
+
tokenId = purchaseTo({
|
|
205
|
+
to: msg.sender,
|
|
206
|
+
projectId: projectId,
|
|
207
|
+
coreContract: coreContract
|
|
208
|
+
});
|
|
209
|
+
return tokenId;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// public getter functions
|
|
213
|
+
/**
|
|
214
|
+
* @notice Gets the maximum invocations project configuration.
|
|
215
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
216
|
+
* @param coreContract The address of the core contract.
|
|
217
|
+
* @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
|
|
218
|
+
* configuration data.
|
|
219
|
+
*/
|
|
220
|
+
function maxInvocationsProjectConfig(
|
|
221
|
+
uint256 projectId,
|
|
222
|
+
address coreContract
|
|
223
|
+
)
|
|
224
|
+
external
|
|
225
|
+
view
|
|
226
|
+
returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
|
|
227
|
+
{
|
|
228
|
+
return
|
|
229
|
+
MaxInvocationsLib.getMaxInvocationsProjectConfig({
|
|
230
|
+
projectId: projectId,
|
|
231
|
+
coreContract: coreContract
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @notice Gets the set price project configuration.
|
|
237
|
+
* @param projectId The ID of the project whose data needs to be fetched.
|
|
238
|
+
* @param coreContract The address of the core contract.
|
|
239
|
+
* @return SetPriceProjectConfig struct with the fixed price project
|
|
240
|
+
* configuration data.
|
|
241
|
+
*/
|
|
242
|
+
function setPriceProjectConfig(
|
|
243
|
+
uint256 projectId,
|
|
244
|
+
address coreContract
|
|
245
|
+
) external view returns (SetPriceLib.SetPriceProjectConfig memory) {
|
|
246
|
+
return
|
|
247
|
+
SetPriceLib.getSetPriceProjectConfig({
|
|
248
|
+
projectId: projectId,
|
|
249
|
+
coreContract: coreContract
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @notice Checks if the specified `coreContract` is a valid engine contract.
|
|
255
|
+
* @dev This function retrieves the cached value of `isEngine` from
|
|
256
|
+
* the `isEngineCache` mapping. If the cached value is already set, it
|
|
257
|
+
* returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
|
|
258
|
+
* function from the `SplitFundsLib` library to check if `coreContract`
|
|
259
|
+
* is a valid engine contract.
|
|
260
|
+
* @dev This function will revert if the provided `coreContract` is not
|
|
261
|
+
* a valid Engine or V3 Flagship contract.
|
|
262
|
+
* @param coreContract The address of the contract to check.
|
|
263
|
+
* @return bool indicating if `coreContract` is a valid engine contract.
|
|
264
|
+
*/
|
|
265
|
+
function isEngineView(address coreContract) external view returns (bool) {
|
|
266
|
+
SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
|
|
267
|
+
.getIsEngineCacheConfig(coreContract);
|
|
268
|
+
if (isEngineCache.isCached) {
|
|
269
|
+
return isEngineCache.isEngine;
|
|
270
|
+
} else {
|
|
271
|
+
// @dev this calls the non-state-modifying variant of isEngine
|
|
272
|
+
return SplitFundsLib.getV3CoreIsEngineView(coreContract);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @notice projectId => has project reached its maximum number of
|
|
278
|
+
* invocations? Note that this returns a local cache of the core contract's
|
|
279
|
+
* state, and may be out of sync with the core contract. This is
|
|
280
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
281
|
+
* project's maximum invocations has been reached. A false negative will
|
|
282
|
+
* only result in a gas cost increase, since the core contract will still
|
|
283
|
+
* enforce a maxInvocation check during minting. A false positive is not
|
|
284
|
+
* possible because the V3 core contract only allows maximum invocations
|
|
285
|
+
* to be reduced, not increased. Based on this rationale, we intentionally
|
|
286
|
+
* do not do input validation in this method as to whether or not the input
|
|
287
|
+
* @param projectId is an existing project ID.
|
|
288
|
+
* @param coreContract is an existing core contract address.
|
|
289
|
+
*/
|
|
290
|
+
function projectMaxHasBeenInvoked(
|
|
291
|
+
uint256 projectId,
|
|
292
|
+
address coreContract
|
|
293
|
+
) external view returns (bool) {
|
|
294
|
+
return
|
|
295
|
+
MaxInvocationsLib.getMaxHasBeenInvoked({
|
|
296
|
+
projectId: projectId,
|
|
297
|
+
coreContract: coreContract
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @notice projectId => project's maximum number of invocations.
|
|
303
|
+
* Optionally synced with core contract value, for gas optimization.
|
|
304
|
+
* Note that this returns a local cache of the core contract's
|
|
305
|
+
* state, and may be out of sync with the core contract. This is
|
|
306
|
+
* intentional, as it only enables gas optimization of mints after a
|
|
307
|
+
* project's maximum invocations has been reached.
|
|
308
|
+
* @dev A number greater than the core contract's project max invocations
|
|
309
|
+
* will only result in a gas cost increase, since the core contract will
|
|
310
|
+
* still enforce a maxInvocation check during minting. A number less than
|
|
311
|
+
* the core contract's project max invocations is only possible when the
|
|
312
|
+
* project's max invocations have not been synced on this minter, since the
|
|
313
|
+
* V3 core contract only allows maximum invocations to be reduced, not
|
|
314
|
+
* increased. When this happens, the minter will enable minting, allowing
|
|
315
|
+
* the core contract to enforce the max invocations check. Based on this
|
|
316
|
+
* rationale, we intentionally do not do input validation in this method as
|
|
317
|
+
* to whether or not the input `projectId` is an existing project ID.
|
|
318
|
+
* @param projectId is an existing project ID.
|
|
319
|
+
* @param coreContract is an existing core contract address.
|
|
320
|
+
*/
|
|
321
|
+
function projectMaxInvocations(
|
|
322
|
+
uint256 projectId,
|
|
323
|
+
address coreContract
|
|
324
|
+
) external view returns (uint256) {
|
|
325
|
+
return
|
|
326
|
+
MaxInvocationsLib.getMaxInvocations({
|
|
327
|
+
projectId: projectId,
|
|
328
|
+
coreContract: coreContract
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @notice Gets if price of token is configured, price of minting a
|
|
334
|
+
* token on project `projectId`, and currency symbol and address to be
|
|
335
|
+
* used as payment.
|
|
336
|
+
* @param projectId Project ID to get price information for
|
|
337
|
+
* @param coreContract Contract address of the core contract
|
|
338
|
+
* @return isConfigured true only if token price has been configured on
|
|
339
|
+
* this minter
|
|
340
|
+
* @return tokenPriceInWei current price of token on this minter - invalid
|
|
341
|
+
* if price has not yet been configured
|
|
342
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
343
|
+
* minter. This minter always returns "ETH"
|
|
344
|
+
* @return currencyAddress currency address for purchases of project on
|
|
345
|
+
* this minter. This minter always returns null address, reserved for ether
|
|
346
|
+
*/
|
|
347
|
+
function getPriceInfo(
|
|
348
|
+
uint256 projectId,
|
|
349
|
+
address coreContract
|
|
350
|
+
)
|
|
351
|
+
external
|
|
352
|
+
view
|
|
353
|
+
returns (
|
|
354
|
+
bool isConfigured,
|
|
355
|
+
uint256 tokenPriceInWei,
|
|
356
|
+
string memory currencySymbol,
|
|
357
|
+
address currencyAddress
|
|
358
|
+
)
|
|
359
|
+
{
|
|
360
|
+
SetPriceLib.SetPriceProjectConfig
|
|
361
|
+
storage setPriceProjectConfig_ = SetPriceLib
|
|
362
|
+
.getSetPriceProjectConfig({
|
|
363
|
+
projectId: projectId,
|
|
364
|
+
coreContract: coreContract
|
|
365
|
+
});
|
|
366
|
+
isConfigured = setPriceProjectConfig_.priceIsConfigured;
|
|
367
|
+
tokenPriceInWei = setPriceProjectConfig_.pricePerToken;
|
|
368
|
+
currencySymbol = "ETH";
|
|
369
|
+
currencyAddress = address(0);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @notice Returns the min mint fee for this minter, applied to all
|
|
374
|
+
* and-on projects.
|
|
375
|
+
* @return minMintFee Min mint fee, in wei
|
|
376
|
+
*/
|
|
377
|
+
function minMintFee() external view returns (uint256) {
|
|
378
|
+
return MinPriceLib.getMinMintFee();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @notice Syncs local maximum invocations of project `projectId` based on
|
|
383
|
+
* the value currently defined in the core contract.
|
|
384
|
+
* @param projectId Project ID to set the maximum invocations for.
|
|
385
|
+
* @param coreContract Core contract address for the given project.
|
|
386
|
+
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
387
|
+
* core contracts shall still enforce a maxInvocation check during mint.
|
|
388
|
+
*/
|
|
389
|
+
function syncProjectMaxInvocationsToCore(
|
|
390
|
+
uint256 projectId,
|
|
391
|
+
address coreContract
|
|
392
|
+
) public {
|
|
393
|
+
AuthLib.onlyArtist({
|
|
394
|
+
projectId: projectId,
|
|
395
|
+
coreContract: coreContract,
|
|
396
|
+
sender: msg.sender
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
MaxInvocationsLib.syncProjectMaxInvocationsToCore({
|
|
400
|
+
projectId: projectId,
|
|
401
|
+
coreContract: coreContract
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @notice Purchases a token from project `projectId` and sets
|
|
407
|
+
* the token's owner to `to`.
|
|
408
|
+
* @param to Address to be the new token's owner.
|
|
409
|
+
* @param projectId Project ID to mint a token on.
|
|
410
|
+
* @param coreContract Core contract address for the given project.
|
|
411
|
+
* @return tokenId Token ID of minted token
|
|
412
|
+
*/
|
|
413
|
+
function purchaseTo(
|
|
414
|
+
address to,
|
|
415
|
+
uint256 projectId,
|
|
416
|
+
address coreContract
|
|
417
|
+
) public payable nonReentrant returns (uint256 tokenId) {
|
|
418
|
+
// CHECKS
|
|
419
|
+
// pre-mint MaxInvocationsLib checks
|
|
420
|
+
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
|
|
421
|
+
// consumption after a project has been fully minted.
|
|
422
|
+
// `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
|
|
423
|
+
// gas consumption, but if not in sync with the core contract's value,
|
|
424
|
+
// the core contract also enforces its own max invocation check during
|
|
425
|
+
// minting.
|
|
426
|
+
MaxInvocationsLib.preMintChecks({
|
|
427
|
+
projectId: projectId,
|
|
428
|
+
coreContract: coreContract
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
// pre-mint checks for set price lib, and get price per token in wei
|
|
432
|
+
// @dev price per token is loaded into memory here for gas efficiency
|
|
433
|
+
uint256 pricePerTokenInWei = SetPriceLib.preMintChecksAndGetPrice({
|
|
434
|
+
projectId: projectId,
|
|
435
|
+
coreContract: coreContract
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
|
|
439
|
+
|
|
440
|
+
// EFFECTS
|
|
441
|
+
tokenId = _minterFilter.mint_joo({
|
|
442
|
+
to: to,
|
|
443
|
+
projectId: projectId,
|
|
444
|
+
coreContract: coreContract,
|
|
445
|
+
sender: msg.sender
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
MaxInvocationsLib.validateMintEffectsInvocations({
|
|
449
|
+
tokenId: tokenId,
|
|
450
|
+
coreContract: coreContract
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
// INTERACTIONS
|
|
454
|
+
SplitFundsLib.sendAllToRenderProviderETHRefundSender({
|
|
455
|
+
projectId: projectId,
|
|
456
|
+
pricePerTokenInWei: pricePerTokenInWei,
|
|
457
|
+
coreContract: coreContract
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
return tokenId;
|
|
461
|
+
}
|
|
462
|
+
}
|