@artblocks/contracts 1.3.2 → 1.4.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/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/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/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/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol} +1 -1
- package/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol +107 -0
- package/package.json +39 -24
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.22;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import "../interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Mock GenArt721V3 Core Contract for E2E Testing
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice This is a minimal mock implementation of GenArt721CoreV3_Engine_Flex
|
|
12
|
+
* for e2e integration testing on testnets.
|
|
13
|
+
* @dev This contract simulates a single project (project 0) with 10 tokens (0-9)
|
|
14
|
+
* that return deterministic hashes based on token ID.
|
|
15
|
+
*/
|
|
16
|
+
contract MockGenArt721V3Core {
|
|
17
|
+
// Constants
|
|
18
|
+
uint256 constant ONE_MILLION = 1_000_000;
|
|
19
|
+
uint256 constant PROJECT_ID = 0;
|
|
20
|
+
uint256 constant MAX_TOKENS = 10;
|
|
21
|
+
|
|
22
|
+
// Core type and version - simulating v3.2.5 Engine Flex
|
|
23
|
+
string public constant coreVersion = "v3.2.5";
|
|
24
|
+
string public constant coreType = "GenArt721CoreV3_Engine_Flex";
|
|
25
|
+
|
|
26
|
+
// Gateway preferences
|
|
27
|
+
string private _preferredIPFSGateway = "https://ipfs.io/ipfs/";
|
|
28
|
+
string private _preferredArweaveGateway = "https://arweave.net/";
|
|
29
|
+
|
|
30
|
+
// Mock project script data
|
|
31
|
+
string private _scriptTypeAndVersion = "p5js@1.0.0";
|
|
32
|
+
string private _aspectRatio = "1";
|
|
33
|
+
string[] private _projectScripts;
|
|
34
|
+
|
|
35
|
+
// Mock external asset dependencies
|
|
36
|
+
ExternalAssetDependency[] private _externalAssetDependencies;
|
|
37
|
+
|
|
38
|
+
// External asset dependency struct (matching IGenArt721CoreContractV3_Engine_Flex)
|
|
39
|
+
// @dev For ONCHAIN type: cid is empty string, data contains the bytecode content
|
|
40
|
+
struct ExternalAssetDependency {
|
|
41
|
+
string cid;
|
|
42
|
+
IGenArt721CoreContractV3_Engine_Flex.ExternalAssetDependencyType dependencyType;
|
|
43
|
+
address bytecodeAddress;
|
|
44
|
+
string data; // For ONCHAIN type, this holds the data (e.g., "#web3call_contract#")
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
constructor() {
|
|
48
|
+
// Initialize with a sample script
|
|
49
|
+
_projectScripts.push(
|
|
50
|
+
"// Sample p5.js script\nfunction setup() { createCanvas(400, 400); }\nfunction draw() { background(tokenData.hash); }"
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
// Initialize with a sample ONCHAIN external asset dependency
|
|
54
|
+
// This simulates having a PMP contract as an external dependency
|
|
55
|
+
// @dev For ONCHAIN type: cid is empty string, data is "#web3call_contract#"
|
|
56
|
+
_externalAssetDependencies.push(
|
|
57
|
+
ExternalAssetDependency({
|
|
58
|
+
cid: "", // Empty string for ONCHAIN type per interface spec
|
|
59
|
+
dependencyType: IGenArt721CoreContractV3_Engine_Flex
|
|
60
|
+
.ExternalAssetDependencyType
|
|
61
|
+
.ONCHAIN,
|
|
62
|
+
bytecodeAddress: address(0), // Will be set during deployment if needed
|
|
63
|
+
data: "#web3call_contract#" // The web3call marker for ONCHAIN dependencies
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// =========================================================================
|
|
69
|
+
// Token Hash Functions
|
|
70
|
+
// =========================================================================
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @notice Returns deterministic hash for token ID.
|
|
74
|
+
* @param _tokenId Token ID to query.
|
|
75
|
+
* @return bytes32 Deterministic hash based on token ID.
|
|
76
|
+
* @dev Hash is keccak256 of ("MockGenArt721V3Core", tokenId) for determinism.
|
|
77
|
+
*/
|
|
78
|
+
function tokenIdToHash(uint256 _tokenId) external pure returns (bytes32) {
|
|
79
|
+
// Validate token exists (project 0, tokens 0-9)
|
|
80
|
+
require(_tokenId < MAX_TOKENS, "Token does not exist");
|
|
81
|
+
// Return deterministic hash
|
|
82
|
+
return keccak256(abi.encode("MockGenArt721V3Core", _tokenId));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @notice Returns the project ID for a given token ID.
|
|
87
|
+
* @param _tokenId Token ID to query.
|
|
88
|
+
* @return uint256 Project ID (always 0 for this mock).
|
|
89
|
+
*/
|
|
90
|
+
function tokenIdToProjectId(
|
|
91
|
+
uint256 _tokenId
|
|
92
|
+
) external pure returns (uint256) {
|
|
93
|
+
return _tokenId / ONE_MILLION;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// =========================================================================
|
|
97
|
+
// Project Script Functions
|
|
98
|
+
// =========================================================================
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @notice Returns script details for a project.
|
|
102
|
+
* @param _projectId Project ID to query.
|
|
103
|
+
* @return scriptTypeAndVersion Script type and version string.
|
|
104
|
+
* @return aspectRatio Project aspect ratio.
|
|
105
|
+
* @return scriptCount Number of scripts in the project.
|
|
106
|
+
*/
|
|
107
|
+
function projectScriptDetails(
|
|
108
|
+
uint256 _projectId
|
|
109
|
+
)
|
|
110
|
+
external
|
|
111
|
+
view
|
|
112
|
+
returns (
|
|
113
|
+
string memory scriptTypeAndVersion,
|
|
114
|
+
string memory aspectRatio,
|
|
115
|
+
uint256 scriptCount
|
|
116
|
+
)
|
|
117
|
+
{
|
|
118
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
119
|
+
return (_scriptTypeAndVersion, _aspectRatio, _projectScripts.length);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @notice Returns script information for a project.
|
|
124
|
+
* @param _projectId Project ID to query.
|
|
125
|
+
* @return scriptTypeAndVersion Script type and version string.
|
|
126
|
+
* @return aspectRatio Project aspect ratio.
|
|
127
|
+
* @return scriptCount Number of scripts in the project.
|
|
128
|
+
* @dev This is an alias for projectScriptDetails for backwards compatibility.
|
|
129
|
+
*/
|
|
130
|
+
function projectScriptInfo(
|
|
131
|
+
uint256 _projectId
|
|
132
|
+
)
|
|
133
|
+
external
|
|
134
|
+
view
|
|
135
|
+
returns (
|
|
136
|
+
string memory scriptTypeAndVersion,
|
|
137
|
+
string memory aspectRatio,
|
|
138
|
+
uint256 scriptCount
|
|
139
|
+
)
|
|
140
|
+
{
|
|
141
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
142
|
+
return (_scriptTypeAndVersion, _aspectRatio, _projectScripts.length);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @notice Returns script at a given index for a project.
|
|
147
|
+
* @param _projectId Project ID to query.
|
|
148
|
+
* @param _index Script index.
|
|
149
|
+
* @return string Script content.
|
|
150
|
+
*/
|
|
151
|
+
function projectScriptByIndex(
|
|
152
|
+
uint256 _projectId,
|
|
153
|
+
uint256 _index
|
|
154
|
+
) external view returns (string memory) {
|
|
155
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
156
|
+
require(_index < _projectScripts.length, "Script index out of bounds");
|
|
157
|
+
return _projectScripts[_index];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @notice Returns bytecode address for script at a given index.
|
|
162
|
+
* @param _projectId Project ID to query.
|
|
163
|
+
* @param _index Script index.
|
|
164
|
+
* @return address Bytecode address (returns address(0) for this mock).
|
|
165
|
+
*/
|
|
166
|
+
function projectScriptBytecodeAddressByIndex(
|
|
167
|
+
uint256 _projectId,
|
|
168
|
+
uint256 _index
|
|
169
|
+
) external view returns (address) {
|
|
170
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
171
|
+
require(_index < _projectScripts.length, "Script index out of bounds");
|
|
172
|
+
// Mock doesn't use bytecode storage
|
|
173
|
+
return address(0);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// =========================================================================
|
|
177
|
+
// External Asset Dependency Functions
|
|
178
|
+
// =========================================================================
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @notice Returns count of external asset dependencies for a project.
|
|
182
|
+
* @param _projectId Project ID to query.
|
|
183
|
+
* @return uint256 Count of external asset dependencies.
|
|
184
|
+
*/
|
|
185
|
+
function projectExternalAssetDependencyCount(
|
|
186
|
+
uint256 _projectId
|
|
187
|
+
) external view returns (uint256) {
|
|
188
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
189
|
+
return _externalAssetDependencies.length;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @notice Returns external asset dependency at a given index for a project.
|
|
194
|
+
* @param _projectId Project ID to query.
|
|
195
|
+
* @param _index Dependency index.
|
|
196
|
+
* @return ExternalAssetDependencyWithData The external asset dependency data.
|
|
197
|
+
* @dev For ONCHAIN type: cid is empty string, data contains the bytecode content
|
|
198
|
+
* (e.g., "#web3call_contract#" for web3call contracts)
|
|
199
|
+
*/
|
|
200
|
+
function projectExternalAssetDependencyByIndex(
|
|
201
|
+
uint256 _projectId,
|
|
202
|
+
uint256 _index
|
|
203
|
+
)
|
|
204
|
+
external
|
|
205
|
+
view
|
|
206
|
+
returns (
|
|
207
|
+
IGenArt721CoreContractV3_Engine_Flex.ExternalAssetDependencyWithData
|
|
208
|
+
memory
|
|
209
|
+
)
|
|
210
|
+
{
|
|
211
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
212
|
+
require(
|
|
213
|
+
_index < _externalAssetDependencies.length,
|
|
214
|
+
"Dependency index out of bounds"
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
ExternalAssetDependency storage dep = _externalAssetDependencies[
|
|
218
|
+
_index
|
|
219
|
+
];
|
|
220
|
+
return
|
|
221
|
+
IGenArt721CoreContractV3_Engine_Flex
|
|
222
|
+
.ExternalAssetDependencyWithData({
|
|
223
|
+
cid: dep.cid, // Empty string for ONCHAIN type
|
|
224
|
+
dependencyType: dep.dependencyType,
|
|
225
|
+
bytecodeAddress: dep.bytecodeAddress,
|
|
226
|
+
data: dep.data // "#web3call_contract#" for ONCHAIN web3call dependencies
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// =========================================================================
|
|
231
|
+
// Gateway Preference Functions
|
|
232
|
+
// =========================================================================
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @notice Returns the preferred IPFS gateway URL.
|
|
236
|
+
* @return string The preferred IPFS gateway.
|
|
237
|
+
*/
|
|
238
|
+
function preferredIPFSGateway() external view returns (string memory) {
|
|
239
|
+
return _preferredIPFSGateway;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @notice Returns the preferred Arweave gateway URL.
|
|
244
|
+
* @return string The preferred Arweave gateway.
|
|
245
|
+
*/
|
|
246
|
+
function preferredArweaveGateway() external view returns (string memory) {
|
|
247
|
+
return _preferredArweaveGateway;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// =========================================================================
|
|
251
|
+
// Admin Functions (for testing setup)
|
|
252
|
+
// =========================================================================
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @notice Sets the external asset dependency bytecode address.
|
|
256
|
+
* @param _index Index of the dependency to update.
|
|
257
|
+
* @param _bytecodeAddress The bytecode address (e.g., PMP contract address).
|
|
258
|
+
* @dev This is used during testing to link the mock PMP contract.
|
|
259
|
+
*/
|
|
260
|
+
function setExternalAssetDependencyBytecodeAddress(
|
|
261
|
+
uint256 _index,
|
|
262
|
+
address _bytecodeAddress
|
|
263
|
+
) external {
|
|
264
|
+
require(
|
|
265
|
+
_index < _externalAssetDependencies.length,
|
|
266
|
+
"Index out of bounds"
|
|
267
|
+
);
|
|
268
|
+
_externalAssetDependencies[_index].bytecodeAddress = _bytecodeAddress;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @notice Adds a new external asset dependency.
|
|
273
|
+
* @param _cid CID or identifier for the dependency (empty for ONCHAIN type).
|
|
274
|
+
* @param _dependencyType Type of the dependency.
|
|
275
|
+
* @param _bytecodeAddress Bytecode address if ONCHAIN type.
|
|
276
|
+
* @param _data Data content for ONCHAIN type (e.g., "#web3call_contract#").
|
|
277
|
+
*/
|
|
278
|
+
function addExternalAssetDependency(
|
|
279
|
+
string memory _cid,
|
|
280
|
+
IGenArt721CoreContractV3_Engine_Flex.ExternalAssetDependencyType _dependencyType,
|
|
281
|
+
address _bytecodeAddress,
|
|
282
|
+
string memory _data
|
|
283
|
+
) external {
|
|
284
|
+
_externalAssetDependencies.push(
|
|
285
|
+
ExternalAssetDependency({
|
|
286
|
+
cid: _cid,
|
|
287
|
+
dependencyType: _dependencyType,
|
|
288
|
+
bytecodeAddress: _bytecodeAddress,
|
|
289
|
+
data: _data
|
|
290
|
+
})
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @notice Adds a project script.
|
|
296
|
+
* @param _script The script content to add.
|
|
297
|
+
*/
|
|
298
|
+
function addProjectScript(string memory _script) external {
|
|
299
|
+
_projectScripts.push(_script);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @notice Sets the preferred IPFS gateway.
|
|
304
|
+
* @param _gateway The new gateway URL.
|
|
305
|
+
*/
|
|
306
|
+
function setPreferredIPFSGateway(string memory _gateway) external {
|
|
307
|
+
_preferredIPFSGateway = _gateway;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @notice Sets the preferred Arweave gateway.
|
|
312
|
+
* @param _gateway The new gateway URL.
|
|
313
|
+
*/
|
|
314
|
+
function setPreferredArweaveGateway(string memory _gateway) external {
|
|
315
|
+
_preferredArweaveGateway = _gateway;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// =========================================================================
|
|
319
|
+
// Additional Interface Functions (commonly expected)
|
|
320
|
+
// =========================================================================
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @notice Returns the starting project ID for this contract.
|
|
324
|
+
* @return uint256 Starting project ID (always 0 for this mock).
|
|
325
|
+
*/
|
|
326
|
+
function startingProjectId() external pure returns (uint256) {
|
|
327
|
+
return 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* @notice Returns the next project ID for this contract.
|
|
332
|
+
* @return uint256 Next project ID (always 1 for this mock, since we have project 0).
|
|
333
|
+
*/
|
|
334
|
+
function nextProjectId() external pure returns (uint256) {
|
|
335
|
+
return 1;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @notice Returns project details.
|
|
340
|
+
* @param _projectId Project ID to query.
|
|
341
|
+
* @return projectName Project name.
|
|
342
|
+
* @return artist Artist name.
|
|
343
|
+
* @return description Project description.
|
|
344
|
+
* @return website Project website.
|
|
345
|
+
* @return license Project license.
|
|
346
|
+
*/
|
|
347
|
+
function projectDetails(
|
|
348
|
+
uint256 _projectId
|
|
349
|
+
)
|
|
350
|
+
external
|
|
351
|
+
pure
|
|
352
|
+
returns (
|
|
353
|
+
string memory projectName,
|
|
354
|
+
string memory artist,
|
|
355
|
+
string memory description,
|
|
356
|
+
string memory website,
|
|
357
|
+
string memory license
|
|
358
|
+
)
|
|
359
|
+
{
|
|
360
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
361
|
+
return (
|
|
362
|
+
"Mock Project",
|
|
363
|
+
"Mock Artist",
|
|
364
|
+
"A mock project for e2e testing",
|
|
365
|
+
"https://artblocks.io",
|
|
366
|
+
"MIT"
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* @notice Returns project state data.
|
|
372
|
+
* @param _projectId Project ID to query.
|
|
373
|
+
* @return invocations Current invocation count.
|
|
374
|
+
* @return maxInvocations Maximum invocations.
|
|
375
|
+
* @return active Whether project is active.
|
|
376
|
+
* @return paused Whether project is paused.
|
|
377
|
+
* @return completedTimestamp Completion timestamp.
|
|
378
|
+
* @return locked Whether project is locked.
|
|
379
|
+
*/
|
|
380
|
+
function projectStateData(
|
|
381
|
+
uint256 _projectId
|
|
382
|
+
)
|
|
383
|
+
external
|
|
384
|
+
pure
|
|
385
|
+
returns (
|
|
386
|
+
uint256 invocations,
|
|
387
|
+
uint256 maxInvocations,
|
|
388
|
+
bool active,
|
|
389
|
+
bool paused,
|
|
390
|
+
uint256 completedTimestamp,
|
|
391
|
+
bool locked
|
|
392
|
+
)
|
|
393
|
+
{
|
|
394
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
395
|
+
return (
|
|
396
|
+
MAX_TOKENS, // invocations
|
|
397
|
+
MAX_TOKENS, // maxInvocations
|
|
398
|
+
true, // active
|
|
399
|
+
false, // paused
|
|
400
|
+
0, // completedTimestamp (not completed)
|
|
401
|
+
false // locked
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @notice Returns the artist address for a project.
|
|
407
|
+
* @param _projectId Project ID to query.
|
|
408
|
+
* @return address The artist address (returns address(0) for mock).
|
|
409
|
+
*/
|
|
410
|
+
function projectIdToArtistAddress(
|
|
411
|
+
uint256 _projectId
|
|
412
|
+
) external pure returns (address payable) {
|
|
413
|
+
require(_projectId == PROJECT_ID, "Project does not exist");
|
|
414
|
+
return payable(address(0));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.22;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import "../interfaces/v0.8.x/IPMPV0.sol";
|
|
7
|
+
import "../interfaces/v0.8.x/IWeb3Call.sol";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @title Mock PMP (Project Metadata Parameters) Contract for E2E Testing
|
|
11
|
+
* @author Art Blocks Inc.
|
|
12
|
+
* @notice This is a minimal mock implementation of IPMPV0 and IWeb3Call
|
|
13
|
+
* for e2e integration testing on testnets.
|
|
14
|
+
* @dev This contract returns representative token params for token 0,
|
|
15
|
+
* and empty params for all other tokens. Write functions are no-ops.
|
|
16
|
+
*/
|
|
17
|
+
contract MockPMP is IPMPV0 {
|
|
18
|
+
// =========================================================================
|
|
19
|
+
// Constants
|
|
20
|
+
// =========================================================================
|
|
21
|
+
|
|
22
|
+
// Token 0 is the only token with configured PMP params
|
|
23
|
+
uint256 constant CONFIGURED_TOKEN_ID = 0;
|
|
24
|
+
|
|
25
|
+
// =========================================================================
|
|
26
|
+
// IWeb3Call Implementation (READ)
|
|
27
|
+
// =========================================================================
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @notice Get the token parameters for a given token.
|
|
31
|
+
* @param coreContract The address of the core contract to call.
|
|
32
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
33
|
+
* @return tokenParams An array of token parameters for the queried token.
|
|
34
|
+
* @dev Returns representative params for token 0, empty array for others.
|
|
35
|
+
*/
|
|
36
|
+
function getTokenParams(
|
|
37
|
+
address coreContract,
|
|
38
|
+
uint256 tokenId
|
|
39
|
+
)
|
|
40
|
+
external
|
|
41
|
+
pure
|
|
42
|
+
override
|
|
43
|
+
returns (IWeb3Call.TokenParam[] memory tokenParams)
|
|
44
|
+
{
|
|
45
|
+
// Silence unused variable warning
|
|
46
|
+
coreContract;
|
|
47
|
+
|
|
48
|
+
// Only token 0 has configured PMP params
|
|
49
|
+
if (tokenId != CONFIGURED_TOKEN_ID) {
|
|
50
|
+
// Return empty array for unconfigured tokens
|
|
51
|
+
return new IWeb3Call.TokenParam[](0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Return representative token params for token 0
|
|
55
|
+
// These simulate a typical PMP configuration with various param types
|
|
56
|
+
tokenParams = new IWeb3Call.TokenParam[](5);
|
|
57
|
+
|
|
58
|
+
// Color parameter (hex color)
|
|
59
|
+
tokenParams[0] = IWeb3Call.TokenParam({key: "color", value: "#FF5733"});
|
|
60
|
+
|
|
61
|
+
// Size parameter (uint256 range)
|
|
62
|
+
tokenParams[1] = IWeb3Call.TokenParam({key: "size", value: "42"});
|
|
63
|
+
|
|
64
|
+
// Enabled parameter (boolean)
|
|
65
|
+
tokenParams[2] = IWeb3Call.TokenParam({key: "enabled", value: "true"});
|
|
66
|
+
|
|
67
|
+
// Mode parameter (select option)
|
|
68
|
+
tokenParams[3] = IWeb3Call.TokenParam({key: "mode", value: "turbo"});
|
|
69
|
+
|
|
70
|
+
// Label parameter (string)
|
|
71
|
+
tokenParams[4] = IWeb3Call.TokenParam({
|
|
72
|
+
key: "label",
|
|
73
|
+
value: "Mock Token Label"
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return tokenParams;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// =========================================================================
|
|
80
|
+
// IPMPV0 Implementation (WRITE - No-ops for mock)
|
|
81
|
+
// =========================================================================
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @notice Configure the parameters for a specific token.
|
|
85
|
+
* @param coreContract The address of the core contract.
|
|
86
|
+
* @param tokenId The token ID to configure parameters for.
|
|
87
|
+
* @param pmpInputs Array of parameter inputs to configure.
|
|
88
|
+
* @dev No-op for mock - returns without throwing.
|
|
89
|
+
*/
|
|
90
|
+
function configureTokenParams(
|
|
91
|
+
address coreContract,
|
|
92
|
+
uint256 tokenId,
|
|
93
|
+
PMPInput[] calldata pmpInputs
|
|
94
|
+
) external pure override {
|
|
95
|
+
// Silence unused variable warnings
|
|
96
|
+
coreContract;
|
|
97
|
+
tokenId;
|
|
98
|
+
pmpInputs;
|
|
99
|
+
// No-op: Mock doesn't store anything, just returns successfully
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @notice Configure the available parameters for a project.
|
|
104
|
+
* @param coreContract The address of the core contract.
|
|
105
|
+
* @param projectId The project ID to configure parameters for.
|
|
106
|
+
* @param pmpInputConfigs Array of parameter configurations defining the available parameters.
|
|
107
|
+
* @dev No-op for mock - returns without throwing.
|
|
108
|
+
*/
|
|
109
|
+
function configureProject(
|
|
110
|
+
address coreContract,
|
|
111
|
+
uint256 projectId,
|
|
112
|
+
PMPInputConfig[] calldata pmpInputConfigs
|
|
113
|
+
) external pure override {
|
|
114
|
+
// Silence unused variable warnings
|
|
115
|
+
coreContract;
|
|
116
|
+
projectId;
|
|
117
|
+
pmpInputConfigs;
|
|
118
|
+
// No-op: Mock doesn't store anything, just returns successfully
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @notice Configure the hooks for a project.
|
|
123
|
+
* @param coreContract The address of the core contract.
|
|
124
|
+
* @param projectId The project ID to configure hooks for.
|
|
125
|
+
* @param tokenPMPPostConfigHook The hook to call after a token's PMP is configured.
|
|
126
|
+
* @param tokenPMPReadAugmentationHook The hook to call when reading a token's PMPs.
|
|
127
|
+
* @dev No-op for mock - returns without throwing.
|
|
128
|
+
*/
|
|
129
|
+
function configureProjectHooks(
|
|
130
|
+
address coreContract,
|
|
131
|
+
uint256 projectId,
|
|
132
|
+
IPMPConfigureHook tokenPMPPostConfigHook,
|
|
133
|
+
IPMPAugmentHook tokenPMPReadAugmentationHook
|
|
134
|
+
) external pure override {
|
|
135
|
+
// Silence unused variable warnings
|
|
136
|
+
coreContract;
|
|
137
|
+
projectId;
|
|
138
|
+
tokenPMPPostConfigHook;
|
|
139
|
+
tokenPMPReadAugmentationHook;
|
|
140
|
+
// No-op: Mock doesn't store anything, just returns successfully
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @notice Checks if the given wallet has the owner role for the given token.
|
|
145
|
+
* @param wallet The wallet address to check.
|
|
146
|
+
* @param coreContract The address of the core contract to call.
|
|
147
|
+
* @param tokenId The tokenId of the token to check.
|
|
148
|
+
* @return isTokenOwnerOrDelegate_ Always returns true for mock.
|
|
149
|
+
*/
|
|
150
|
+
function isTokenOwnerOrDelegate(
|
|
151
|
+
address wallet,
|
|
152
|
+
address coreContract,
|
|
153
|
+
uint256 tokenId
|
|
154
|
+
) external pure override returns (bool isTokenOwnerOrDelegate_) {
|
|
155
|
+
// Silence unused variable warnings
|
|
156
|
+
wallet;
|
|
157
|
+
coreContract;
|
|
158
|
+
tokenId;
|
|
159
|
+
// Mock always returns true for simplicity
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// =========================================================================
|
|
164
|
+
// Project Config View Functions
|
|
165
|
+
// =========================================================================
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @notice Get the project config for a given project.
|
|
169
|
+
* @param coreContract The address of the core contract to call.
|
|
170
|
+
* @param projectId The projectId of the project to get data for.
|
|
171
|
+
* @return pmpKeys The configured pmpKeys for the project.
|
|
172
|
+
* @return configNonce The config nonce for the project.
|
|
173
|
+
* @return tokenPMPPostConfigHook The tokenPMPPostConfigHook for the project.
|
|
174
|
+
* @return tokenPMPReadAugmentationHook The tokenPMPReadAugmentationHook for the project.
|
|
175
|
+
* @dev Returns representative mock config for project 0, empty for others.
|
|
176
|
+
*/
|
|
177
|
+
function getProjectConfig(
|
|
178
|
+
address coreContract,
|
|
179
|
+
uint256 projectId
|
|
180
|
+
)
|
|
181
|
+
external
|
|
182
|
+
pure
|
|
183
|
+
returns (
|
|
184
|
+
string[] memory pmpKeys,
|
|
185
|
+
uint8 configNonce,
|
|
186
|
+
IPMPConfigureHook tokenPMPPostConfigHook,
|
|
187
|
+
IPMPAugmentHook tokenPMPReadAugmentationHook
|
|
188
|
+
)
|
|
189
|
+
{
|
|
190
|
+
// Silence unused variable warning
|
|
191
|
+
coreContract;
|
|
192
|
+
|
|
193
|
+
// Only project 0 has configured PMP
|
|
194
|
+
if (projectId != 0) {
|
|
195
|
+
return (
|
|
196
|
+
new string[](0),
|
|
197
|
+
0,
|
|
198
|
+
IPMPConfigureHook(address(0)),
|
|
199
|
+
IPMPAugmentHook(address(0))
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Return representative project config matching the token params
|
|
204
|
+
pmpKeys = new string[](5);
|
|
205
|
+
pmpKeys[0] = "color";
|
|
206
|
+
pmpKeys[1] = "size";
|
|
207
|
+
pmpKeys[2] = "enabled";
|
|
208
|
+
pmpKeys[3] = "mode";
|
|
209
|
+
pmpKeys[4] = "label";
|
|
210
|
+
|
|
211
|
+
configNonce = 1;
|
|
212
|
+
tokenPMPPostConfigHook = IPMPConfigureHook(address(0));
|
|
213
|
+
tokenPMPReadAugmentationHook = IPMPAugmentHook(address(0));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @notice Get the PMP config for a given project and pmpKey.
|
|
218
|
+
* @param coreContract The address of the core contract to call.
|
|
219
|
+
* @param projectId The projectId of the project to get data for.
|
|
220
|
+
* @param pmpKey The pmpKey of the pmp to get data for.
|
|
221
|
+
* @return pmpConfigView The PMP config for the given project and pmpKey.
|
|
222
|
+
* @dev Returns representative config matching the mocked token params.
|
|
223
|
+
*/
|
|
224
|
+
function getProjectPMPConfig(
|
|
225
|
+
address coreContract,
|
|
226
|
+
uint256 projectId,
|
|
227
|
+
string memory pmpKey
|
|
228
|
+
) external pure returns (PMPConfigView memory pmpConfigView) {
|
|
229
|
+
// Silence unused variable warnings
|
|
230
|
+
coreContract;
|
|
231
|
+
projectId;
|
|
232
|
+
|
|
233
|
+
// Hash the key to determine which config to return
|
|
234
|
+
bytes32 keyHash = keccak256(abi.encodePacked(pmpKey));
|
|
235
|
+
|
|
236
|
+
// Initialize with defaults
|
|
237
|
+
pmpConfigView.highestConfigNonce = 1;
|
|
238
|
+
pmpConfigView.authOption = AuthOption.TokenOwner;
|
|
239
|
+
pmpConfigView.pmpLockedAfterTimestamp = 0; // Not locked
|
|
240
|
+
pmpConfigView.authAddress = address(0);
|
|
241
|
+
pmpConfigView.selectOptionsLength = 0;
|
|
242
|
+
pmpConfigView.selectOptions = new string[](0);
|
|
243
|
+
pmpConfigView.minRange = bytes32(0);
|
|
244
|
+
pmpConfigView.maxRange = bytes32(0);
|
|
245
|
+
|
|
246
|
+
// "color" - HexColor type
|
|
247
|
+
if (keyHash == keccak256(abi.encodePacked("color"))) {
|
|
248
|
+
pmpConfigView.paramType = ParamType.HexColor;
|
|
249
|
+
return pmpConfigView;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// "size" - Uint256Range type with min 0, max 100
|
|
253
|
+
if (keyHash == keccak256(abi.encodePacked("size"))) {
|
|
254
|
+
pmpConfigView.paramType = ParamType.Uint256Range;
|
|
255
|
+
pmpConfigView.minRange = bytes32(uint256(0));
|
|
256
|
+
pmpConfigView.maxRange = bytes32(uint256(100));
|
|
257
|
+
return pmpConfigView;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// "enabled" - Bool type
|
|
261
|
+
if (keyHash == keccak256(abi.encodePacked("enabled"))) {
|
|
262
|
+
pmpConfigView.paramType = ParamType.Bool;
|
|
263
|
+
return pmpConfigView;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// "mode" - Select type with options
|
|
267
|
+
if (keyHash == keccak256(abi.encodePacked("mode"))) {
|
|
268
|
+
pmpConfigView.paramType = ParamType.Select;
|
|
269
|
+
pmpConfigView.selectOptionsLength = 3;
|
|
270
|
+
pmpConfigView.selectOptions = new string[](3);
|
|
271
|
+
pmpConfigView.selectOptions[0] = "normal";
|
|
272
|
+
pmpConfigView.selectOptions[1] = "turbo";
|
|
273
|
+
pmpConfigView.selectOptions[2] = "eco";
|
|
274
|
+
return pmpConfigView;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// "label" - String type
|
|
278
|
+
if (keyHash == keccak256(abi.encodePacked("label"))) {
|
|
279
|
+
pmpConfigView.paramType = ParamType.String;
|
|
280
|
+
return pmpConfigView;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Unknown key - return unconfigured
|
|
284
|
+
pmpConfigView.paramType = ParamType.Unconfigured;
|
|
285
|
+
pmpConfigView.highestConfigNonce = 0;
|
|
286
|
+
}
|
|
287
|
+
}
|