@artblocks/contracts 1.3.1 → 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/IPMPV0.sol/IPMPV0.json +7 -1
- 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/MockPMPAugmentHook.sol/MockPMPAugmentHook.json +2 -2
- package/artifacts/contracts/mock/MockPMPConfigureHook.sol/MockPMPConfigureHook.json +2 -2
- 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 +9 -3
- 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/IPMPV0.sol +5 -3
- 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/PMPV0.sol +92 -98
- 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 +40 -25
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// !!!!! EXPERIMENTAL CONTRACT - NOT FOR PRODUCTION USE !!!!!
|
|
3
|
+
// USE AT YOUR OWN RISK. THIS CONTRACT HAS NOT BEEN AUDITED.
|
|
4
|
+
// Art Blocks Inc. assumes no liability for any loss or damage arising from use
|
|
5
|
+
// of this contract.
|
|
6
|
+
|
|
7
|
+
pragma solidity 0.8.22;
|
|
8
|
+
|
|
9
|
+
import {Ownable} from "@openzeppelin-5.0/contracts/access/Ownable.sol";
|
|
10
|
+
|
|
11
|
+
/// @notice Minimal interface for MinterSetPriceV5 purchaseTo function
|
|
12
|
+
/// @dev Only the purchaseTo function is needed for this utility
|
|
13
|
+
interface IMinterSetPriceV5 {
|
|
14
|
+
function purchaseTo(
|
|
15
|
+
address to,
|
|
16
|
+
uint256 projectId,
|
|
17
|
+
address coreContract
|
|
18
|
+
) external payable returns (uint256 tokenId);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title MintMulticallUtil
|
|
23
|
+
* @author Art Blocks Inc.
|
|
24
|
+
* @notice EXPERIMENTAL - NOT FOR PRODUCTION USE - USE AT YOUR OWN RISK
|
|
25
|
+
* @dev A personal "multicall" utility contract for MinterSetPriceV5.
|
|
26
|
+
* Enables a single transaction to call `purchaseTo` on the minter N times,
|
|
27
|
+
* effectively batching multiple mints into one transaction.
|
|
28
|
+
*
|
|
29
|
+
* WARNING: This contract is experimental and has not been audited. It is
|
|
30
|
+
* provided as-is with no guarantees. Use at your own risk.
|
|
31
|
+
*/
|
|
32
|
+
contract MintMulticallUtil is Ownable {
|
|
33
|
+
/// @notice Emitted after each successful mint
|
|
34
|
+
/// @param tokenId The token ID of the newly minted token
|
|
35
|
+
/// @param to The address that received the minted token
|
|
36
|
+
event TokenMinted(uint256 indexed tokenId, address indexed to);
|
|
37
|
+
|
|
38
|
+
/// @notice Error thrown when array length does not match numMints
|
|
39
|
+
error ArrayLengthMismatch();
|
|
40
|
+
/// @notice Error thrown when numMints is zero
|
|
41
|
+
error ZeroMints();
|
|
42
|
+
/// @notice Error thrown when a refund transfer fails
|
|
43
|
+
error RefundFailed();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Constructor sets the owner of this contract.
|
|
47
|
+
* @param owner_ The address that will own this contract and be
|
|
48
|
+
* authorized to call purchaseToMulti.
|
|
49
|
+
*/
|
|
50
|
+
constructor(address owner_) Ownable(owner_) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Calls purchaseTo on the given minter contract `numMints` times
|
|
54
|
+
* in a single transaction.
|
|
55
|
+
* @dev Only callable by the contract owner. Forwards equal shares of
|
|
56
|
+
* msg.value to each purchaseTo call. Any remaining ETH after all mints
|
|
57
|
+
* is refunded to the caller.
|
|
58
|
+
* @param minter The MinterSetPriceV5 contract address to call
|
|
59
|
+
* purchaseTo on.
|
|
60
|
+
* @param numMints The number of tokens to mint.
|
|
61
|
+
* @param toAddresses An array of addresses to mint tokens to, with
|
|
62
|
+
* length equal to numMints.
|
|
63
|
+
* @param projectId The project ID on the core contract to mint from.
|
|
64
|
+
* @param coreContract The Art Blocks core contract address.
|
|
65
|
+
*/
|
|
66
|
+
function purchaseToMulti(
|
|
67
|
+
address minter,
|
|
68
|
+
uint256 numMints,
|
|
69
|
+
address[] calldata toAddresses,
|
|
70
|
+
uint256 projectId,
|
|
71
|
+
address coreContract
|
|
72
|
+
) external payable onlyOwner {
|
|
73
|
+
if (numMints == 0) {
|
|
74
|
+
revert ZeroMints();
|
|
75
|
+
}
|
|
76
|
+
if (toAddresses.length != numMints) {
|
|
77
|
+
revert ArrayLengthMismatch();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
uint256 pricePerMint = msg.value / numMints;
|
|
81
|
+
|
|
82
|
+
for (uint256 i = 0; i < numMints; ) {
|
|
83
|
+
uint256 tokenId = IMinterSetPriceV5(minter).purchaseTo{
|
|
84
|
+
value: pricePerMint
|
|
85
|
+
}(toAddresses[i], projectId, coreContract);
|
|
86
|
+
|
|
87
|
+
emit TokenMinted(tokenId, toAddresses[i]);
|
|
88
|
+
|
|
89
|
+
unchecked {
|
|
90
|
+
++i;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Refund any remaining ETH (from rounding)
|
|
95
|
+
uint256 remaining = address(this).balance;
|
|
96
|
+
if (remaining > 0) {
|
|
97
|
+
(bool success, ) = payable(msg.sender).call{value: remaining}("");
|
|
98
|
+
if (!success) {
|
|
99
|
+
revert RefundFailed();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -312,6 +312,8 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
312
312
|
ProjectConfig storage projectConfig = projectConfigs[coreContract][
|
|
313
313
|
ABHelpers.tokenIdToProjectId(tokenId)
|
|
314
314
|
];
|
|
315
|
+
// preallocate memory for auth addresses of each pmpInput
|
|
316
|
+
address[] memory authAddresses = new address[](pmpInputs.length);
|
|
315
317
|
// assign each pmpInput to the token
|
|
316
318
|
// @dev pmpInputs processed sequentially in order of input
|
|
317
319
|
for (uint256 i = 0; i < pmpInputs.length; i++) {
|
|
@@ -322,8 +324,8 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
322
324
|
];
|
|
323
325
|
PMPConfigStorage storage pmpConfigStorage = projectConfig
|
|
324
326
|
.pmpConfigsStorage[pmpKeyHash];
|
|
325
|
-
// validate pmpInput
|
|
326
|
-
_validatePMPInputAndAuth({
|
|
327
|
+
// validate pmpInput + record the authenticated address used to configure the pmpInput
|
|
328
|
+
authAddresses[i] = _validatePMPInputAndAuth({
|
|
327
329
|
tokenId: tokenId,
|
|
328
330
|
coreContract: coreContract,
|
|
329
331
|
pmpInput: pmpInput,
|
|
@@ -360,7 +362,8 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
360
362
|
emit TokenParamsConfigured({
|
|
361
363
|
coreContract: coreContract,
|
|
362
364
|
tokenId: tokenId,
|
|
363
|
-
pmpInputs: pmpInputs
|
|
365
|
+
pmpInputs: pmpInputs,
|
|
366
|
+
authAddresses: authAddresses
|
|
364
367
|
});
|
|
365
368
|
}
|
|
366
369
|
|
|
@@ -479,20 +482,19 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
479
482
|
* @param wallet The wallet address to check.
|
|
480
483
|
* @param coreContract The address of the core contract to call.
|
|
481
484
|
* @param tokenId The tokenId of the token to check.
|
|
482
|
-
* @return
|
|
485
|
+
* @return isTokenOwnerOrDelegate_ True if the wallet is the owner or a delegate of the token,
|
|
483
486
|
* false otherwise.
|
|
484
487
|
*/
|
|
485
488
|
function isTokenOwnerOrDelegate(
|
|
486
489
|
address wallet,
|
|
487
490
|
address coreContract,
|
|
488
491
|
uint256 tokenId
|
|
489
|
-
) external view returns (bool) {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
});
|
|
492
|
+
) external view returns (bool isTokenOwnerOrDelegate_) {
|
|
493
|
+
(isTokenOwnerOrDelegate_, ) = _isTokenOwnerOrDelegate({
|
|
494
|
+
tokenId: tokenId,
|
|
495
|
+
coreContract: coreContract,
|
|
496
|
+
sender: wallet
|
|
497
|
+
});
|
|
496
498
|
}
|
|
497
499
|
|
|
498
500
|
/**
|
|
@@ -707,6 +709,7 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
707
709
|
* @param pmpInput The parameter input to validate.
|
|
708
710
|
* @param pmpConfigStorage The project's configuration storage for this parameter.
|
|
709
711
|
* @param projectConfigNonce The project's current configuration nonce.
|
|
712
|
+
* @return permissionedAddress the address used to make the update, accounting for delegation.
|
|
710
713
|
*/
|
|
711
714
|
function _validatePMPInputAndAuth(
|
|
712
715
|
uint256 tokenId,
|
|
@@ -714,7 +717,7 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
714
717
|
PMPInput memory pmpInput,
|
|
715
718
|
PMPConfigStorage storage pmpConfigStorage,
|
|
716
719
|
uint8 projectConfigNonce
|
|
717
|
-
) internal view {
|
|
720
|
+
) internal view returns (address permissionedAddress) {
|
|
718
721
|
// check that the param is part of the project's most recently configured PMP params
|
|
719
722
|
// @dev use config nonce to check if param is part of most recently configured PMP params
|
|
720
723
|
require(
|
|
@@ -733,88 +736,79 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
733
736
|
);
|
|
734
737
|
|
|
735
738
|
// ensure caller has appropriate auth
|
|
739
|
+
bool isAuthenticated;
|
|
736
740
|
{
|
|
737
|
-
|
|
741
|
+
AuthOption authOption = pmpConfigStorage.authOption;
|
|
742
|
+
// if artist may configure, check and authenticate if not already authenticated
|
|
743
|
+
if (
|
|
744
|
+
authOption == AuthOption.Artist ||
|
|
745
|
+
authOption == AuthOption.ArtistAndAddress ||
|
|
746
|
+
authOption == AuthOption.ArtistAndTokenOwner ||
|
|
747
|
+
authOption == AuthOption.ArtistAndTokenOwnerAndAddress
|
|
748
|
+
) {
|
|
749
|
+
bool isArtist;
|
|
750
|
+
(isArtist, permissionedAddress) = _isArtist({
|
|
751
|
+
tokenId: tokenId,
|
|
752
|
+
coreContract: coreContract,
|
|
753
|
+
sender: msg.sender
|
|
754
|
+
});
|
|
755
|
+
isAuthenticated = isArtist;
|
|
756
|
+
}
|
|
757
|
+
// if address may configure, check and authenticate if not already authenticated
|
|
758
|
+
if (
|
|
759
|
+
!isAuthenticated &&
|
|
760
|
+
(authOption == AuthOption.Address ||
|
|
761
|
+
authOption == AuthOption.TokenOwnerAndAddress ||
|
|
762
|
+
authOption == AuthOption.ArtistAndAddress ||
|
|
763
|
+
authOption == AuthOption.ArtistAndTokenOwnerAndAddress)
|
|
764
|
+
) {
|
|
765
|
+
permissionedAddress = pmpConfigStorage.authAddress;
|
|
766
|
+
isAuthenticated = permissionedAddress == msg.sender;
|
|
767
|
+
}
|
|
768
|
+
// if token owner or delegate may configure, check and authenticate
|
|
769
|
+
// @dev check token ownerlast to enable pre-mint PMP configuration by non-token-owner
|
|
770
|
+
if (
|
|
771
|
+
!isAuthenticated &&
|
|
772
|
+
(authOption == AuthOption.TokenOwner ||
|
|
773
|
+
authOption == AuthOption.ArtistAndTokenOwner ||
|
|
774
|
+
authOption == AuthOption.TokenOwnerAndAddress ||
|
|
775
|
+
authOption == AuthOption.ArtistAndTokenOwnerAndAddress)
|
|
776
|
+
) {
|
|
777
|
+
bool isTokenOwnerOrDelegate_;
|
|
778
|
+
(
|
|
779
|
+
isTokenOwnerOrDelegate_,
|
|
780
|
+
permissionedAddress
|
|
781
|
+
) = _isTokenOwnerOrDelegate({
|
|
782
|
+
tokenId: tokenId,
|
|
783
|
+
coreContract: coreContract,
|
|
784
|
+
sender: msg.sender
|
|
785
|
+
});
|
|
786
|
+
isAuthenticated = isTokenOwnerOrDelegate_;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
// if not authenticated, revert with appropriate auth error
|
|
790
|
+
if (!isAuthenticated) {
|
|
738
791
|
AuthOption authOption = pmpConfigStorage.authOption;
|
|
739
792
|
if (authOption == AuthOption.Artist) {
|
|
740
|
-
|
|
741
|
-
_isArtist({
|
|
742
|
-
tokenId: tokenId,
|
|
743
|
-
coreContract: coreContract,
|
|
744
|
-
sender: msg.sender
|
|
745
|
-
}),
|
|
746
|
-
"PMP: artist auth required"
|
|
747
|
-
);
|
|
793
|
+
revert("PMP: artist auth required");
|
|
748
794
|
} else if (authOption == AuthOption.TokenOwner) {
|
|
749
|
-
|
|
750
|
-
_isTokenOwnerOrDelegate({
|
|
751
|
-
tokenId: tokenId,
|
|
752
|
-
coreContract: coreContract,
|
|
753
|
-
sender: msg.sender
|
|
754
|
-
}),
|
|
755
|
-
"PMP: token owner auth required"
|
|
756
|
-
);
|
|
795
|
+
revert("PMP: token owner auth required");
|
|
757
796
|
} else if (authOption == AuthOption.ArtistAndTokenOwner) {
|
|
758
|
-
|
|
759
|
-
require(
|
|
760
|
-
_isArtist({
|
|
761
|
-
tokenId: tokenId,
|
|
762
|
-
coreContract: coreContract,
|
|
763
|
-
sender: msg.sender
|
|
764
|
-
}) ||
|
|
765
|
-
_isTokenOwnerOrDelegate({
|
|
766
|
-
tokenId: tokenId,
|
|
767
|
-
coreContract: coreContract,
|
|
768
|
-
sender: msg.sender
|
|
769
|
-
}),
|
|
770
|
-
"PMP: artist and token owner auth required"
|
|
771
|
-
);
|
|
797
|
+
revert("PMP: artist and token owner auth required");
|
|
772
798
|
} else if (authOption == AuthOption.Address) {
|
|
773
|
-
|
|
774
|
-
msg.sender == pmpConfigStorage.authAddress,
|
|
775
|
-
"PMP: address auth required"
|
|
776
|
-
);
|
|
799
|
+
revert("PMP: address auth required");
|
|
777
800
|
} else if (authOption == AuthOption.ArtistAndTokenOwnerAndAddress) {
|
|
778
|
-
|
|
779
|
-
require(
|
|
780
|
-
_isArtist({
|
|
781
|
-
tokenId: tokenId,
|
|
782
|
-
coreContract: coreContract,
|
|
783
|
-
sender: msg.sender
|
|
784
|
-
}) ||
|
|
785
|
-
msg.sender == pmpConfigStorage.authAddress ||
|
|
786
|
-
_isTokenOwnerOrDelegate({
|
|
787
|
-
tokenId: tokenId,
|
|
788
|
-
coreContract: coreContract,
|
|
789
|
-
sender: msg.sender
|
|
790
|
-
}),
|
|
791
|
-
"PMP: artist and token owner and address auth required"
|
|
792
|
-
);
|
|
801
|
+
revert("PMP: artist and token owner and address auth required");
|
|
793
802
|
} else if (authOption == AuthOption.ArtistAndAddress) {
|
|
794
|
-
|
|
795
|
-
_isArtist({
|
|
796
|
-
tokenId: tokenId,
|
|
797
|
-
coreContract: coreContract,
|
|
798
|
-
sender: msg.sender
|
|
799
|
-
}) || msg.sender == pmpConfigStorage.authAddress,
|
|
800
|
-
"PMP: artist and address auth required"
|
|
801
|
-
);
|
|
803
|
+
revert("PMP: artist and address auth required");
|
|
802
804
|
} else if (authOption == AuthOption.TokenOwnerAndAddress) {
|
|
803
|
-
|
|
804
|
-
require(
|
|
805
|
-
msg.sender == pmpConfigStorage.authAddress ||
|
|
806
|
-
_isTokenOwnerOrDelegate({
|
|
807
|
-
tokenId: tokenId,
|
|
808
|
-
coreContract: coreContract,
|
|
809
|
-
sender: msg.sender
|
|
810
|
-
}),
|
|
811
|
-
"PMP: token owner and address auth required"
|
|
812
|
-
);
|
|
805
|
+
revert("PMP: token owner and address auth required");
|
|
813
806
|
} else {
|
|
814
807
|
// @dev no coverage, this should never be reached
|
|
815
808
|
revert("PMP: invalid authOption");
|
|
816
809
|
}
|
|
817
810
|
}
|
|
811
|
+
// @dev auth check is complete
|
|
818
812
|
|
|
819
813
|
// ensure properly configured value
|
|
820
814
|
ParamType paramType = pmpConfigStorage.paramType;
|
|
@@ -875,12 +869,13 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
875
869
|
// require artist is caller if configuring artist string
|
|
876
870
|
if (pmpInput.configuringArtistString) {
|
|
877
871
|
// require artist is caller
|
|
872
|
+
(bool isArtist, ) = _isArtist({
|
|
873
|
+
tokenId: tokenId,
|
|
874
|
+
coreContract: coreContract,
|
|
875
|
+
sender: msg.sender
|
|
876
|
+
});
|
|
878
877
|
require(
|
|
879
|
-
|
|
880
|
-
tokenId: tokenId,
|
|
881
|
-
coreContract: coreContract,
|
|
882
|
-
sender: msg.sender
|
|
883
|
-
}),
|
|
878
|
+
isArtist,
|
|
884
879
|
"PMP: artist auth required to configure artist string"
|
|
885
880
|
);
|
|
886
881
|
}
|
|
@@ -1020,17 +1015,18 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
1020
1015
|
* @param tokenId The token ID to get the project ID from.
|
|
1021
1016
|
* @param coreContract The address of the core contract.
|
|
1022
1017
|
* @param sender The address to check if it's the artist.
|
|
1023
|
-
* @return
|
|
1018
|
+
* @return isArtist true if the sender is the artist, false otherwise.
|
|
1019
|
+
* @return artistAddress the address of the artist.
|
|
1024
1020
|
*/
|
|
1025
1021
|
function _isArtist(
|
|
1026
1022
|
uint256 tokenId,
|
|
1027
1023
|
address coreContract,
|
|
1028
1024
|
address sender
|
|
1029
|
-
) internal view returns (bool) {
|
|
1025
|
+
) internal view returns (bool isArtist, address artistAddress) {
|
|
1030
1026
|
uint256 projectId = ABHelpers.tokenIdToProjectId(tokenId);
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1027
|
+
artistAddress = IGenArt721CoreContractV3_Base(coreContract)
|
|
1028
|
+
.projectIdToArtistAddress(projectId);
|
|
1029
|
+
isArtist = artistAddress == sender;
|
|
1034
1030
|
}
|
|
1035
1031
|
|
|
1036
1032
|
/**
|
|
@@ -1041,21 +1037,19 @@ contract PMPV0 is IPMPV0, Web3Call, ReentrancyGuard {
|
|
|
1041
1037
|
* @param tokenId The token ID to check ownership for.
|
|
1042
1038
|
* @param coreContract The address of the core contract.
|
|
1043
1039
|
* @param sender The address to check if it's the token owner.
|
|
1044
|
-
* @return
|
|
1040
|
+
* @return isTokenOwnerOrDelegate_ true if the sender is the token owner or delegate of the token owner, false otherwise.
|
|
1041
|
+
* @return tokenOwner the address of the token owner.
|
|
1045
1042
|
* @dev Always execute within a nonReentrant context.
|
|
1046
1043
|
*/
|
|
1047
1044
|
function _isTokenOwnerOrDelegate(
|
|
1048
1045
|
uint256 tokenId,
|
|
1049
1046
|
address coreContract,
|
|
1050
1047
|
address sender
|
|
1051
|
-
) internal view returns (bool) {
|
|
1048
|
+
) internal view returns (bool isTokenOwnerOrDelegate_, address tokenOwner) {
|
|
1052
1049
|
// @dev leading interaction - only execute within a nonReentrant context
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}
|
|
1057
|
-
// @dev delegate.xyz v2 support
|
|
1058
|
-
return
|
|
1050
|
+
tokenOwner = IERC721(coreContract).ownerOf(tokenId);
|
|
1051
|
+
isTokenOwnerOrDelegate_ =
|
|
1052
|
+
(tokenOwner == sender) ||
|
|
1059
1053
|
delegateRegistry.checkDelegateForERC721({
|
|
1060
1054
|
to: sender, // hot wallet
|
|
1061
1055
|
from: tokenOwner, // vault
|