@artblocks/contracts 1.3.2 → 1.5.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 +11 -10
- package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/AdminACLV0RoyaltyRegistry.json +193 -0
- package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/IRoyaltyRegistry.json +35 -0
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +2 -2
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +2 -2
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +210 -2
- package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +235 -20
- package/artifacts/contracts/GenArt721CoreV3_Curated_Flex.sol/GenArt721CoreV3_Curated_Flex.json +3197 -0
- package/artifacts/contracts/GenArt721CoreV3_Explorations_Flex.sol/GenArt721CoreV3_Explorations_Flex.json +3192 -0
- package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +2 -2
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +27 -2
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +27 -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 +25 -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 +28 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +239 -20
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +267 -48
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +27 -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 +27 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +25 -0
- package/artifacts/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol/AbstractTransferHook.json +79 -0
- package/artifacts/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol/OwnerHistoryTransferHook.json +315 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +2 -2
- package/artifacts/contracts/interfaces/v0.8.x/IClaimMinter.sol/IClaimMinter.json +189 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +149 -0
- package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +26 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +123 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +123 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IMintTimeAndTransferCountHooks.sol/IMintTimeAndTransferCountHooks.json +356 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol/IOwnerHistoryTransferHook.json +299 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISRHooks.sol/ISRHooks.json +432 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +0 -13
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol/ISharedMinterTieredAllowV0.json +94 -0
- package/artifacts/contracts/interfaces/v0.8.x/ITransferHook.sol/ITransferHook.json +63 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/ENSLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/IUniversalResolver.json +45 -0
- package/artifacts/contracts/libs/v0.8.x/EnumerableSetUint16.sol/EnumerableSetUint16.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/FeistelWalkLib.sol/FeistelWalkLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ImmutableUint16Array.sol/ImmutableUint16Array.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/V3EngineLib.sol/V3EngineLib.json +163 -0
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/V3TransferHookLib.sol/V3TransferHookLib.json +79 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol/OnChainAllowlistLib.json +10 -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 +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +2 -2
- 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/MinterSetPriceOnChainAllowV0.sol/MinterSetPriceOnChainAllowV0.json +522 -0
- 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/MinterSetPriceTieredAllowV1.sol/MinterSetPriceTieredAllowV1.json +715 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol/MinterSlidingScaleV0.json +431 -0
- package/artifacts/contracts/minter-suite/Minters/one-off/ClaimMinter.sol/ClaimMinter.json +502 -0
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol/MinterSetPriceTieredOnChainAllowV0.json +673 -0
- 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 +6 -19
- package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ENSLibMock.sol/ENSLibMock.json +30 -0
- package/artifacts/contracts/mock/EnumerableSetUint16Mock.sol/EnumerableSetUint16Mock.json +146 -0
- package/artifacts/contracts/mock/FeistelWalkLibMock.sol/FeistelWalkLibMock.json +142 -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/ImmutableUint16ArrayMock.sol/ImmutableUint16ArrayMock.json +89 -0
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockGenArt721V3Core.sol/MockGenArt721V3Core.json +490 -0
- package/artifacts/contracts/mock/MockPMP.sol/MockPMP.json +523 -0
- package/artifacts/contracts/mock/MockTransferHook.sol/MockTransferHook.json +453 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockBatchTransferrer.json +39 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockForwardingERC721Receiver.json +71 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockSpoofingCore.json +94 -0
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/IBatchMinter.json +64 -0
- package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/ReentrancyBatchMockShared.json +113 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/MockTarget.json +74 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorPartialRevertsTestHelper.json +138 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorTestHelper.json +119 -0
- package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
- package/artifacts/contracts/relay/RelayExecutor.sol/RelayExecutor.json +101 -0
- package/artifacts/contracts/relay/RelayExecutorPartialReverts.sol/RelayExecutorPartialReverts.json +120 -0
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol/GenArt721RoyaltyOverrideSplits.json +263 -0
- package/artifacts/contracts/utils/MintMulticallUtil.sol/IMinterSetPriceV5.json +40 -0
- package/artifacts/contracts/utils/MintMulticallUtil.sol/MintMulticallUtil.json +163 -0
- package/artifacts/contracts/web3call/PMPV0.sol/PMPV0.json +2 -2
- package/artifacts/contracts/web3call/PMPV1.sol/PMPV1.json +648 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeight.sol/InjectBlockHeight.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol/InjectBlockHeightAndArtistProjectOverrides.json +226 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol/InjectBlockHeightAndNumOwnedProjectTokens.json +182 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.json +226 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol/InjectBlockTimestamp.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBytesPerToken.sol/InjectBytesPerToken.json +358 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/SRHooks.sol/SRHooks.json +899 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IGenArt721V0_Minimal.json +30 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IRelic.json +35 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/LiftHooks.json +256 -0
- package/artifacts/contracts/web3call/combined-hooks/MintTimeAndTransferCountHooks.sol/MintTimeAndTransferCountHooks.json +435 -0
- package/artifacts/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol}/AbstractPMPConfigureHook.json +1 -1
- package/artifacts/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol/PMPConfigureLockHook.json +195 -0
- package/contracts/AdminACLV0RoyaltyRegistry.sol +142 -0
- package/contracts/DependencyRegistryV0.sol +143 -13
- package/contracts/GenArt721CoreV3_Curated.sol +1 -1
- package/contracts/GenArt721CoreV3_Curated_Flex.sol +173 -0
- package/contracts/GenArt721CoreV3_Explorations_Flex.sol +159 -0
- package/contracts/engine/V3/EngineFactoryV0.sol +20 -1
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +286 -299
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +292 -301
- package/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol +101 -0
- package/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol +291 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +145 -47
- package/contracts/helpers/ERC1967ProxyImport.sol +5 -0
- package/contracts/interfaces/v0.8.x/IArtblocksRoyaltyOverride.sol +1 -1
- package/contracts/interfaces/v0.8.x/IClaimMinter.sol +70 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +95 -0
- package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +15 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +21 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +72 -0
- package/contracts/interfaces/v0.8.x/IMintTimeAndTransferCountHooks.sol +125 -0
- package/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol +119 -0
- package/contracts/interfaces/v0.8.x/ISRHooks.sol +229 -0
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +0 -6
- package/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol +69 -0
- package/contracts/interfaces/v0.8.x/ITransferHook.sol +48 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +12 -0
- package/contracts/libs/v0.8.x/ENSLib.sol +85 -0
- package/contracts/libs/v0.8.x/EnumerableSetUint16.sol +429 -0
- package/contracts/libs/v0.8.x/FeistelWalkLib.sol +221 -0
- package/contracts/libs/v0.8.x/ImmutableUint16Array.sol +201 -0
- package/contracts/libs/v0.8.x/V3EngineLib.sol +490 -0
- package/contracts/libs/v0.8.x/V3TransferHookLib.sol +251 -0
- package/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol +165 -0
- package/contracts/minter-suite/Minters/MinterSetPriceOnChainAllowV0.sol +632 -0
- package/contracts/minter-suite/Minters/MinterSetPriceTieredAllowV1.sol +871 -0
- package/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol +493 -0
- package/contracts/minter-suite/Minters/one-off/ClaimMinter.sol +595 -0
- package/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol +894 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +59 -41
- package/contracts/mock/ENSLibMock.sol +25 -0
- package/contracts/mock/EnumerableSetUint16Mock.sol +88 -0
- package/contracts/mock/FeistelWalkLibMock.sol +81 -0
- package/contracts/mock/ImmutableUint16ArrayMock.sol +62 -0
- package/contracts/mock/MockGenArt721V3Core.sol +416 -0
- package/contracts/mock/MockPMP.sol +287 -0
- package/contracts/mock/MockTransferHook.sol +160 -0
- package/contracts/mock/MockTransferHookTestHelpers.sol +96 -0
- package/contracts/mock/ReentrancyBatchMockShared.sol +53 -0
- package/contracts/mock/RelayExecutorTestHelper.sol +44 -0
- package/contracts/relay/RelayExecutor.sol +61 -0
- package/contracts/relay/RelayExecutorPartialReverts.sol +79 -0
- package/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol +130 -0
- package/contracts/utils/MintMulticallUtil.sol +103 -0
- package/contracts/web3call/PMPV1.sol +1204 -0
- package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectBlockHeight.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol +310 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol +141 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol +326 -0
- package/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectBytesPerToken.sol +279 -0
- package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +1 -1
- package/contracts/web3call/augment-hooks/SRHooks.sol +1722 -0
- package/contracts/web3call/combined-hooks/LiftHooks.sol +304 -0
- package/contracts/web3call/combined-hooks/MintTimeAndTransferCountHooks.sol +483 -0
- package/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol} +1 -1
- package/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol +107 -0
- package/package.json +40 -24
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title IClaimMinter
|
|
8
|
+
* @author Art Blocks Inc.
|
|
9
|
+
* @notice Interface for the ClaimMinter contract that enables admin to pre-mint tokens
|
|
10
|
+
* for a project and allows collectors to claim tokens in an arbitrary order with
|
|
11
|
+
* configurable pricing.
|
|
12
|
+
*/
|
|
13
|
+
interface IClaimMinter {
|
|
14
|
+
// Events
|
|
15
|
+
event PriceConfigured(uint256 basePriceInWei, uint256 priceIncrementInWei);
|
|
16
|
+
event TimestampStartConfigured(uint256 timestampStart);
|
|
17
|
+
event TokensPreMinted(uint256 amount);
|
|
18
|
+
event TokenClaimed(
|
|
19
|
+
uint256 indexed tokenId,
|
|
20
|
+
address indexed claimant,
|
|
21
|
+
uint256 price
|
|
22
|
+
);
|
|
23
|
+
event TokenWithdrawnAfterAuction(
|
|
24
|
+
uint256 indexed tokenNumber,
|
|
25
|
+
address indexed toAddress
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @notice Returns all claimed bitmaps
|
|
30
|
+
* @return An array of all claimed bitmaps
|
|
31
|
+
*/
|
|
32
|
+
function getAllClaimedBitmaps() external view returns (string memory);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @notice Sets the base price in wei for token 0 and the price increment in wei.
|
|
36
|
+
* Only callable by the core contract's Admin ACL.
|
|
37
|
+
* @param basePriceInWei_ Base price in wei for token 0.
|
|
38
|
+
* @param priceIncrementInWei_ Price increment in wei.
|
|
39
|
+
*/
|
|
40
|
+
function configurePricePerTokenInWei(
|
|
41
|
+
uint256 basePriceInWei_,
|
|
42
|
+
uint256 priceIncrementInWei_
|
|
43
|
+
) external;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Sets the timestamp when claiming can begin.
|
|
47
|
+
* Only callable by the core contract's Admin ACL.
|
|
48
|
+
* @param timestampStart_ Unix timestamp when claiming can begin.
|
|
49
|
+
*/
|
|
50
|
+
function configureTimestampStart(uint256 timestampStart_) external;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Pre-mints `amount` tokens to this contract.
|
|
54
|
+
* @param amount Number of tokens to pre-mint.
|
|
55
|
+
*/
|
|
56
|
+
function preMint(uint256 amount) external;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @notice Claims token `tokenId` by paying the required price.
|
|
60
|
+
* @param tokenNumber Token invocation number to claim.
|
|
61
|
+
*/
|
|
62
|
+
function claimToken(uint256 tokenNumber) external payable;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @notice Checks if a token is claimed using bitmap storage
|
|
66
|
+
* @param tokenNumber The token invocation number
|
|
67
|
+
* @return True if the token is claimed
|
|
68
|
+
*/
|
|
69
|
+
function isTokenClaimed(uint256 tokenNumber) external view returns (bool);
|
|
70
|
+
}
|
|
@@ -87,6 +87,89 @@ interface IDependencyRegistryV0 {
|
|
|
87
87
|
|
|
88
88
|
event UniversalBytecodeStorageReaderUpdated(address indexed newReader);
|
|
89
89
|
|
|
90
|
+
event DependencyCanvasTagTypeUpdated(
|
|
91
|
+
bytes32 indexed dependencyNameAndVersion,
|
|
92
|
+
CanvasTagType canvasTagType
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
event DependencyLoadAsModuleUpdated(
|
|
96
|
+
bytes32 indexed dependencyNameAndVersion,
|
|
97
|
+
bool loadAsModule
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
event DependencyProjectScriptTagTypeUpdated(
|
|
101
|
+
bytes32 indexed dependencyNameAndVersion,
|
|
102
|
+
ProjectScriptTagType projectScriptTagType,
|
|
103
|
+
string projectScriptSpecialType
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @notice Enum representing the canvas tag requirements for a dependency.
|
|
108
|
+
* @dev Conveys whether generated HTML must include a canvas tag, and where.
|
|
109
|
+
* @dev NoCanvasTag is the default value. No canvas tag is added to the generated HTML.
|
|
110
|
+
* @dev CanvasBeforeProjectScript adds a canvas tag before the project script.
|
|
111
|
+
* @dev CanvasAfterProjectScript adds a canvas tag after the project script.
|
|
112
|
+
*/
|
|
113
|
+
enum CanvasTagType {
|
|
114
|
+
NoCanvasTag, // default
|
|
115
|
+
CanvasBeforeProjectScript,
|
|
116
|
+
CanvasAfterProjectScript
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @notice Enum representing how a project's script must be injected into generated HTML.
|
|
121
|
+
* @dev ClassicScript is the default value. The project script is wrapped in a plain
|
|
122
|
+
* `<script>` tag, which is correct for the majority of dependencies.
|
|
123
|
+
* @dev Module wraps the project script in `<script type="module">`, for dependencies whose
|
|
124
|
+
* projects are authored as ES modules (e.g. those importing a bare specifier such as "three").
|
|
125
|
+
* @dev SpecialType wraps the project script in a `<script>` tag whose `type` attribute is set
|
|
126
|
+
* to the dependency's `projectScriptSpecialType` (e.g. "application/processing").
|
|
127
|
+
* @dev RawHtml injects the project script verbatim, with no wrapping tag, for dependencies
|
|
128
|
+
* whose project scripts are themselves complete HTML documents (e.g. "custom@na"). Generated
|
|
129
|
+
* HTML also omits the default style reset in this case, because the raw document owns its
|
|
130
|
+
* own styling.
|
|
131
|
+
*/
|
|
132
|
+
enum ProjectScriptTagType {
|
|
133
|
+
ClassicScript, // default
|
|
134
|
+
Module,
|
|
135
|
+
SpecialType,
|
|
136
|
+
RawHtml
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @notice Struct holding all details describing a dependency, including the fields that
|
|
141
|
+
* fully prescribe how the generator should render projects using it.
|
|
142
|
+
*/
|
|
143
|
+
struct DependencyDetails {
|
|
144
|
+
// name and version of dependency (i.e. "name@version") used to identify dependency
|
|
145
|
+
string nameAndVersion;
|
|
146
|
+
// type of license, MIT, GPL, etc.
|
|
147
|
+
string licenseType;
|
|
148
|
+
// preferred CDN URL for dependency
|
|
149
|
+
string preferredCDN;
|
|
150
|
+
// count of additional CDN URLs for dependency
|
|
151
|
+
uint24 additionalCDNCount;
|
|
152
|
+
// preferred code repository URL for dependency
|
|
153
|
+
string preferredRepository;
|
|
154
|
+
// count of additional repository URLs for dependency
|
|
155
|
+
uint24 additionalRepositoryCount;
|
|
156
|
+
// project website URL for dependency
|
|
157
|
+
string dependencyWebsite;
|
|
158
|
+
// whether the dependency is available on chain
|
|
159
|
+
bool availableOnChain;
|
|
160
|
+
// count of on-chain scripts for dependency
|
|
161
|
+
uint24 scriptCount;
|
|
162
|
+
// whether the dependency's own script is an ES module, and therefore must be exposed to
|
|
163
|
+
// project scripts via an import map rather than loaded with a plain `<script src>` tag
|
|
164
|
+
bool loadAsModule;
|
|
165
|
+
// canvas tag requirement for the dependency
|
|
166
|
+
CanvasTagType canvasTagType;
|
|
167
|
+
// how a project's script must be injected into generated HTML
|
|
168
|
+
ProjectScriptTagType projectScriptTagType;
|
|
169
|
+
// `type` attribute used when projectScriptTagType is SpecialType; empty otherwise
|
|
170
|
+
string projectScriptSpecialType;
|
|
171
|
+
}
|
|
172
|
+
|
|
90
173
|
/**
|
|
91
174
|
* @notice Returns the count of scripts for dependency `dependencyNameAndVersion`.
|
|
92
175
|
* @param dependencyNameAndVersion Dependency type to be queried.
|
|
@@ -117,6 +200,18 @@ interface IDependencyRegistryV0 {
|
|
|
117
200
|
/**
|
|
118
201
|
* @notice Returns details for a given dependency type `dependencyNameAndVersion`.
|
|
119
202
|
* @param dependencyNameAndVersion Name and version of dependency (i.e. "name@version") used to identify dependency.
|
|
203
|
+
* @return dependencyDetails Details for the given dependency.
|
|
204
|
+
*/
|
|
205
|
+
function getDependencyDetailsV2(
|
|
206
|
+
bytes32 dependencyNameAndVersion
|
|
207
|
+
) external view returns (DependencyDetails memory dependencyDetails);
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @notice Returns details for a given dependency type `dependencyNameAndVersion`.
|
|
211
|
+
* @dev Superseded by `getDependencyDetailsV2`, which additionally returns the fields
|
|
212
|
+
* prescribing how the generator renders projects using this dependency. Retained with an
|
|
213
|
+
* unchanged signature so that existing off-chain consumers continue to decode correctly.
|
|
214
|
+
* @param dependencyNameAndVersion Name and version of dependency (i.e. "name@version") used to identify dependency.
|
|
120
215
|
* @return nameAndVersion String representation of `dependencyNameAndVersion`.
|
|
121
216
|
* (e.g. "p5js(atSymbol)1.0.0")
|
|
122
217
|
* @return licenseType License type for dependency
|
|
@@ -32,6 +32,11 @@ interface IEngineFactoryV0 {
|
|
|
32
32
|
* new Engine or Engine Flex contracts.
|
|
33
33
|
*/
|
|
34
34
|
event Abandoned();
|
|
35
|
+
/**
|
|
36
|
+
* @notice The default base URI host was updated.
|
|
37
|
+
* @param defaultBaseURIHost new default base URI host
|
|
38
|
+
*/
|
|
39
|
+
event DefaultBaseURIHostUpdated(string defaultBaseURIHost);
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
42
|
* @notice Creates a new Engine or Engine Flex contract with the provided
|
|
@@ -69,6 +74,16 @@ interface IEngineFactoryV0 {
|
|
|
69
74
|
*/
|
|
70
75
|
function drainERC20(address ERC20TokenAddress, address recipient) external;
|
|
71
76
|
|
|
77
|
+
/**
|
|
78
|
+
* @notice Updates the default base URI host used when initializing new
|
|
79
|
+
* Engine contracts.
|
|
80
|
+
* Only callable by the owner.
|
|
81
|
+
* @param _defaultBaseURIHost New default base URI host.
|
|
82
|
+
*/
|
|
83
|
+
function updateDefaultBaseURIHost(
|
|
84
|
+
string memory _defaultBaseURIHost
|
|
85
|
+
) external;
|
|
86
|
+
|
|
72
87
|
/**
|
|
73
88
|
* @notice Calls transferOwnership on the core registry.
|
|
74
89
|
* Useful for updating the owner of the core registry contract.
|
|
@@ -80,7 +80,9 @@ interface IGenArt721CoreContractV3_Base is IGenArt721CoreProjectScriptV1 {
|
|
|
80
80
|
FIELD_PROJECT_SCRIPT_TYPE, // 13
|
|
81
81
|
FIELD_PROJECT_ASPECT_RATIO, // 14
|
|
82
82
|
FIELD_PROJECT_BASE_URI, // 15
|
|
83
|
-
FIELD_PROJECT_PROVIDER_SECONDARY_FINANCIALS // 16
|
|
83
|
+
FIELD_PROJECT_PROVIDER_SECONDARY_FINANCIALS, // 16
|
|
84
|
+
FIELD_PROJECT_TRANSFER_HOOK, // 17
|
|
85
|
+
FIELD_PROJECT_TRANSFER_HOOK_LOCKED // 18
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
/**
|
|
@@ -126,7 +128,11 @@ interface IGenArt721CoreContractV3_Base is IGenArt721CoreProjectScriptV1 {
|
|
|
126
128
|
AspectRatioNoNumbers, // 34
|
|
127
129
|
AspectRatioImproperFormat, // 35
|
|
128
130
|
OnlyNullPlatformProvider, // 36
|
|
129
|
-
ContractInitialized // 37
|
|
131
|
+
ContractInitialized, // 37
|
|
132
|
+
TransferHookLocked, // 38
|
|
133
|
+
TransferHookInvalidInterface, // 39
|
|
134
|
+
TransferHookReentrancy, // 40
|
|
135
|
+
TransferHookUnexpectedHook // 41
|
|
130
136
|
}
|
|
131
137
|
|
|
132
138
|
/**
|
|
@@ -143,6 +149,19 @@ interface IGenArt721CoreContractV3_Base is IGenArt721CoreProjectScriptV1 {
|
|
|
143
149
|
*/
|
|
144
150
|
event Mint(address indexed _to, uint256 indexed _tokenId);
|
|
145
151
|
|
|
152
|
+
/**
|
|
153
|
+
* @notice Token ID `_tokenId` minted to `_to`, with token hash
|
|
154
|
+
* `_tokenHash`.
|
|
155
|
+
* @dev New event in v3.2.9. When `_tokenHash` is non-zero, the token
|
|
156
|
+
* hash was assigned atomically during the mint transaction. When
|
|
157
|
+
* `_tokenHash` is bytes32(0), the hash has not yet been assigned.
|
|
158
|
+
*/
|
|
159
|
+
event Mint(
|
|
160
|
+
address indexed _to,
|
|
161
|
+
uint256 indexed _tokenId,
|
|
162
|
+
bytes32 _tokenHash
|
|
163
|
+
);
|
|
164
|
+
|
|
146
165
|
/**
|
|
147
166
|
* @notice currentMinter updated to `_currentMinter`.
|
|
148
167
|
* @dev Implemented starting with V3 core
|
|
@@ -147,4 +147,76 @@ interface IGenArt721CoreContractV3_Engine is IGenArt721CoreContractV3_Base {
|
|
|
147
147
|
* @return The address of the current split provider.
|
|
148
148
|
*/
|
|
149
149
|
function splitProvider() external view returns (ISplitProviderV0);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @notice Project `_projectId` transfer hook updated to `_hook`.
|
|
153
|
+
* @dev New event in v3.3. `_hook` of `address(0)` means no hook is
|
|
154
|
+
* configured (today's transfer security profile).
|
|
155
|
+
*/
|
|
156
|
+
event ProjectTransferHookUpdated(
|
|
157
|
+
uint256 indexed _projectId,
|
|
158
|
+
address indexed _hook
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @notice Project `_projectId` transfer hook configuration has been
|
|
163
|
+
* permanently locked at `_hook` (which may be `address(0)`).
|
|
164
|
+
* @dev New event in v3.3. One-way. Auto-lock at `address(0)` when the
|
|
165
|
+
* four-week project metadata lock elapses with no hook set does not emit
|
|
166
|
+
* this event (it is time-based, not a transaction).
|
|
167
|
+
*/
|
|
168
|
+
event ProjectTransferHookLocked(
|
|
169
|
+
uint256 indexed _projectId,
|
|
170
|
+
address indexed _hook
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @notice Set or clear the transfer hook for project `_projectId`.
|
|
175
|
+
* @dev New function in v3.3. Artist or Admin ACL. Reverts if locked:
|
|
176
|
+
* either `lockProjectTransferHook` was called, or the four-week project
|
|
177
|
+
* metadata lock elapsed while the hook is `address(0)`. After auto-lock,
|
|
178
|
+
* a hook that is already set remains configurable until the artist locks.
|
|
179
|
+
* A non-zero hook must ERC-165-advertise `ITransferHook`
|
|
180
|
+
* (interface ID `0x6344b0e2`). `address(0)` clears the hook.
|
|
181
|
+
* @param _projectId Project ID.
|
|
182
|
+
* @param _hook Hook contract, or `address(0)` to clear.
|
|
183
|
+
*/
|
|
184
|
+
function configureProjectTransferHook(
|
|
185
|
+
uint256 _projectId,
|
|
186
|
+
address _hook
|
|
187
|
+
) external;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @notice Permanently lock the transfer hook for project `_projectId` at
|
|
191
|
+
* `_expectedHook`, which may be `address(0)`.
|
|
192
|
+
* @dev New function in v3.3. Artist only. If locked at `address(0)`, a
|
|
193
|
+
* hook can never be assigned — restoring today's transfer security
|
|
194
|
+
* profile. If the four-week project metadata lock elapsed with no hook
|
|
195
|
+
* set, the configuration is already locked and this reverts.
|
|
196
|
+
* @dev `_expectedHook` must equal the project's currently configured hook.
|
|
197
|
+
* Because locking is permanent and the hook may be updated by either the
|
|
198
|
+
* artist or the Admin ACL, this guards against a `configureProjectTransferHook`
|
|
199
|
+
* call landing first and causing an unintended hook to be locked in.
|
|
200
|
+
* @dev WARNING: locking freezes the hook address, not the hook's behavior.
|
|
201
|
+
* Locking at an upgradeable proxy leaves its owner able to change what runs
|
|
202
|
+
* on every transfer, with no way for the project to move away from it.
|
|
203
|
+
* @param _projectId Project ID.
|
|
204
|
+
* @param _expectedHook Hook the caller expects to lock in. Reverts with
|
|
205
|
+
* `TransferHookUnexpectedHook` if it does not match the current hook.
|
|
206
|
+
*/
|
|
207
|
+
function lockProjectTransferHook(
|
|
208
|
+
uint256 _projectId,
|
|
209
|
+
address _expectedHook
|
|
210
|
+
) external;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @notice Transfer hook configuration for project `_projectId`.
|
|
214
|
+
* @return hook Hook address, or `address(0)` if none is configured.
|
|
215
|
+
* @return locked True if the artist called `lockProjectTransferHook`, or
|
|
216
|
+
* if the four-week project metadata lock elapsed while the hook is
|
|
217
|
+
* `address(0)`.
|
|
218
|
+
*/
|
|
219
|
+
function projectTransferHookConfig(
|
|
220
|
+
uint256 _projectId
|
|
221
|
+
) external view returns (address hook, bool locked);
|
|
150
222
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {ITransferHook} from "./ITransferHook.sol";
|
|
7
|
+
import {IPMPAugmentHook} from "./IPMPAugmentHook.sol";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @title Interface for the mint-time and transfer-count combined hook.
|
|
11
|
+
* @author Art Blocks Inc.
|
|
12
|
+
* @notice Reference implementation that records each token's mint timestamp
|
|
13
|
+
* and subsequent transfer count, and injects those values (plus live seconds
|
|
14
|
+
* since mint) into the token's PostParams.
|
|
15
|
+
*/
|
|
16
|
+
interface IMintTimeAndTransferCountHooks is ITransferHook, IPMPAugmentHook {
|
|
17
|
+
/**
|
|
18
|
+
* @notice Packed per-token state written by the transfer hook.
|
|
19
|
+
* @dev Fits in a single storage slot. `mintTimestamp == 0` means this hook
|
|
20
|
+
* has not observed the token's mint.
|
|
21
|
+
* @param mintTimestamp Unix seconds of the mint block; `0` if the mint
|
|
22
|
+
* was not observed.
|
|
23
|
+
* @param transferCount Ownership-changing transfers after mint. Does not
|
|
24
|
+
* include the mint itself.
|
|
25
|
+
*/
|
|
26
|
+
struct TokenTransferState {
|
|
27
|
+
uint64 mintTimestamp;
|
|
28
|
+
uint64 transferCount;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @notice Token `tokenId` on `coreContract` recorded its mint at
|
|
33
|
+
* `timestamp`.
|
|
34
|
+
*/
|
|
35
|
+
event MintTimestampRecorded(
|
|
36
|
+
address indexed coreContract,
|
|
37
|
+
uint256 indexed tokenId,
|
|
38
|
+
uint64 timestamp
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @notice Token `tokenId` on `coreContract` recorded an ownership-changing
|
|
43
|
+
* transfer. `transferCount` is the new count after this transfer.
|
|
44
|
+
*/
|
|
45
|
+
event TransferCounted(
|
|
46
|
+
address indexed coreContract,
|
|
47
|
+
uint256 indexed tokenId,
|
|
48
|
+
uint64 transferCount,
|
|
49
|
+
address from,
|
|
50
|
+
address to
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @notice PMP write of `transferCount` failed. Local hook state was still
|
|
55
|
+
* updated; the transfer that invoked this hook was not reverted.
|
|
56
|
+
* @dev Typical causes: the project has not configured a `transferCount`
|
|
57
|
+
* PMP with `AuthOption.Address` and `authAddress == this`, the param is
|
|
58
|
+
* locked, or the value is out of the configured range.
|
|
59
|
+
*/
|
|
60
|
+
event TransferCountPMPSyncFailed(
|
|
61
|
+
address indexed coreContract,
|
|
62
|
+
uint256 indexed tokenId,
|
|
63
|
+
uint64 transferCount
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @notice Thrown when the calling core does not have this hook configured
|
|
68
|
+
* for the token's project.
|
|
69
|
+
*/
|
|
70
|
+
error HookNotConfiguredForProject(
|
|
71
|
+
address coreContract,
|
|
72
|
+
uint256 projectId,
|
|
73
|
+
address configuredHook
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @notice Packed mint timestamp and transfer count for a token.
|
|
78
|
+
* @param coreContract Core contract the token belongs to.
|
|
79
|
+
* @param tokenId Token ID.
|
|
80
|
+
* @return state Packed state. Both fields are `0` if the token has never
|
|
81
|
+
* been recorded.
|
|
82
|
+
*/
|
|
83
|
+
function tokenTransferState(
|
|
84
|
+
address coreContract,
|
|
85
|
+
uint256 tokenId
|
|
86
|
+
) external view returns (TokenTransferState memory state);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @notice Unix seconds of the mint block, or `0` if this hook did not
|
|
90
|
+
* observe the mint.
|
|
91
|
+
*/
|
|
92
|
+
function mintTimestamp(
|
|
93
|
+
address coreContract,
|
|
94
|
+
uint256 tokenId
|
|
95
|
+
) external view returns (uint256);
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @notice Ownership-changing transfers after mint. Does not include the
|
|
99
|
+
* mint itself. `0` until a post-mint transfer is recorded.
|
|
100
|
+
*/
|
|
101
|
+
function transferCount(
|
|
102
|
+
address coreContract,
|
|
103
|
+
uint256 tokenId
|
|
104
|
+
) external view returns (uint256);
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @notice Seconds between the recorded mint timestamp and `block.timestamp`
|
|
108
|
+
* at the time of the call. `0` if the mint was not observed, or if
|
|
109
|
+
* `block.timestamp` is not after the mint timestamp.
|
|
110
|
+
*/
|
|
111
|
+
function secondsSinceMint(
|
|
112
|
+
address coreContract,
|
|
113
|
+
uint256 tokenId
|
|
114
|
+
) external view returns (uint256);
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @notice Whether this hook observed the token's mint, which is the case
|
|
118
|
+
* only if it was configured as the project's transfer hook before the
|
|
119
|
+
* token was minted.
|
|
120
|
+
*/
|
|
121
|
+
function isTrackedFromMint(
|
|
122
|
+
address coreContract,
|
|
123
|
+
uint256 tokenId
|
|
124
|
+
) external view returns (bool);
|
|
125
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {ITransferHook} from "./ITransferHook.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Interface for the on-chain owner history transfer hook.
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice Reference `ITransferHook` implementation that records every owner a
|
|
12
|
+
* token has had, on chain, for projects that opt in.
|
|
13
|
+
*/
|
|
14
|
+
interface IOwnerHistoryTransferHook is ITransferHook {
|
|
15
|
+
/**
|
|
16
|
+
* @notice One entry in a token's ownership chain.
|
|
17
|
+
* @dev Packed into a single storage slot: 20-byte address + 12-byte
|
|
18
|
+
* timestamp. `uint96` seconds is not a real bound.
|
|
19
|
+
*/
|
|
20
|
+
struct OwnerRecord {
|
|
21
|
+
address owner;
|
|
22
|
+
uint96 timestamp;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @notice Token `tokenId` on `coreContract` recorded `owner` at
|
|
27
|
+
* `index` in its ownership chain.
|
|
28
|
+
* @dev Index 0 is the owner that preceded the first change this hook saw:
|
|
29
|
+
* `address(0)` when the hook was configured before the token was minted,
|
|
30
|
+
* and otherwise the owner at the moment the hook started tracking.
|
|
31
|
+
*/
|
|
32
|
+
event OwnerRecorded(
|
|
33
|
+
address indexed coreContract,
|
|
34
|
+
uint256 indexed tokenId,
|
|
35
|
+
address indexed owner,
|
|
36
|
+
uint256 index,
|
|
37
|
+
uint256 timestamp
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @notice Thrown when the calling core does not have this hook configured
|
|
42
|
+
* for the token's project.
|
|
43
|
+
*/
|
|
44
|
+
error HookNotConfiguredForProject(
|
|
45
|
+
address coreContract,
|
|
46
|
+
uint256 projectId,
|
|
47
|
+
address configuredHook
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @notice Full ownership chain recorded for a token, oldest first.
|
|
52
|
+
* @dev Unbounded; use `ownerHistorySlice` for tokens with long histories.
|
|
53
|
+
* @param coreContract Core contract the token belongs to.
|
|
54
|
+
* @param tokenId Token ID.
|
|
55
|
+
*/
|
|
56
|
+
function ownerHistory(
|
|
57
|
+
address coreContract,
|
|
58
|
+
uint256 tokenId
|
|
59
|
+
) external view returns (OwnerRecord[] memory records);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @notice A page of a token's ownership chain, oldest first.
|
|
63
|
+
* @param coreContract Core contract the token belongs to.
|
|
64
|
+
* @param tokenId Token ID.
|
|
65
|
+
* @param start Index to start at.
|
|
66
|
+
* @param count Maximum number of records to return. The returned array is
|
|
67
|
+
* shorter than `count` when fewer records remain.
|
|
68
|
+
*/
|
|
69
|
+
function ownerHistorySlice(
|
|
70
|
+
address coreContract,
|
|
71
|
+
uint256 tokenId,
|
|
72
|
+
uint256 start,
|
|
73
|
+
uint256 count
|
|
74
|
+
) external view returns (OwnerRecord[] memory records);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @notice Number of records in a token's ownership chain.
|
|
78
|
+
*/
|
|
79
|
+
function ownerHistoryLength(
|
|
80
|
+
address coreContract,
|
|
81
|
+
uint256 tokenId
|
|
82
|
+
) external view returns (uint256);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @notice Owners a token has had, excluding the most recently recorded one.
|
|
86
|
+
* @dev Excludes the `address(0)` anchor of a token tracked from its mint,
|
|
87
|
+
* which is not an owner; for a token first seen mid-life, the anchor is the
|
|
88
|
+
* real owner at that moment and is included. Empty until a token has
|
|
89
|
+
* changed hands at least once while tracked.
|
|
90
|
+
*/
|
|
91
|
+
function previousOwners(
|
|
92
|
+
address coreContract,
|
|
93
|
+
uint256 tokenId
|
|
94
|
+
) external view returns (address[] memory owners);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @notice Most recently recorded owner of a token.
|
|
98
|
+
* @dev This is the token's current owner while the hook stays configured
|
|
99
|
+
* for its project. If the project's hook is cleared, transfers stop being
|
|
100
|
+
* recorded and this becomes the owner as of the last recorded transfer, so
|
|
101
|
+
* consumers that need the live owner should call `ownerOf` on the core.
|
|
102
|
+
* @return owner Most recent recorded owner, or `address(0)` if the token
|
|
103
|
+
* has never been recorded.
|
|
104
|
+
*/
|
|
105
|
+
function lastRecordedOwner(
|
|
106
|
+
address coreContract,
|
|
107
|
+
uint256 tokenId
|
|
108
|
+
) external view returns (address owner);
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @notice Whether a token's recorded chain begins at its mint, which is the
|
|
112
|
+
* case only if this hook was configured for the project before the token
|
|
113
|
+
* was minted.
|
|
114
|
+
*/
|
|
115
|
+
function isTrackedFromMint(
|
|
116
|
+
address coreContract,
|
|
117
|
+
uint256 tokenId
|
|
118
|
+
) external view returns (bool);
|
|
119
|
+
}
|