@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.
Files changed (229) hide show
  1. package/README.md +11 -10
  2. package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/AdminACLV0RoyaltyRegistry.json +193 -0
  3. package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/IRoyaltyRegistry.json +35 -0
  4. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  5. package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +2 -2
  6. package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +2 -2
  7. package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +2 -2
  8. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +210 -2
  9. package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +235 -20
  10. package/artifacts/contracts/GenArt721CoreV3_Curated_Flex.sol/GenArt721CoreV3_Curated_Flex.json +3197 -0
  11. package/artifacts/contracts/GenArt721CoreV3_Explorations_Flex.sol/GenArt721CoreV3_Explorations_Flex.json +3192 -0
  12. package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +2 -2
  13. package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +27 -2
  14. package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +27 -2
  15. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
  16. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
  17. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
  18. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
  19. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
  20. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
  21. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
  22. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
  23. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV4.sol/MinterDALinV4.json +2 -2
  24. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
  25. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
  26. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
  27. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV4.sol/MinterHolderV4.json +2 -2
  28. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
  29. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
  30. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
  31. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
  32. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
  33. package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +25 -0
  34. package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
  35. package/artifacts/contracts/archive/minter-suite/Minters/MinterSEA/MinterSEAV0.sol/MinterSEAV0.json +2 -2
  36. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
  37. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
  38. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
  39. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
  40. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
  41. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
  42. package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +28 -2
  43. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +239 -20
  44. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +267 -48
  45. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +27 -2
  46. package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
  47. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +27 -2
  48. package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +25 -0
  49. package/artifacts/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol/AbstractTransferHook.json +79 -0
  50. package/artifacts/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol/OwnerHistoryTransferHook.json +315 -0
  51. package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +2 -2
  52. package/artifacts/contracts/interfaces/v0.8.x/IClaimMinter.sol/IClaimMinter.json +189 -0
  53. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +149 -0
  54. package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +26 -0
  55. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +25 -0
  56. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +25 -0
  57. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +123 -0
  58. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +123 -0
  59. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +25 -0
  60. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +25 -0
  61. package/artifacts/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol/IOwnerHistoryTransferHook.json +299 -0
  62. package/artifacts/contracts/interfaces/v0.8.x/ISRHooks.sol/ISRHooks.json +432 -0
  63. package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +0 -13
  64. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol/ISharedMinterTieredAllowV0.json +94 -0
  65. package/artifacts/contracts/interfaces/v0.8.x/ITransferHook.sol/ITransferHook.json +63 -0
  66. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  67. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +2 -2
  68. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +2 -2
  69. package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
  70. package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/ENSLib.json +10 -0
  71. package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/IUniversalResolver.json +45 -0
  72. package/artifacts/contracts/libs/v0.8.x/EnumerableSetUint16.sol/EnumerableSetUint16.json +10 -0
  73. package/artifacts/contracts/libs/v0.8.x/FeistelWalkLib.sol/FeistelWalkLib.json +10 -0
  74. package/artifacts/contracts/libs/v0.8.x/ImmutableUint16Array.sol/ImmutableUint16Array.json +10 -0
  75. package/artifacts/contracts/libs/v0.8.x/V3EngineLib.sol/V3EngineLib.json +163 -0
  76. package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +2 -2
  77. package/artifacts/contracts/libs/v0.8.x/V3TransferHookLib.sol/V3TransferHookLib.json +79 -0
  78. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
  79. package/artifacts/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol/OnChainAllowlistLib.json +10 -0
  80. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  81. package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +2 -2
  82. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
  83. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
  84. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
  85. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  86. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
  87. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
  88. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
  89. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
  90. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
  91. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
  92. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +2 -2
  93. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +2 -2
  94. package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +2 -2
  95. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +2 -2
  96. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
  97. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
  98. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
  99. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceOnChainAllowV0.sol/MinterSetPriceOnChainAllowV0.json +522 -0
  100. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
  101. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
  102. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceTieredAllowV1.sol/MinterSetPriceTieredAllowV1.json +715 -0
  103. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
  104. package/artifacts/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol/MinterSlidingScaleV0.json +431 -0
  105. package/artifacts/contracts/minter-suite/Minters/one-off/ClaimMinter.sol/ClaimMinter.json +502 -0
  106. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol/MinterSetPriceTieredOnChainAllowV0.json +673 -0
  107. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +2 -2
  108. package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +6 -19
  109. package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +2 -2
  110. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  111. package/artifacts/contracts/mock/ENSLibMock.sol/ENSLibMock.json +30 -0
  112. package/artifacts/contracts/mock/EnumerableSetUint16Mock.sol/EnumerableSetUint16Mock.json +146 -0
  113. package/artifacts/contracts/mock/FeistelWalkLibMock.sol/FeistelWalkLibMock.json +142 -0
  114. package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +2 -2
  115. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
  116. package/artifacts/contracts/mock/ImmutableUint16ArrayMock.sol/ImmutableUint16ArrayMock.json +89 -0
  117. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
  118. package/artifacts/contracts/mock/MockGenArt721V3Core.sol/MockGenArt721V3Core.json +490 -0
  119. package/artifacts/contracts/mock/MockPMP.sol/MockPMP.json +523 -0
  120. package/artifacts/contracts/mock/MockTransferHook.sol/MockTransferHook.json +453 -0
  121. package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockBatchTransferrer.json +39 -0
  122. package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockForwardingERC721Receiver.json +71 -0
  123. package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockSpoofingCore.json +94 -0
  124. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  125. package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/IBatchMinter.json +64 -0
  126. package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/ReentrancyBatchMockShared.json +113 -0
  127. package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/MockTarget.json +74 -0
  128. package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorPartialRevertsTestHelper.json +138 -0
  129. package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorTestHelper.json +119 -0
  130. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  131. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  132. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
  133. package/artifacts/contracts/relay/RelayExecutor.sol/RelayExecutor.json +101 -0
  134. package/artifacts/contracts/relay/RelayExecutorPartialReverts.sol/RelayExecutorPartialReverts.json +120 -0
  135. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol/GenArt721RoyaltyOverrideSplits.json +263 -0
  136. package/artifacts/contracts/utils/MintMulticallUtil.sol/IMinterSetPriceV5.json +40 -0
  137. package/artifacts/contracts/utils/MintMulticallUtil.sol/MintMulticallUtil.json +163 -0
  138. package/artifacts/contracts/web3call/PMPV0.sol/PMPV0.json +2 -2
  139. package/artifacts/contracts/web3call/PMPV1.sol/PMPV1.json +648 -0
  140. package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +2 -2
  141. package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeight.sol/InjectBlockHeight.json +83 -0
  142. package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol/InjectBlockHeightAndArtistProjectOverrides.json +226 -0
  143. package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol/InjectBlockHeightAndNumOwnedProjectTokens.json +182 -0
  144. package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.json +226 -0
  145. package/artifacts/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol/InjectBlockTimestamp.json +83 -0
  146. package/artifacts/contracts/web3call/augment-hooks/InjectBytesPerToken.sol/InjectBytesPerToken.json +358 -0
  147. package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +2 -2
  148. package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +2 -2
  149. package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +2 -2
  150. package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +2 -2
  151. package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +2 -2
  152. package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +2 -2
  153. package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +2 -2
  154. package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +2 -2
  155. package/artifacts/contracts/web3call/augment-hooks/SRHooks.sol/SRHooks.json +899 -0
  156. package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IGenArt721V0_Minimal.json +30 -0
  157. package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IRelic.json +35 -0
  158. package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/LiftHooks.json +256 -0
  159. package/artifacts/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol}/AbstractPMPConfigureHook.json +1 -1
  160. package/artifacts/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol/PMPConfigureLockHook.json +195 -0
  161. package/contracts/AdminACLV0RoyaltyRegistry.sol +142 -0
  162. package/contracts/DependencyRegistryV0.sol +143 -13
  163. package/contracts/GenArt721CoreV3_Curated.sol +1 -1
  164. package/contracts/GenArt721CoreV3_Curated_Flex.sol +173 -0
  165. package/contracts/GenArt721CoreV3_Explorations_Flex.sol +159 -0
  166. package/contracts/engine/V3/EngineFactoryV0.sol +20 -1
  167. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +286 -299
  168. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +292 -301
  169. package/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol +101 -0
  170. package/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol +291 -0
  171. package/contracts/generator/GenArt721GeneratorV0.sol +145 -47
  172. package/contracts/helpers/ERC1967ProxyImport.sol +5 -0
  173. package/contracts/interfaces/v0.8.x/IArtblocksRoyaltyOverride.sol +1 -1
  174. package/contracts/interfaces/v0.8.x/IClaimMinter.sol +70 -0
  175. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +95 -0
  176. package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +15 -0
  177. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +21 -2
  178. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +72 -0
  179. package/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol +119 -0
  180. package/contracts/interfaces/v0.8.x/ISRHooks.sol +229 -0
  181. package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +0 -6
  182. package/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol +69 -0
  183. package/contracts/interfaces/v0.8.x/ITransferHook.sol +48 -0
  184. package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +12 -0
  185. package/contracts/libs/v0.8.x/ENSLib.sol +85 -0
  186. package/contracts/libs/v0.8.x/EnumerableSetUint16.sol +429 -0
  187. package/contracts/libs/v0.8.x/FeistelWalkLib.sol +221 -0
  188. package/contracts/libs/v0.8.x/ImmutableUint16Array.sol +201 -0
  189. package/contracts/libs/v0.8.x/V3EngineLib.sol +490 -0
  190. package/contracts/libs/v0.8.x/V3TransferHookLib.sol +251 -0
  191. package/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol +165 -0
  192. package/contracts/minter-suite/Minters/MinterSetPriceOnChainAllowV0.sol +632 -0
  193. package/contracts/minter-suite/Minters/MinterSetPriceTieredAllowV1.sol +871 -0
  194. package/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol +493 -0
  195. package/contracts/minter-suite/Minters/one-off/ClaimMinter.sol +595 -0
  196. package/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol +894 -0
  197. package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +59 -41
  198. package/contracts/mock/ENSLibMock.sol +25 -0
  199. package/contracts/mock/EnumerableSetUint16Mock.sol +88 -0
  200. package/contracts/mock/FeistelWalkLibMock.sol +81 -0
  201. package/contracts/mock/ImmutableUint16ArrayMock.sol +62 -0
  202. package/contracts/mock/MockGenArt721V3Core.sol +416 -0
  203. package/contracts/mock/MockPMP.sol +287 -0
  204. package/contracts/mock/MockTransferHook.sol +160 -0
  205. package/contracts/mock/MockTransferHookTestHelpers.sol +96 -0
  206. package/contracts/mock/ReentrancyBatchMockShared.sol +53 -0
  207. package/contracts/mock/RelayExecutorTestHelper.sol +44 -0
  208. package/contracts/relay/RelayExecutor.sol +61 -0
  209. package/contracts/relay/RelayExecutorPartialReverts.sol +79 -0
  210. package/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol +130 -0
  211. package/contracts/utils/MintMulticallUtil.sol +103 -0
  212. package/contracts/web3call/PMPV1.sol +1204 -0
  213. package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +1 -1
  214. package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +1 -1
  215. package/contracts/web3call/augment-hooks/InjectBlockHeight.sol +57 -0
  216. package/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol +310 -0
  217. package/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol +141 -0
  218. package/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol +326 -0
  219. package/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol +57 -0
  220. package/contracts/web3call/augment-hooks/InjectBytesPerToken.sol +279 -0
  221. package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +1 -1
  222. package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +1 -1
  223. package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +1 -1
  224. package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +1 -1
  225. package/contracts/web3call/augment-hooks/SRHooks.sol +1722 -0
  226. package/contracts/web3call/combined-hooks/LiftHooks.sol +304 -0
  227. package/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol} +1 -1
  228. package/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol +107 -0
  229. package/package.json +39 -24
@@ -0,0 +1,304 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ pragma solidity 0.8.22;
5
+
6
+ import {AbstractPMPAugmentHook} from "../augment-hooks/AbstractPMPAugmentHook.sol";
7
+ import {AbstractPMPConfigureHook} from "../configure-hooks/AbstractPMPConfigureHook.sol";
8
+
9
+ import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
10
+ import {IPMPV0} from "../../interfaces/v0.8.x/IPMPV0.sol";
11
+ import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
12
+ import {IERC721} from "@openzeppelin-5.0/contracts/interfaces/IERC721.sol";
13
+ import {IDelegationRegistry as IDelegationRegistryV1} from "../../interfaces/v0.8.x/IDelegationRegistry.sol";
14
+ import {IDelegateRegistry as IDelegationRegistryV2} from "../../interfaces/v0.8.x/IDelegateRegistry.sol";
15
+ import {IPMPConfigureHook} from "../../interfaces/v0.8.x/IPMPConfigureHook.sol";
16
+ import {IPMPAugmentHook} from "../../interfaces/v0.8.x/IPMPAugmentHook.sol";
17
+
18
+ interface IGenArt721V0_Minimal {
19
+ function showTokenHashes(
20
+ uint256 _tokenId
21
+ ) external view returns (bytes32[] memory);
22
+ }
23
+
24
+ interface IRelic {
25
+ // Query the inscription list by address; returning true/false for whether that address has inscribed,
26
+ // and the number of squiggles under ownership (directly or through delegation)
27
+ function inscriptionByAddress(
28
+ address a
29
+ ) external view returns (bool inscribed, uint256 squiggle_count);
30
+ }
31
+
32
+ /**
33
+ * @title LiftHooks
34
+ * @author Art Blocks Inc.
35
+ * @notice This hook verifies ownership of any custom squiggle PostParam setting,
36
+ * and injects the squiggle's token hash into the token's PMPs if configured.
37
+ * It supports delegate.xyz V1 and V2, and also allows squiggle #9998 for any address that
38
+ * inscribed the squiggle Relic contract on eth mainnet.
39
+ * It also allows resetting the squiggle token back to default #1981.
40
+ * This hook contract has logic for both the augment and configure hooks.
41
+ * It reverts if the squiggle token id doesn't pass relic or ownership checks during configuring.
42
+ * Ownership checks are performed during configuring, keeping provenance history indexable and preventing
43
+ * effects intuitive during transfers and delegation revocations.
44
+ * If the squiggle token id is configured to be default #1981, the squiggle PostParams will
45
+ * be stripped, allowing the owner to effectively "clear" the squiggle-related PostParams back to default.
46
+ */
47
+ contract LiftHooks is AbstractPMPAugmentHook, AbstractPMPConfigureHook {
48
+ using Strings for uint256;
49
+
50
+ address public immutable SQUIGGLE_GENART_V0_ADDRESS;
51
+ address public immutable RELIC_CONTRACT_ADDRESS;
52
+
53
+ IDelegationRegistryV1 public constant DELEGATE_V1 =
54
+ IDelegationRegistryV1(0x00000000000076A84feF008CDAbe6409d2FE638B);
55
+ IDelegationRegistryV2 public constant DELEGATE_V2 =
56
+ IDelegationRegistryV2(0x00000000000000447e69651d841bD8D104Bed493);
57
+ bytes32 public constant DELEGATION_REGISTRY_TOKEN_OWNER_RIGHTS =
58
+ bytes32("postmintparameters");
59
+
60
+ uint256 public constant FINAL_SQUIGGLE_TOKEN_ID = 9998;
61
+ uint256 public constant DEFAULT_SQUIGGLE_TOKEN_ID = 1981;
62
+ bytes32 internal constant _HASHED_KEY_SPLASH_SCREEN_SQUIGGLE =
63
+ keccak256("Splash Screen Squiggle (ROM)");
64
+
65
+ /**
66
+ * @notice Constructor
67
+ * @param _squiggleGenArtV0Address The address of the squiggle GenArt V0 contract.
68
+ * For mainnet, use 0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a.
69
+ * @param _relicContractAddress The address of the relic contract.
70
+ * For mainnet, use 0x9b917686DD68B68A780cB8Bf70aF46617A7b3f80.
71
+ */
72
+ constructor(
73
+ address _squiggleGenArtV0Address,
74
+ address _relicContractAddress
75
+ ) {
76
+ SQUIGGLE_GENART_V0_ADDRESS = _squiggleGenArtV0Address;
77
+ RELIC_CONTRACT_ADDRESS = _relicContractAddress;
78
+ }
79
+
80
+ /**
81
+ * @notice Execution logic to be executed when a token's PMP is configured.
82
+ * Reverts if the squiggle token id is invalid or the liftOwner does not have access to the squiggle token id.
83
+ * @dev This hook is executed after the PMP is configured.
84
+ * @param coreContract The address of the core contract that was configured.
85
+ * @param tokenId The tokenId of the token that was configured.
86
+ * @param pmpInput The PMP input that was used to successfully configure the token.
87
+ */
88
+ function onTokenPMPConfigure(
89
+ address coreContract,
90
+ uint256 tokenId,
91
+ IPMPV0.PMPInput calldata pmpInput
92
+ ) external view override {
93
+ // only verify ownership if the squiggle token id is being configured
94
+ if (
95
+ keccak256(bytes(pmpInput.key)) == _HASHED_KEY_SPLASH_SCREEN_SQUIGGLE
96
+ ) {
97
+ // @dev can assume squiggle token id is configured as a uint256, so will show up as configuredValue
98
+ uint256 squiggleTokenId = uint256(pmpInput.configuredValue);
99
+
100
+ // @dev only allow squiggle token ids up to FINAL_SQUIGGLE_TOKEN_ID
101
+ // @dev no coverage - redundant check due to operationally enforced range check in PMPV0.sol
102
+ require(
103
+ squiggleTokenId <= FINAL_SQUIGGLE_TOKEN_ID,
104
+ "Invalid squiggle token id"
105
+ );
106
+
107
+ // perform ownership checks if not default squiggle
108
+ if (squiggleTokenId != DEFAULT_SQUIGGLE_TOKEN_ID) {
109
+ address liftOwner = IERC721(coreContract).ownerOf(tokenId);
110
+
111
+ require(
112
+ passesSquiggleAccessCheck({
113
+ squiggleTokenId: squiggleTokenId,
114
+ liftOwner: liftOwner
115
+ }),
116
+ "Failed squiggle access check"
117
+ );
118
+ }
119
+ }
120
+ }
121
+
122
+ /**
123
+ * @notice Augment the token parameters for a given token.
124
+ * Augments the token parameters as described in the contract natspec doc.
125
+ * @dev This hook is called when a token's PMPs are read.
126
+ * @dev This must return all desired tokenParams, not just additional data.
127
+ * @param tokenParams The token parameters for the queried token.
128
+ * @return augmentedTokenParams The augmented token parameters.
129
+ */
130
+ function onTokenPMPReadAugmentation(
131
+ address /* coreContract */,
132
+ uint256 /* tokenId */,
133
+ IWeb3Call.TokenParam[] calldata tokenParams
134
+ )
135
+ external
136
+ view
137
+ override
138
+ returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
139
+ {
140
+ // create a new augmentedTokenParams array with maximum length of
141
+ // input tokenParams + 1 extra element for the squiggle's token hash
142
+ uint256 originalLength = tokenParams.length;
143
+ uint256 augmentedMaxLength = originalLength + 1;
144
+ augmentedTokenParams = new IWeb3Call.TokenParam[](augmentedMaxLength);
145
+
146
+ // allocate squiggle token id to a variable (may or may not be configured)
147
+ uint256 squiggleTokenId = DEFAULT_SQUIGGLE_TOKEN_ID; // default squiggle
148
+
149
+ // copy the original tokenParams into the new array, skipping the squiggle token id
150
+ uint256 j = 0;
151
+ for (uint256 i = 0; i < originalLength; i++) {
152
+ if (
153
+ keccak256(bytes(tokenParams[i].key)) ==
154
+ _HASHED_KEY_SPLASH_SCREEN_SQUIGGLE
155
+ ) {
156
+ squiggleTokenId = parseUint(tokenParams[i].value);
157
+ // skip the squiggle token id and assign later if appropriate
158
+ continue;
159
+ } else {
160
+ augmentedTokenParams[j++] = tokenParams[i];
161
+ }
162
+ }
163
+
164
+ // if the squiggle token id is default squiggle token id, return the stripped tokenParams
165
+ if (squiggleTokenId == DEFAULT_SQUIGGLE_TOKEN_ID) {
166
+ // shorten the new array to length of j
167
+ assembly {
168
+ mstore(augmentedTokenParams, j)
169
+ }
170
+ return augmentedTokenParams;
171
+ }
172
+
173
+ // @dev intentionally do not perform ownership checks during read augmentation
174
+ // this keeps provenance history indexable, and prevents effects intuitive during transfers and delegation revocations
175
+
176
+ // ownership was passed, so we can inject the squiggle's token hash into the new array
177
+ // @dev okay to assume squiggle exists since all squiggles are minted, passed previous checks
178
+ bytes32 squiggleTokenHash = IGenArt721V0_Minimal(
179
+ SQUIGGLE_GENART_V0_ADDRESS
180
+ ).showTokenHashes(squiggleTokenId)[0];
181
+
182
+ // inject the squiggles ID and hash into the new array
183
+ augmentedTokenParams[j++] = IWeb3Call.TokenParam({
184
+ key: "Splash Screen Squiggle (ROM)",
185
+ value: squiggleTokenId.toString()
186
+ });
187
+ augmentedTokenParams[j] = IWeb3Call.TokenParam({
188
+ key: "Splash Screen Squiggle Hash",
189
+ value: uint256(squiggleTokenHash).toHexString()
190
+ });
191
+
192
+ // @dev no need to reduce the array length, since we guaranteed to be max length in this case
193
+
194
+ // return the augmented tokenParams
195
+ return augmentedTokenParams;
196
+ }
197
+
198
+ function supportsInterface(
199
+ bytes4 interfaceId
200
+ )
201
+ public
202
+ view
203
+ override(AbstractPMPAugmentHook, AbstractPMPConfigureHook)
204
+ returns (bool)
205
+ {
206
+ return
207
+ interfaceId == type(IPMPAugmentHook).interfaceId ||
208
+ interfaceId == type(IPMPConfigureHook).interfaceId ||
209
+ super.supportsInterface(interfaceId);
210
+ }
211
+
212
+ /**
213
+ * @notice Checks if the liftOwner has access to the squiggle token id.
214
+ * @dev This function is used to check if the liftOwner has access to the squiggle token id.
215
+ * @param squiggleTokenId The token id of the squiggle to check access for.
216
+ * @param liftOwner The address of the lift owner to check access for.
217
+ * @return bool True if the liftOwner has access to the squiggle token id, false otherwise.
218
+ */
219
+ function passesSquiggleAccessCheck(
220
+ uint256 squiggleTokenId,
221
+ address liftOwner
222
+ ) internal view returns (bool) {
223
+ return
224
+ passesRelicCheck(squiggleTokenId, liftOwner) ||
225
+ isOwnerOrDelegate(squiggleTokenId, liftOwner);
226
+ }
227
+
228
+ /**
229
+ * @notice Checks if the liftOwner is configuring squiggle 9998.
230
+ * If so, it verifies that the liftOwner is inscribed in the relic contract.
231
+ * @param squiggleTokenId The token id of the squiggle to check access for.
232
+ * @param liftOwner The address of the lift owner to check access for.
233
+ * @return bool True if the liftOwner is configuring squiggle 9998 and is
234
+ * inscribed in the relic contract, false otherwise.
235
+ */
236
+ function passesRelicCheck(
237
+ uint256 squiggleTokenId,
238
+ address liftOwner
239
+ ) internal view returns (bool) {
240
+ if (squiggleTokenId == FINAL_SQUIGGLE_TOKEN_ID) {
241
+ // verify token owner inscribed relic contract
242
+ (bool inscribed, ) = IRelic(RELIC_CONTRACT_ADDRESS)
243
+ .inscriptionByAddress(liftOwner);
244
+ return inscribed;
245
+ }
246
+ return false;
247
+ }
248
+
249
+ /**
250
+ * @notice Checks if the liftOwner is the owner of the squiggle token id or
251
+ * a delegate of the vault that owns the squiggle token id.
252
+ * Supports delegate.xyz V1 and V2.
253
+ * @param squiggleTokenId The token id of the squiggle to check access for.
254
+ * @param liftOwner The address of the lift owner to check access for.
255
+ * @return bool True if the liftOwner is the owner of the squiggle token id or
256
+ * a delegate of the squiggle token id, false otherwise.
257
+ */
258
+ function isOwnerOrDelegate(
259
+ uint256 squiggleTokenId,
260
+ address liftOwner
261
+ ) internal view returns (bool) {
262
+ address squiggleOwner = IERC721(SQUIGGLE_GENART_V0_ADDRESS).ownerOf(
263
+ squiggleTokenId
264
+ );
265
+
266
+ // if the owner is the same, return true
267
+ if (squiggleOwner == liftOwner) {
268
+ return true;
269
+ }
270
+
271
+ // if the liftOwner is delegate of vault that owns squiggle(delegate.xyz V1 or V2), return true
272
+ // @dev on v2, allow subdelegation rights consistent with PMPV0.sol
273
+ return
274
+ DELEGATE_V1.checkDelegateForToken({
275
+ delegate: liftOwner,
276
+ vault: squiggleOwner,
277
+ contract_: SQUIGGLE_GENART_V0_ADDRESS,
278
+ tokenId: squiggleTokenId
279
+ }) ||
280
+ DELEGATE_V2.checkDelegateForERC721({
281
+ to: liftOwner,
282
+ from: squiggleOwner,
283
+ contract_: SQUIGGLE_GENART_V0_ADDRESS,
284
+ tokenId: squiggleTokenId,
285
+ rights: DELEGATION_REGISTRY_TOKEN_OWNER_RIGHTS
286
+ });
287
+ }
288
+
289
+ /**
290
+ * @notice Parses a string into a uint256.
291
+ * @dev This function is used to parse a string into a uint256.
292
+ * @param s The string to parse.
293
+ * @return result The parsed uint256.
294
+ */
295
+ function parseUint(string memory s) internal pure returns (uint256 result) {
296
+ bytes memory b = bytes(s);
297
+ for (uint i = 0; i < b.length; i++) {
298
+ // Require each character to be 0-9
299
+ // @dev no coverage - operationally redundant check due to operationally enforced range check in PMPV0.sol
300
+ require(b[i] >= 0x30 && b[i] <= 0x39, "Invalid character");
301
+ result = result * 10 + (uint8(b[i]) - 48);
302
+ }
303
+ }
304
+ }
@@ -33,7 +33,7 @@ abstract contract AbstractPMPConfigureHook is IPMPConfigureHook, ERC165 {
33
33
 
34
34
  function supportsInterface(
35
35
  bytes4 interfaceId
36
- ) public view override(ERC165, IERC165) returns (bool) {
36
+ ) public view virtual override(ERC165, IERC165) returns (bool) {
37
37
  return
38
38
  interfaceId == type(IPMPConfigureHook).interfaceId ||
39
39
  super.supportsInterface(interfaceId);
@@ -0,0 +1,107 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ pragma solidity 0.8.22;
5
+
6
+ import {AbstractPMPConfigureHook} from "./AbstractPMPConfigureHook.sol";
7
+
8
+ import {IPMPV0} from "../../interfaces/v0.8.x/IPMPV0.sol";
9
+
10
+ /**
11
+ * @title PMPConfigureLockHook
12
+ * @author Art Blocks Inc.
13
+ * @notice A generic post-configuration hook that enforces per-parameter value locks on a
14
+ * PMPV0 project. For each configured key, an artist-chosen lock timestamp may be set; once
15
+ * that timestamp has passed, any attempt to configure that parameter's value on any token
16
+ * reverts, rolling back the collector's (or artist's) entire configureTokenParams()
17
+ * transaction.
18
+ *
19
+ * ── Why this exists ──────────────────────────────────────────────────────────
20
+ * PMPV0 interprets `pmpLockedAfterTimestamp` only as a *configuration* lock (it prevents
21
+ * the artist from re-configuring the parameter definition after the timestamp). It does NOT
22
+ * prevent token owners from continuing to write *values* after the timestamp. The Art Blocks
23
+ * Creator Dashboard advertises the Lock Date as cementing values permanently, so this hook
24
+ * patches the gap for existing PMPV0 projects by reverting value writes after the lock date.
25
+ * PMPV1 enforces this natively; this hook is intended for projects already deployed on PMPV0.
26
+ *
27
+ * ── Scope ────────────────────────────────────────────────────────────────────
28
+ * This hook is stateless after construction and has no side effects — it only reverts. It is
29
+ * intended to be registered for a single project via PMPV0.configureProjectHooks(). Keys not
30
+ * present in the lock table are always allowed (the hook is a no-op for them). A lock
31
+ * timestamp is matched to the same instant PMPV0 uses for its config lock: a value write is
32
+ * allowed while `block.timestamp < lockedAfter`, and reverts once `block.timestamp >=
33
+ * lockedAfter`. The lock timestamps supplied at construction should exactly match each key's
34
+ * `pmpLockedAfterTimestamp` in the project's PMPV0 configuration.
35
+ *
36
+ * ── Residual trust ───────────────────────────────────────────────────────────
37
+ * A hook-based lock only holds while this hook remains registered. PMPV0.configureProjectHooks()
38
+ * is not itself gated by `pmpLockedAfterTimestamp`, so the project artist could later unregister
39
+ * this hook and re-enable value writes. This is acceptable for the artist's own project but is
40
+ * a weaker guarantee than PMPV1's native value lock.
41
+ */
42
+ contract PMPConfigureLockHook is AbstractPMPConfigureHook {
43
+ /// @notice Per-key lock timestamp. keccak256(bytes(key)) => unix timestamp after which
44
+ /// (inclusive) the key's value is locked. A value of 0 means the key is not locked by
45
+ /// this hook.
46
+ mapping(bytes32 keyHash => uint256 lockedAfterTimestamp) public lockedAfter;
47
+
48
+ /// @notice The keys locked by this hook, in construction order (for introspection).
49
+ string[] public lockedKeys;
50
+
51
+ error ParamLocked(string key, uint256 lockedAfterTimestamp);
52
+ error EmptyConfig();
53
+ error LengthMismatch();
54
+ error ZeroTimestamp(string key);
55
+ error DuplicateKey(string key);
56
+
57
+ /**
58
+ * @notice Constructor.
59
+ * @param keys The parameter keys to lock. Should match the project's PMPV0 param keys.
60
+ * @param timestamps The unix timestamp for each key, aligned by index, after which
61
+ * (inclusive) the key's value is locked. Each must be non-zero and should match the
62
+ * corresponding key's `pmpLockedAfterTimestamp` in the project's PMPV0 configuration.
63
+ */
64
+ constructor(string[] memory keys, uint256[] memory timestamps) {
65
+ uint256 keysLength = keys.length;
66
+ if (keysLength == 0) revert EmptyConfig();
67
+ if (keysLength != timestamps.length) revert LengthMismatch();
68
+ for (uint256 i = 0; i < keysLength; i++) {
69
+ if (timestamps[i] == 0) revert ZeroTimestamp(keys[i]);
70
+ bytes32 keyHash = keccak256(bytes(keys[i]));
71
+ // @dev reject duplicate keys to avoid silent override of a lock timestamp
72
+ if (lockedAfter[keyHash] != 0) revert DuplicateKey(keys[i]);
73
+ lockedAfter[keyHash] = timestamps[i];
74
+ lockedKeys.push(keys[i]);
75
+ }
76
+ }
77
+
78
+ /**
79
+ * @notice Post-configuration hook executed by PMPV0 after a token's PMP is configured.
80
+ * Reverts if the configured key is locked and its lock timestamp has passed, which rolls
81
+ * back the entire configureTokenParams() transaction.
82
+ * @dev Stateless and side-effect free; safe to be called by any address.
83
+ * @param pmpInput The PMP input that was used to configure the token.
84
+ */
85
+ function onTokenPMPConfigure(
86
+ address /* coreContract */,
87
+ uint256 /* tokenId */,
88
+ IPMPV0.PMPInput calldata pmpInput
89
+ ) external view override {
90
+ uint256 lockedAfterTimestamp = lockedAfter[
91
+ keccak256(bytes(pmpInput.key))
92
+ ];
93
+ // @dev keys not in the lock table (lockedAfterTimestamp == 0) are always allowed
94
+ if (
95
+ lockedAfterTimestamp != 0 && block.timestamp >= lockedAfterTimestamp
96
+ ) {
97
+ revert ParamLocked(pmpInput.key, lockedAfterTimestamp);
98
+ }
99
+ }
100
+
101
+ /**
102
+ * @notice Returns the number of keys locked by this hook.
103
+ */
104
+ function lockedKeysLength() external view returns (uint256) {
105
+ return lockedKeys.length;
106
+ }
107
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artblocks/contracts",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Smart contracts used by Art Blocks",
5
5
  "files": [
6
6
  "/contracts/**/*.sol",
@@ -21,58 +21,63 @@
21
21
  "remix": "remixd -s ./ --remix-ide https://remix.ethereum.org",
22
22
  "codegen": "yarn --cwd=\"../..\" codegen:project contracts",
23
23
  "get-init-code": "yarn hardhat run --network sepolia scripts/get-init-code.ts",
24
+ "create2-deploy": "hardhat compile && hardhat run scripts/create2-deploy/index.ts",
24
25
  "verify": "yarn hardhat run scripts/verify.ts --network",
25
26
  "deploy:v3-engine:dev": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
26
- "deploy:v3-engine:dev-arbitrum": "yarn codegen && yarn require-low-gas arbitrum-sepolia && NODE_ENV=arbitrum-dev yarn hardhat run --network arbitrum-sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
27
- "deploy:v3-engine:staging-arbitrum": "yarn codegen && yarn require-low-gas arbitrum-sepolia && NODE_ENV=arbitrum-staging yarn hardhat run --network arbitrum-sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
28
- "deploy:v3-engine:arbitrum": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=arbitrum yarn hardhat run --network arbitrum scripts/engine/V3/batch-create-engine-contracts.ts",
29
- "deploy:v3-engine:base": "yarn codegen && yarn require-low-gas base && NODE_ENV=base yarn hardhat run --network base scripts/engine/V3/batch-create-engine-contracts.ts",
27
+ "deploy:v3-engine:dev:txbuilder": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=dev EXPORT_TX_BUILDER=true yarn hardhat run --network sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
30
28
  "deploy:v3-engine:staging": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=staging yarn hardhat run --network sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
31
- "deploy:v3-engine:mainnet": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=mainnet yarn hardhat run --network mainnet scripts/engine/V3/batch-create-engine-contracts.ts",
29
+ "deploy:v3-engine:staging:txbuilder": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=staging EXPORT_TX_BUILDER=true yarn hardhat run --network sepolia scripts/engine/V3/batch-create-engine-contracts.ts",
30
+ "deploy:v3-engine:mainnet": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=prod yarn hardhat run --network mainnet scripts/engine/V3/batch-create-engine-contracts.ts",
31
+ "deploy:v3-engine:mainnet:txbuilder": "yarn require-low-gas mainnet && NODE_ENV=prod EXPORT_TX_BUILDER=true yarn hardhat run --network mainnet scripts/engine/V3/batch-create-engine-contracts.ts",
32
+ "deploy:v3-engine:arbitrum": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=prod yarn hardhat run --network arbitrum scripts/engine/V3/batch-create-engine-contracts.ts",
33
+ "deploy:v3-engine:arbitrum:txbuilder": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=prod EXPORT_TX_BUILDER=true yarn hardhat run --network arbitrum scripts/engine/V3/batch-create-engine-contracts.ts",
34
+ "deploy:v3-engine:base": "yarn codegen && yarn require-low-gas base && NODE_ENV=prod yarn hardhat run --network base scripts/engine/V3/batch-create-engine-contracts.ts",
35
+ "deploy:v3-engine:base:txbuilder": "yarn codegen && yarn require-low-gas base && NODE_ENV=prod EXPORT_TX_BUILDER=true yarn hardhat run --network base scripts/engine/V3/batch-create-engine-contracts.ts",
36
+ "deploy:v3-engine:shape:txbuilder": "yarn codegen && yarn require-low-gas shape && NODE_ENV=prod EXPORT_TX_BUILDER=true yarn hardhat run --network shape scripts/engine/V3/batch-create-engine-contracts.ts",
32
37
  "post-deploy:v3-engine:dev": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/engine/V3/post-batch-create-engine-contracts.ts",
33
- "post-deploy:v3-engine:dev-arbitrum": "yarn codegen && yarn require-low-gas arbitrum-sepolia && NODE_ENV=arbitrum-dev yarn hardhat run --network arbitrum-sepolia scripts/engine/V3/post-batch-create-engine-contracts.ts",
34
- "post-deploy:v3-engine:staging-arbitrum": "yarn codegen && yarn require-low-gas arbitrum-sepolia && NODE_ENV=arbitrum-staging yarn hardhat run --network arbitrum-sepolia scripts/engine/V3/post-batch-create-engine-contracts.ts",
35
- "post-deploy:v3-engine:arbitrum": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=arbitrum yarn hardhat run --network arbitrum scripts/engine/V3/post-batch-create-engine-contracts.ts",
36
- "post-deploy:v3-engine:base": "yarn codegen && yarn require-low-gas base && NODE_ENV=base yarn hardhat run --network base scripts/engine/V3/post-batch-create-engine-contracts.ts",
37
38
  "post-deploy:v3-engine:staging": "yarn codegen && yarn require-low-gas sepolia && NODE_ENV=staging yarn hardhat run --network sepolia scripts/engine/V3/post-batch-create-engine-contracts.ts",
38
- "post-deploy:v3-engine:mainnet": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=mainnet yarn hardhat run --network mainnet scripts/engine/V3/post-batch-create-engine-contracts.ts",
39
+ "post-deploy:v3-engine:mainnet": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=prod yarn hardhat run --network mainnet scripts/engine/V3/post-batch-create-engine-contracts.ts",
40
+ "post-deploy:v3-engine:arbitrum": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=prod yarn hardhat run --network arbitrum scripts/engine/V3/post-batch-create-engine-contracts.ts",
41
+ "post-deploy:v3-engine:base": "yarn codegen && yarn require-low-gas base && NODE_ENV=prod yarn hardhat run --network base scripts/engine/V3/post-batch-create-engine-contracts.ts",
42
+ "post-deploy:v3-engine:shape": "yarn codegen && yarn require-low-gas shape && NODE_ENV=prod yarn hardhat run --network shape scripts/engine/V3/post-batch-create-engine-contracts.ts",
39
43
  "deploy:shared-randomizer:goerli": "yarn require-low-gas goerli && yarn hardhat run --network goerli scripts/randomizer-deployments/shared-randomizer-deployer.ts",
40
44
  "deploy:shared-randomizer:dev-sepolia": "yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/randomizer-deployments/shared-randomizer-deployer.ts",
41
45
  "deploy:shared-randomizer:mainnet": "yarn require-low-gas mainnet && yarn hardhat run --network mainnet scripts/randomizer-deployments/shared-randomizer-deployer.ts",
42
46
  "deploy:shared-randomizer:arbitrum-goerli": "yarn require-low-gas arbitrum-goerli && yarn hardhat run --network arbitrum-goerli scripts/randomizer-deployments/shared-randomizer-deployer.ts",
43
47
  "deploy:shared-randomizer:arbitrum": "yarn require-low-gas arbitrum && yarn hardhat run --network arbitrum scripts/randomizer-deployments/shared-randomizer-deployer.ts",
44
48
  "deploy:shared-randomizer:base": "yarn require-low-gas base && yarn hardhat run --network base scripts/randomizer-deployments/shared-randomizer-deployer.ts",
49
+ "deploy:shared-randomizer:shape": "yarn require-low-gas shape && yarn hardhat run --network shape scripts/randomizer-deployments/shared-randomizer-deployer.ts",
45
50
  "deploy:shared-minter-filter:goerli": "yarn require-low-gas goerli && yarn hardhat run --network goerli scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
46
51
  "deploy:shared-minter-filter:dev-sepolia": "yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
47
52
  "deploy:shared-minter-filter:mainnet": "yarn require-low-gas mainnet && yarn hardhat run --network mainnet scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
48
53
  "deploy:shared-minter-filter:arbitrum-goerli": "yarn require-low-gas arbitrum-goerli && yarn hardhat run --network arbitrum-goerli scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
49
54
  "deploy:shared-minter-filter:arbitrum": "yarn require-low-gas arbitrum && yarn hardhat run --network arbitrum scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
50
55
  "deploy:shared-minter-filter:base": "yarn require-low-gas base && yarn hardhat run --network base scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
56
+ "deploy:shared-minter-filter:shape": "yarn require-low-gas shape && yarn hardhat run --network shape scripts/minter-filter-deployments/shared-minter-filter-deployer.ts",
51
57
  "deploy:shared-minters:goerli": "yarn require-low-gas goerli && yarn hardhat run --network goerli scripts/minter-deployments/shared-minters-deployer.ts",
52
58
  "deploy:shared-minters:sepolia": "yarn require-low-gas sepolia && yarn hardhat run --network sepolia scripts/minter-deployments/shared-minters-deployer.ts",
53
59
  "deploy:shared-minters:mainnet": "yarn require-low-gas mainnet && yarn hardhat run --network mainnet scripts/minter-deployments/shared-minters-deployer.ts",
54
60
  "deploy:shared-minters:arbitrum-goerli": "yarn require-low-gas arbitrum-goerli && yarn hardhat run --network arbitrum-goerli scripts/minter-deployments/shared-minters-deployer.ts",
55
61
  "deploy:shared-minters:arbitrum": "yarn require-low-gas arbitrum && yarn hardhat run --network arbitrum scripts/minter-deployments/shared-minters-deployer.ts",
56
62
  "deploy:shared-minters:base": "yarn require-low-gas base && yarn hardhat run --network base scripts/minter-deployments/shared-minters-deployer.ts",
63
+ "deploy:shared-minters:shape": "yarn require-low-gas shape && yarn hardhat run --network shape scripts/minter-deployments/shared-minters-deployer.ts",
57
64
  "deploy:splits-factory:dev": "yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/splits/splits-factory-deployer.ts",
58
65
  "deploy:splits-factory:staging": "yarn require-low-gas sepolia && NODE_ENV=staging yarn hardhat run --network sepolia scripts/splits/splits-factory-deployer.ts",
59
- "deploy:splits-factory:mainnet": "yarn require-low-gas mainnet && NODE_ENV=mainnet yarn hardhat run --network mainnet scripts/splits/splits-factory-deployer.ts",
66
+ "deploy:splits-factory:mainnet": "yarn require-low-gas mainnet && NODE_ENV=prod yarn hardhat run --network mainnet scripts/splits/splits-factory-deployer.ts",
60
67
  "deploy:core-registry:dev-sepolia": "yarn require-low-gas sepolia && NODE_ENV=dev yarn hardhat run --network sepolia scripts/core-registry-deployments/core-registry-deployer.ts",
61
- "dependency-registry:upload-script:mainnet": "NODE_ENV=mainnet yarn hardhat run --network mainnet ./scripts/propose-add-dependency-script-transactions.ts",
68
+ "dependency-registry:upload-script:mainnet": "NODE_ENV=prod yarn hardhat run --network mainnet ./scripts/propose-add-dependency-script-transactions.ts",
62
69
  "require-low-gas": "yarn hardhat run scripts/require-low-gas.ts --network",
63
70
  "pre-commit": "yarn lint",
64
- "deploy:deprecated:mainnet:v3-engine-shared": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=mainnet yarn hardhat run --network mainnet scripts/engine/V3/generic-engine-shared-suite-deployer.ts",
71
+ "deploy:deprecated:mainnet:v3-engine-shared": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=prod yarn hardhat run --network mainnet scripts/engine/V3/generic-engine-shared-suite-deployer.ts",
65
72
  "deploy:deprecated:dev:v3-engine": "yarn codegen && yarn require-low-gas goerli && NODE_ENV=dev yarn hardhat run --network goerli scripts/engine/V3/deprecated/generic-engine-deployer.ts",
66
73
  "deploy:deprecated:staging:v3-engine": "yarn codegen && yarn require-low-gas goerli && NODE_ENV=staging yarn hardhat run --network goerli scripts/engine/V3/deprecated/generic-engine-deployer.ts",
67
- "deploy:deprecated:dev-arbitrum:v3-engine": "yarn codegen && yarn require-low-gas arbitrum-goerli && NODE_ENV=arbitrum-dev yarn hardhat run --network arbitrum-goerli scripts/engine/V3/deprecated/generic-engine-deployer.ts",
68
- "deploy:deprecated:staging-arbitrum:v3-engine": "yarn codegen && yarn require-low-gas arbitrum-goerli && NODE_ENV=arbitrum-staging yarn hardhat run --network arbitrum-goerli scripts/engine/V3/deprecated/generic-engine-deployer.ts",
69
- "deploy:deprecated:arbitrum:v3-engine": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=arbitrum yarn hardhat run --network arbitrum scripts/engine/V3/deprecated/generic-engine-deployer.ts",
70
- "deploy:deprecated:mainnet:v3-engine": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=mainnet yarn hardhat run --network mainnet scripts/engine/V3/deprecated/generic-engine-deployer.ts",
74
+ "deploy:deprecated:arbitrum:v3-engine": "yarn codegen && yarn require-low-gas arbitrum && NODE_ENV=prod yarn hardhat run --network arbitrum scripts/engine/V3/deprecated/generic-engine-deployer.ts",
75
+ "deploy:deprecated:mainnet:v3-engine": "yarn codegen && yarn require-low-gas mainnet && NODE_ENV=prod yarn hardhat run --network mainnet scripts/engine/V3/deprecated/generic-engine-deployer.ts",
71
76
  "deploy:deprecated:goerli:non-shared-minter": "yarn require-low-gas goerli && yarn hardhat run --network goerli scripts/minter-deployments/V3/generic-minter-deployer-v3core.ts",
72
77
  "deploy:deprecated:mainnet:non-shared-minter": "yarn require-low-gas mainnet && yarn hardhat run --network mainnet scripts/minter-deployments/V3/generic-minter-deployer-v3core.ts"
73
78
  },
74
79
  "devDependencies": {
75
- "@aws-sdk/client-s3": "^3.596.0",
80
+ "@aws-sdk/client-s3": "^3.943.0",
76
81
  "@aws-sdk/credential-providers": "^3.651.1",
77
82
  "@defi-wonderland/smock": "^2.4.0",
78
83
  "@gnosis.pm/safe-contracts": "^1.3.0",
@@ -101,16 +106,16 @@
101
106
  "@types/prompt": "^1.1.8",
102
107
  "@typescript-eslint/eslint-plugin": "^7.13.0",
103
108
  "@typescript-eslint/parser": "^8.17.0",
104
- "aws-sdk-client-mock": "^4.0.1",
109
+ "aws-sdk-client-mock": "^4.1.0",
105
110
  "chai": "^4.3.10",
106
111
  "coveralls": "^3.1.1",
107
- "dotenv": "^16.4.5",
112
+ "dotenv": "^17.2.3",
108
113
  "eslint": "^8.57.0",
109
114
  "eslint-config-custom": "*",
110
115
  "eslint-plugin-mocha": "^10.4.3",
111
116
  "ethers": "^5.7.2",
112
117
  "hardhat": "^2.22.14",
113
- "hardhat-contract-sizer": "^2.10.0",
118
+ "hardhat-contract-sizer": "^2.10.1",
114
119
  "hardhat-docgen": "^1.3.0",
115
120
  "hardhat-gas-reporter": "^2.2.1",
116
121
  "husky": "^9.0.11",
@@ -130,17 +135,27 @@
130
135
  },
131
136
  "author": "Art Blocks, Inc",
132
137
  "license": "LGPL-3.0-only",
138
+ "repository": {
139
+ "type": "git",
140
+ "url": "https://github.com/ArtBlocks/artblocks-contracts.git"
141
+ },
133
142
  "dependencies": {
134
- "@nomicfoundation/hardhat-verify": "^2.0.5",
143
+ "@ethersproject/signing-key": "^5.8.0",
144
+ "@nomicfoundation/hardhat-verify": "^2.0.14",
135
145
  "@openzeppelin-0.5/contracts": "npm:@openzeppelin/contracts@2.5.1",
136
146
  "@openzeppelin-4.5/contracts": "npm:@openzeppelin/contracts@4.5.0",
137
147
  "@openzeppelin-4.7/contracts": "npm:@openzeppelin/contracts@4.7.1",
138
148
  "@openzeppelin-4.8/contracts-upgradeable": "npm:@openzeppelin/contracts-upgradeable@4.8.0",
139
149
  "@openzeppelin-5.0/contracts": "npm:@openzeppelin/contracts@5.0.1",
150
+ "@openzeppelin-5.0/contracts-upgradeable": "npm:@openzeppelin/contracts-upgradeable@5.0.1",
151
+ "@openzeppelin/contracts": "5.0.1",
140
152
  "@urql/exchange-retry": "^1.3.0",
141
153
  "graphql": "^16.8.2",
142
154
  "scripty.sol": "2.1.1",
143
- "solady": "^0.0.181",
155
+ "solady": "^0.1.26",
144
156
  "urql": "^4.2.1"
157
+ },
158
+ "resolutions": {
159
+ "@openzeppelin-5.0/contracts-upgradeable/@openzeppelin/contracts": "5.0.1"
145
160
  }
146
161
  }