@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,229 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Creatd By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title ISRHooks
|
|
8
|
+
* @author Art Blocks Inc.
|
|
9
|
+
* @notice This interface defines the custom events and functions for the SRHooks contract.
|
|
10
|
+
* It does not include any of the IPMPV0 events, which are indexed separately.
|
|
11
|
+
*/
|
|
12
|
+
interface ISRHooks {
|
|
13
|
+
/**
|
|
14
|
+
* @notice Emitted when the contract is initialized
|
|
15
|
+
* @param coreContractAddress The address of the core contract.
|
|
16
|
+
* @param coreProjectId The project ID of the core contract.
|
|
17
|
+
*/
|
|
18
|
+
event SRHooksInitialized(
|
|
19
|
+
address coreContractAddress,
|
|
20
|
+
uint256 coreProjectId
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @notice Emitted when the tokens sending to a token are updated
|
|
25
|
+
* @param coreContract The address of the core contract.
|
|
26
|
+
* @param tokenId The ID of the token.
|
|
27
|
+
* @param tokensSendingTo The tokens sending to the token.
|
|
28
|
+
*/
|
|
29
|
+
event TokenSendingToUpdated(
|
|
30
|
+
address indexed coreContract,
|
|
31
|
+
uint256 indexed tokenId,
|
|
32
|
+
uint16[] tokensSendingTo
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @notice Emitted when the tokens sending to a token are updated
|
|
37
|
+
* @param coreContract The address of the core contract.
|
|
38
|
+
* @param tokenId The ID of the token.
|
|
39
|
+
* @param tokensReceivingFrom The tokens receiving from the token.
|
|
40
|
+
*/
|
|
41
|
+
event TokenReceivingFromUpdated(
|
|
42
|
+
address indexed coreContract,
|
|
43
|
+
uint256 indexed tokenId,
|
|
44
|
+
uint16[] tokensReceivingFrom
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @notice Struct for the token metadata calldata.
|
|
49
|
+
* @param updateImage Whether to update the image data.
|
|
50
|
+
* @param imageDataCompressed The compressed image data.
|
|
51
|
+
* @param updateSound Whether to update the sound data.
|
|
52
|
+
* @param soundDataCompressed The compressed sound data.
|
|
53
|
+
*/
|
|
54
|
+
struct TokenMetadataCalldata {
|
|
55
|
+
bool updateImage; // true if updating the image data
|
|
56
|
+
bytes imageDataCompressed; // non-empty if updating the image data
|
|
57
|
+
bool updateSound; // true if updating the sound data
|
|
58
|
+
bytes soundDataCompressed; // may be empty to clear the sound data, non-empty if setting the sound data
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @notice Struct for the token metadata view.
|
|
63
|
+
* @param imageDataCompressed The compressed image data.
|
|
64
|
+
* @param imageVersion The version of the image data.
|
|
65
|
+
* @param soundDataCompressed The compressed sound data.
|
|
66
|
+
* @param soundVersion The version of the sound data.
|
|
67
|
+
*/
|
|
68
|
+
struct TokenMetadataView {
|
|
69
|
+
bytes imageDataCompressed;
|
|
70
|
+
uint16 imageVersion;
|
|
71
|
+
bytes soundDataCompressed;
|
|
72
|
+
uint16 soundVersion;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
struct TokenLiveData {
|
|
76
|
+
uint256 tokenNumber;
|
|
77
|
+
address ownerAddress;
|
|
78
|
+
bytes imageDataCompressed;
|
|
79
|
+
bytes soundDataCompressed;
|
|
80
|
+
string ownerEnsName;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// enum for the different possible states of a token's SR configuration
|
|
84
|
+
enum SendStates {
|
|
85
|
+
Neutral,
|
|
86
|
+
SendGeneral,
|
|
87
|
+
SendTo
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
enum ReceiveStates {
|
|
91
|
+
Neutral,
|
|
92
|
+
ReceiveGeneral,
|
|
93
|
+
ReceiveFrom,
|
|
94
|
+
ReceiveTo
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @notice Updates the state and metadata for a given token.
|
|
99
|
+
* Reverts if the token number is invalid or the msg.sender is not owner or valid delegate.xyz V2 of token owner.
|
|
100
|
+
* Reverts if invalid configuration is provided.
|
|
101
|
+
* Includes two boolean flags to update the send and receive states and token metadata separately, in a single function call.
|
|
102
|
+
* Never allows updating to a slot that is invalid.
|
|
103
|
+
* @param tokenNumber The token number to update.
|
|
104
|
+
* @param updateSendState Whether to update the send state.
|
|
105
|
+
* @param sendState The new send state. Valid values are SendGeneral, SendTo, Neutral.
|
|
106
|
+
* @param tokensSendingTo Tokens to send this token to. Only non-empty iff updateSendState is true and sendState is SendTo.
|
|
107
|
+
* Duplicates are automatically deduplicated when calculating dilution rates.
|
|
108
|
+
* @param updateReceiveState Whether to update the receive state.
|
|
109
|
+
* @param receiveState The new receive state. Valid values are ReceiveGeneral, ReceiveFrom, Neutral.
|
|
110
|
+
* @param tokensReceivingFrom Tokens this token is open to receive from. Only non-empty iff updateReceiveState is true and receiveState is ReceiveFrom.
|
|
111
|
+
* Duplicates and self-referential entries are automatically filtered in getLiveData results.
|
|
112
|
+
* @param updateTokenMetadata Whether to update the token metadata.
|
|
113
|
+
* @param updatedActiveSlot The new active slot. If updating token metadata, this is the new active slot.
|
|
114
|
+
* @param tokenMetadataCalldata The new token metadata. If updating token metadata, this is the new token metadata at the updated active slot. Only non-empty iff updateTokenMetadata is true.
|
|
115
|
+
*/
|
|
116
|
+
function updateTokenStateAndMetadata(
|
|
117
|
+
uint256 tokenNumber,
|
|
118
|
+
bool updateSendState,
|
|
119
|
+
SendStates sendState,
|
|
120
|
+
uint16[] memory tokensSendingTo,
|
|
121
|
+
bool updateReceiveState,
|
|
122
|
+
ReceiveStates receiveState,
|
|
123
|
+
uint16[] memory tokensReceivingFrom,
|
|
124
|
+
bool updateTokenMetadata,
|
|
125
|
+
uint256 updatedActiveSlot,
|
|
126
|
+
TokenMetadataCalldata memory tokenMetadataCalldata
|
|
127
|
+
) external;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @notice Gets the live data for a given token.
|
|
131
|
+
* @param tokenNumber The token number to get the live data for.
|
|
132
|
+
* @param blockNumber The block number to get the live data for. Must be in latest 256 blocks.
|
|
133
|
+
* @param maxReceive The maximum number of tokens to receive, in each array of receivedTokensGeneral and receivedTokensTo.
|
|
134
|
+
* maxReceive must be less than or equal to MAX_RECEIVE_RATE_PER_BLOCK.
|
|
135
|
+
* Treats block number of 0 as latest completed block.
|
|
136
|
+
* Reverts if block number is in future - need block hash to be defined.
|
|
137
|
+
* NOTE: Each array of receivedTokensGeneral and receivedTokensTo has a maximum length of maxReceive,
|
|
138
|
+
* but their combined length may be greater than maxReceive. The art script should handle this by
|
|
139
|
+
* deterministically shuffling/sampling from the arrays if desired.
|
|
140
|
+
* WARNING: This function is designed for off-chain view calls only and may exceed block gas limits in cases where
|
|
141
|
+
* a token has many senders or is receiving from many tokens. It is not intended to be called within transactions.
|
|
142
|
+
* WARNING: Self-referential SendGeneral and SendTo tokens may be included in the results.
|
|
143
|
+
* @return sendState The send state of the token.
|
|
144
|
+
* @return receiveState The receive state of the token.
|
|
145
|
+
* @return receivedTokensGeneral The received tokens general of the token.
|
|
146
|
+
* @return receivedTokensTo The received tokens to of the token.
|
|
147
|
+
* @return numSendGeneral The number of tokens in the send general pool.
|
|
148
|
+
* @return numReceiveGeneral The number of tokens in the receive general pool.
|
|
149
|
+
* @return numSendingToMe The number of tokens sending to me.
|
|
150
|
+
* @return usedBlockNumber The block number used to generate the random numbers.
|
|
151
|
+
*/
|
|
152
|
+
function getLiveData(
|
|
153
|
+
uint256 tokenNumber,
|
|
154
|
+
uint256 blockNumber,
|
|
155
|
+
uint256 maxReceive
|
|
156
|
+
)
|
|
157
|
+
external
|
|
158
|
+
view
|
|
159
|
+
returns (
|
|
160
|
+
SendStates sendState,
|
|
161
|
+
ReceiveStates receiveState,
|
|
162
|
+
TokenLiveData[] memory receivedTokensGeneral,
|
|
163
|
+
TokenLiveData[] memory receivedTokensTo,
|
|
164
|
+
uint256 numSendGeneral,
|
|
165
|
+
uint256 numReceiveGeneral,
|
|
166
|
+
uint256 numSendingToMe,
|
|
167
|
+
uint256 usedBlockNumber
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @notice Gets the state of the general pools.
|
|
172
|
+
* @return sendGeneralTokensLength The length of the send general tokens.
|
|
173
|
+
* @return receiveGeneralTokensLength The length of the receive general tokens.
|
|
174
|
+
*/
|
|
175
|
+
function getGeneralPoolState()
|
|
176
|
+
external
|
|
177
|
+
view
|
|
178
|
+
returns (
|
|
179
|
+
uint256 sendGeneralTokensLength,
|
|
180
|
+
uint256 receiveGeneralTokensLength
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @notice Gets the state of a given token.
|
|
185
|
+
* @param tokenNumber The token number to get the state for.
|
|
186
|
+
* @return sendState The send state.
|
|
187
|
+
* @return receiveState The receive state.
|
|
188
|
+
* @return tokensSendingTo The tokens sending to the token.
|
|
189
|
+
* @return tokensReceivingFrom The tokens receiving from the token.
|
|
190
|
+
* @return activeSlot The active slot.
|
|
191
|
+
* @return activeSlotTokenMetadata The token metadata at the active slot.
|
|
192
|
+
* @return ownerAddress The address of the token owner.
|
|
193
|
+
*/
|
|
194
|
+
function getTokenState(
|
|
195
|
+
uint256 tokenNumber
|
|
196
|
+
)
|
|
197
|
+
external
|
|
198
|
+
view
|
|
199
|
+
returns (
|
|
200
|
+
SendStates sendState,
|
|
201
|
+
ReceiveStates receiveState,
|
|
202
|
+
uint16[] memory tokensSendingTo,
|
|
203
|
+
uint16[] memory tokensReceivingFrom,
|
|
204
|
+
uint256 activeSlot,
|
|
205
|
+
TokenMetadataView memory activeSlotTokenMetadata,
|
|
206
|
+
address ownerAddress
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @notice Gets the token metadata at a given slot.
|
|
211
|
+
* @param tokenNumber The token number to get the token metadata for.
|
|
212
|
+
* @param slot The slot to get the token metadata for.
|
|
213
|
+
* @return tokenMetadata The token metadata at the given slot.
|
|
214
|
+
*/
|
|
215
|
+
function getTokenMetadataAtSlot(
|
|
216
|
+
uint256 tokenNumber,
|
|
217
|
+
uint256 slot
|
|
218
|
+
) external view returns (TokenMetadataView memory tokenMetadata);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @notice Gets the tokens sending to a given token.
|
|
222
|
+
* WARNING: This function is unbounded in gas cost, and is designed to be used by view accessors only. Use with caution.
|
|
223
|
+
* @param tokenNumber The token number to get the tokens sending to for.
|
|
224
|
+
* @return tokensSendingTo The token numbers sending to the given token.
|
|
225
|
+
*/
|
|
226
|
+
function getTokensSendingToToken(
|
|
227
|
+
uint256 tokenNumber
|
|
228
|
+
) external view returns (uint256[] memory tokensSendingTo);
|
|
229
|
+
}
|
|
@@ -10,10 +10,4 @@ interface ISeaDropShimForContract {
|
|
|
10
10
|
* @param nftContract The address of the NFT contract that this shim contract is compatible with
|
|
11
11
|
*/
|
|
12
12
|
event SeaDropShimForContract(address nftContract);
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @dev Emit event when the local max supply is updated
|
|
16
|
-
* @param newLocalMaxSupply The new local max supply
|
|
17
|
-
*/
|
|
18
|
-
event LocalMaxSupplyUpdated(uint256 newLocalMaxSupply);
|
|
19
13
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 This interface adds support for tiered allowlist pricing.
|
|
8
|
+
* @notice Intended for shared minters that expose both a public price and a
|
|
9
|
+
* privileged allowlist price, and that can resolve the effective price for a
|
|
10
|
+
* given wallet.
|
|
11
|
+
* @author Art Blocks Inc.
|
|
12
|
+
*/
|
|
13
|
+
interface ISharedMinterTieredAllowV0 {
|
|
14
|
+
/**
|
|
15
|
+
* @notice Gets if price is configured, allowlist price of minting a token
|
|
16
|
+
* on project `projectId`, and currency symbol and address to be used as
|
|
17
|
+
* payment.
|
|
18
|
+
* @param projectId Project ID to get allowlist price information for
|
|
19
|
+
* @param coreContract Contract address of the core contract
|
|
20
|
+
* @return isConfigured true only if prices have been configured on this
|
|
21
|
+
* minter
|
|
22
|
+
* @return tokenPriceInWei current allowlist price of token on this minter
|
|
23
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
24
|
+
* minter
|
|
25
|
+
* @return currencyAddress currency address for purchases of project on
|
|
26
|
+
* this minter
|
|
27
|
+
*/
|
|
28
|
+
function getAllowlistPriceInfo(
|
|
29
|
+
uint256 projectId,
|
|
30
|
+
address coreContract
|
|
31
|
+
)
|
|
32
|
+
external
|
|
33
|
+
view
|
|
34
|
+
returns (
|
|
35
|
+
bool isConfigured,
|
|
36
|
+
uint256 tokenPriceInWei,
|
|
37
|
+
string memory currencySymbol,
|
|
38
|
+
address currencyAddress
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @notice Returns the effective price for a given wallet address on
|
|
43
|
+
* project `projectId`. If the wallet is allowlisted, returns the
|
|
44
|
+
* allowlist price; otherwise returns the public price.
|
|
45
|
+
* @param projectId Project ID to get price information for
|
|
46
|
+
* @param coreContract Contract address of the core contract
|
|
47
|
+
* @param wallet Address to check the effective price for
|
|
48
|
+
* @return isConfigured true only if prices have been configured for the
|
|
49
|
+
* project
|
|
50
|
+
* @return tokenPriceInWei effective price per token for the given wallet
|
|
51
|
+
* @return currencySymbol currency symbol for purchases of project on this
|
|
52
|
+
* minter
|
|
53
|
+
* @return currencyAddress currency address for purchases of project on
|
|
54
|
+
* this minter
|
|
55
|
+
*/
|
|
56
|
+
function getPriceInfoForAddress(
|
|
57
|
+
uint256 projectId,
|
|
58
|
+
address coreContract,
|
|
59
|
+
address wallet
|
|
60
|
+
)
|
|
61
|
+
external
|
|
62
|
+
view
|
|
63
|
+
returns (
|
|
64
|
+
bool isConfigured,
|
|
65
|
+
uint256 tokenPriceInWei,
|
|
66
|
+
string memory currencySymbol,
|
|
67
|
+
address currencyAddress
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {IERC165} from "@openzeppelin-5.0/contracts/interfaces/IERC165.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Transfer hook interface for Art Blocks V3 Engine cores.
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice Invoked by a core after a token's ownership has been updated (mint
|
|
12
|
+
* or transfer). A reverting hook aborts the entire mint or transfer.
|
|
13
|
+
* Implementations MUST authenticate `msg.sender` as the expected core; the
|
|
14
|
+
* core passes `coreContract` for convenience when one hook serves many cores.
|
|
15
|
+
* Inheriting `AbstractTransferHook` is the recommended way to satisfy both
|
|
16
|
+
* that requirement and the ERC-165 requirement below.
|
|
17
|
+
* @dev A core will not accept a hook unless it ERC-165-advertises this
|
|
18
|
+
* interface. The ERC-165 interface ID is `0x6344b0e2`, which is
|
|
19
|
+
* `type(ITransferHook).interfaceId` — the selector of `onTokenTransfer`
|
|
20
|
+
* alone. Solidity excludes inherited interface functions (here, `IERC165`)
|
|
21
|
+
* from that XOR, so implementers hardcoding the value must use `0x6344b0e2`
|
|
22
|
+
* and not XOR in `IERC165`'s `0x01ffc9a7`.
|
|
23
|
+
*/
|
|
24
|
+
interface ITransferHook is IERC165 {
|
|
25
|
+
/**
|
|
26
|
+
* @notice Execution logic to be executed after a token's ownership updates.
|
|
27
|
+
* @dev Called after the ERC-721 ownership write. On mint, called after the
|
|
28
|
+
* token hash seed is assigned. Reverting aborts the mint or transfer.
|
|
29
|
+
* @dev The calling core blocks reentrant mints and transfers for the
|
|
30
|
+
* duration of this call, on every project of that core. Implementations
|
|
31
|
+
* must not attempt to mint or transfer on the calling core.
|
|
32
|
+
* @param coreContract The core contract that performed the ownership update.
|
|
33
|
+
* Also equal to `msg.sender` when called by a conforming core.
|
|
34
|
+
* @param tokenId The token whose ownership changed.
|
|
35
|
+
* @param from Previous owner. `address(0)` on mint.
|
|
36
|
+
* @param to New owner. `address(0)` on burn (cores do not currently burn).
|
|
37
|
+
* @param operator For transfers, the ERC-721 operator (`_msgSender()`).
|
|
38
|
+
* For mint, the `_by` address passed to `mint_Ecf` (the initiating user,
|
|
39
|
+
* not the minter contract).
|
|
40
|
+
*/
|
|
41
|
+
function onTokenTransfer(
|
|
42
|
+
address coreContract,
|
|
43
|
+
uint256 tokenId,
|
|
44
|
+
address from,
|
|
45
|
+
address to,
|
|
46
|
+
address operator
|
|
47
|
+
) external;
|
|
48
|
+
}
|
|
@@ -4,6 +4,7 @@ pragma solidity ^0.8.19;
|
|
|
4
4
|
import "../../interfaces/v0.8.x/IAdminACLV0.sol";
|
|
5
5
|
import "../../interfaces/v0.8.x/ICoreRegistryV1.sol";
|
|
6
6
|
import "../../interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol";
|
|
7
|
+
import {IDependencyRegistryV0} from "../../interfaces/v0.8.x/IDependencyRegistryV0.sol";
|
|
7
8
|
import "@openzeppelin-4.7/contracts/utils/structs/EnumerableSet.sol";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -51,6 +52,17 @@ library DependencyRegistryStorageLib {
|
|
|
51
52
|
uint24 additionalRepositoryCount;
|
|
52
53
|
// count of scripts that make up the dependency, if the dependency is available on-chain
|
|
53
54
|
uint24 scriptCount;
|
|
55
|
+
// @dev fields below are appended for the generator's rendering directives, and are
|
|
56
|
+
// safe to append because Dependency is only ever used as a mapping value.
|
|
57
|
+
// canvas tag requirement for the dependency
|
|
58
|
+
IDependencyRegistryV0.CanvasTagType canvasTagType;
|
|
59
|
+
// how a project's script must be injected into generated HTML
|
|
60
|
+
IDependencyRegistryV0.ProjectScriptTagType projectScriptTagType;
|
|
61
|
+
// whether the dependency's own script is an ES module, and therefore must be exposed to
|
|
62
|
+
// project scripts via an import map rather than loaded with a plain `<script src>` tag
|
|
63
|
+
bool loadAsModule;
|
|
64
|
+
// `type` attribute used when projectScriptTagType is SpecialType; empty otherwise
|
|
65
|
+
string projectScriptSpecialType;
|
|
54
66
|
}
|
|
55
67
|
|
|
56
68
|
/**
|
|
@@ -0,0 +1,85 @@
|
|
|
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 IUniversalResolver
|
|
8
|
+
* @notice Minimal ENS Universal Resolver interface for reverse resolution
|
|
9
|
+
* @dev See https://docs.ens.domains/resolvers/universal#reverse-resolution
|
|
10
|
+
*/
|
|
11
|
+
interface IUniversalResolver {
|
|
12
|
+
function reverse(
|
|
13
|
+
bytes calldata lookupAddress,
|
|
14
|
+
uint256 coinType
|
|
15
|
+
)
|
|
16
|
+
external
|
|
17
|
+
view
|
|
18
|
+
returns (
|
|
19
|
+
string memory primary,
|
|
20
|
+
address resolver,
|
|
21
|
+
address reverseResolver
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @title ENS Library
|
|
27
|
+
* @notice This library provides helper functions for ENS name resolution
|
|
28
|
+
* using the ENS Universal Resolver following ENS best practices.
|
|
29
|
+
* @author Art Blocks Inc.
|
|
30
|
+
* @dev This library uses the Universal Resolver's reverse() function which
|
|
31
|
+
* performs both reverse lookup AND forward verification in a single call.
|
|
32
|
+
* For an address to have a valid ENS name returned by this library, the owner
|
|
33
|
+
* must set up a reverse record (reverse lookup) by calling setName() on the
|
|
34
|
+
* reverse registrar. This is OPTIONAL and must be done by the address owner
|
|
35
|
+
* on-chain. If not set, the library returns an empty string.
|
|
36
|
+
*
|
|
37
|
+
* References:
|
|
38
|
+
* - Universal Resolver: https://docs.ens.domains/resolvers/universal
|
|
39
|
+
* - Reverse Resolution: https://docs.ens.domains/resolvers/universal#reverse-resolution
|
|
40
|
+
*/
|
|
41
|
+
library ENSLib {
|
|
42
|
+
/// @notice ENS Universal Resolver deployment address (same on mainnet and testnets)
|
|
43
|
+
/// @dev This is a proxy contract owned by ENS DAO
|
|
44
|
+
/// See: https://docs.ens.domains/resolvers/universal
|
|
45
|
+
address internal constant UNIVERSAL_RESOLVER_ADDRESS =
|
|
46
|
+
0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe;
|
|
47
|
+
|
|
48
|
+
/// @notice Coin type for Ethereum (used in reverse resolution)
|
|
49
|
+
/// @dev See ENSIP-9 for multichain address resolution
|
|
50
|
+
uint256 internal constant COIN_TYPE_ETH = 60;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Resolves an ENS name for a given address using the Universal Resolver.
|
|
54
|
+
* @dev Uses the ENS Universal Resolver's reverse() function which internally:
|
|
55
|
+
* 1. Performs reverse lookup to get the name claimed by the address
|
|
56
|
+
* 2. Verifies forward resolution to ensure the name actually resolves back to the address
|
|
57
|
+
*
|
|
58
|
+
* This provides protection against spoofing in a single call.
|
|
59
|
+
*
|
|
60
|
+
* NOTE: For an address to have a valid ENS name returned by this function, the owner must:
|
|
61
|
+
* - Set up a reverse record (reverse lookup) by calling setName() on the reverse registrar
|
|
62
|
+
* - This is OPTIONAL and must be done by the address owner on-chain
|
|
63
|
+
* - If not set, this function returns an empty string
|
|
64
|
+
*
|
|
65
|
+
* @param ownerAddress The address to resolve the ENS name for.
|
|
66
|
+
* @return ensName The ENS name for the address, or empty string if not found/invalid.
|
|
67
|
+
*/
|
|
68
|
+
function getEnsName(
|
|
69
|
+
address ownerAddress
|
|
70
|
+
) internal view returns (string memory) {
|
|
71
|
+
// Call the Universal Resolver's reverse function
|
|
72
|
+
// The reverse function internally performs both reverse lookup and forward verification
|
|
73
|
+
try
|
|
74
|
+
IUniversalResolver(UNIVERSAL_RESOLVER_ADDRESS).reverse(
|
|
75
|
+
abi.encodePacked(ownerAddress),
|
|
76
|
+
COIN_TYPE_ETH
|
|
77
|
+
)
|
|
78
|
+
returns (string memory primary, address, address) {
|
|
79
|
+
return primary;
|
|
80
|
+
} catch {
|
|
81
|
+
// If any error occurs (no reverse record, forward mismatch, etc.), return empty string
|
|
82
|
+
return "";
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|