@artblocks/contracts 1.2.0 → 1.3.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 (219) hide show
  1. package/README.md +22 -38
  2. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  3. package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +201 -0
  4. package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +201 -0
  5. package/artifacts/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
  6. package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
  7. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +174 -55
  8. package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +2493 -0
  9. package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +311 -0
  10. package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +15 -2
  11. package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +15 -2
  12. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
  13. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
  14. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
  15. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
  16. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
  17. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
  18. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
  19. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
  20. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV4.sol/MinterDALinV4.json +2 -2
  21. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
  22. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
  23. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
  24. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV4.sol/MinterHolderV4.json +2 -2
  25. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
  26. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
  27. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
  28. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
  29. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
  30. package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +37 -0
  31. package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
  32. package/artifacts/contracts/archive/minter-suite/Minters/MinterSEA/MinterSEAV0.sol/MinterSEAV0.json +2 -2
  33. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
  34. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
  35. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
  36. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
  37. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
  38. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
  39. package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +20 -2
  40. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +48 -12
  41. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +76 -40
  42. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +15 -2
  43. package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
  44. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +15 -2
  45. package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +37 -0
  46. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
  47. package/artifacts/contracts/generator/AddressChunks.sol/AddressChunks.json +10 -0
  48. package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +333 -0
  49. package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/ILegacyGenArt721CoreV2_PBAB_Flex.json +47 -0
  50. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +7 -7
  51. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +7 -7
  52. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol/IBytecodeStorageReader_Base.json +30 -0
  53. package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +13 -0
  54. package/artifacts/contracts/interfaces/v0.8.x/IDelegateRegistry.sol/IDelegateRegistry.json +820 -0
  55. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +183 -0
  56. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +37 -0
  57. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +37 -0
  58. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +42 -0
  59. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +42 -0
  60. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +37 -0
  61. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +37 -0
  62. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol/IGenArt721CoreProjectScriptV0.json +59 -0
  63. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol/IGenArt721CoreProjectScriptV1.json +64 -0
  64. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol/IGenArt721CoreTokenHashProviderV0.json +30 -0
  65. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol/IGenArt721CoreTokenHashProviderV1.json +30 -0
  66. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol/IGenArt721GeneratorV0.json +63 -0
  67. package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
  68. package/artifacts/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol/IPMPAugmentHook.json +83 -0
  69. package/artifacts/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol/IPMPConfigureHook.json +80 -0
  70. package/artifacts/contracts/interfaces/v0.8.x/IPMPV0.sol/IPMPV0.json +402 -0
  71. package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
  72. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
  73. package/artifacts/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol/IUniversalBytecodeStorageReader.json +69 -0
  74. package/artifacts/contracts/interfaces/v0.8.x/IWeb3Call.sol/IWeb3Call.json +47 -0
  75. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol/ERC721SeaDropStructsErrorsAndEvents.json +43 -0
  76. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol/INonFungibleSeaDropToken.json +715 -0
  77. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol/ISeaDrop.json +1571 -0
  78. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol/ISeaDropTokenContractMetadata.json +345 -0
  79. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol/SeaDropErrorsAndEvents.json +717 -0
  80. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol/DelegateRegistry.json +846 -0
  81. package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol/RegistryHashes.json +10 -0
  82. package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol/RegistryOps.json +10 -0
  83. package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol/RegistryStorage.json +10 -0
  84. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  85. package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
  86. package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
  87. package/artifacts/contracts/libs/v0.8.x/ImmutableStringArray.sol/ImmutableStringArray.json +10 -0
  88. package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
  89. package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +9 -22
  90. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
  91. package/artifacts/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol/MinPriceLib.json +24 -0
  92. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  93. package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +2 -2
  94. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
  95. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
  96. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
  97. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  98. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
  99. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
  100. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
  101. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
  102. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
  103. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
  104. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +664 -0
  105. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +387 -0
  106. package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +2 -2
  107. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +2 -2
  108. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
  109. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
  110. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
  111. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
  112. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
  113. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
  114. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +2 -2
  115. package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +1206 -0
  116. package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
  117. package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +2 -2
  118. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  119. package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -0
  120. package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +2 -2
  121. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
  122. package/artifacts/contracts/mock/ImmutableStringArrayMock.sol/ImmutableStringArrayMock.json +69 -0
  123. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
  124. package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -0
  125. package/artifacts/contracts/mock/MockPMPAugmentHook.sol/MockPMPAugmentHook.json +214 -0
  126. package/artifacts/contracts/mock/MockPMPConfigureHook.sol/MockPMPConfigureHook.json +236 -0
  127. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  128. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  129. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  130. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  131. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
  132. package/artifacts/contracts/web3call/PMPV0.sol/PMPV0.json +629 -0
  133. package/artifacts/contracts/web3call/Web3Call.sol/Web3Call.json +66 -0
  134. package/artifacts/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol/AbstractPMPAugmentHook.json +83 -0
  135. package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +83 -0
  136. package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/IUniswapV2Pair.json +60 -0
  137. package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +107 -0
  138. package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +96 -0
  139. package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +83 -0
  140. package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +141 -0
  141. package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +99 -0
  142. package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +99 -0
  143. package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +83 -0
  144. package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +107 -0
  145. package/artifacts/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol/AbstractPMPConfigureHook.json +80 -0
  146. package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
  147. package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol +128 -0
  148. package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
  149. package/contracts/BytecodeStorageV2Writer.sol +69 -0
  150. package/contracts/DependencyRegistryV0.sol +296 -88
  151. package/contracts/GenArt721CoreV3_Curated.sol +133 -0
  152. package/contracts/OwnedCreate2FactoryV0.sol +173 -0
  153. package/contracts/engine/V3/EngineFactoryV0.sol +10 -2
  154. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +139 -70
  155. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +148 -72
  156. package/contracts/generator/AddressChunks.sol +106 -0
  157. package/contracts/generator/GenArt721GeneratorV0.sol +1163 -0
  158. package/contracts/generator/scripty-support/Scripty.sol +5 -0
  159. package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
  160. package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +5 -3
  161. package/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol +20 -0
  162. package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +5 -0
  163. package/contracts/interfaces/v0.8.x/IDelegateRegistry.sol +318 -0
  164. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +96 -0
  165. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +13 -2
  166. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +3 -1
  167. package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol +22 -0
  168. package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol +23 -0
  169. package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol +11 -0
  170. package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol +9 -0
  171. package/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol +14 -0
  172. package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
  173. package/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol +31 -0
  174. package/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol +25 -0
  175. package/contracts/interfaces/v0.8.x/IPMPV0.sol +224 -0
  176. package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
  177. package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
  178. package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +10 -4
  179. package/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol +33 -0
  180. package/contracts/interfaces/v0.8.x/IWeb3Call.sol +28 -0
  181. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol +58 -0
  182. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol +186 -0
  183. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol +337 -0
  184. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol +152 -0
  185. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol +320 -0
  186. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol +146 -0
  187. package/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol +753 -0
  188. package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol +359 -0
  189. package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol +31 -0
  190. package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol +87 -0
  191. package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
  192. package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +14 -3
  193. package/contracts/libs/v0.8.x/ImmutableStringArray.sol +289 -0
  194. package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
  195. package/contracts/libs/v0.8.x/V3FlexLib.sol +16 -4
  196. package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
  197. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +107 -0
  198. package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
  199. package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
  200. package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
  201. package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
  202. package/contracts/mock/ImmutableStringArrayMock.sol +47 -0
  203. package/contracts/mock/MockFileStore.sol +22 -0
  204. package/contracts/mock/MockPMPAugmentHook.sol +170 -0
  205. package/contracts/mock/MockPMPConfigureHook.sol +78 -0
  206. package/contracts/web3call/PMPV0.sol +1125 -0
  207. package/contracts/web3call/Web3Call.sol +25 -0
  208. package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +46 -0
  209. package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +57 -0
  210. package/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol +103 -0
  211. package/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol +66 -0
  212. package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +73 -0
  213. package/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol +88 -0
  214. package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +62 -0
  215. package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +60 -0
  216. package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +61 -0
  217. package/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol +69 -0
  218. package/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol +41 -0
  219. package/package.json +23 -21
@@ -0,0 +1,869 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ // @dev fixed to specific solidity version for clarity and for more clear
5
+ // source code verification purposes.
6
+ pragma solidity 0.8.22;
7
+
8
+ import {INonFungibleSeaDropToken} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol";
9
+ import {ISeaDropTokenContractMetadata} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol";
10
+ import {ISeaDrop} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol";
11
+ import {ERC721SeaDropStructsErrorsAndEvents} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol";
12
+ import {PublicDrop, AllowListData, TokenGatedDropStage, SignedMintValidationParams} from "../../../interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol";
13
+ import {ISeaDropShimForContract} from "../../../interfaces/v0.8.x/ISeaDropShimForContract.sol";
14
+ import {IGenArt721CoreContractV3_Base} from "../../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
15
+ import {IGenArt721CoreContractV3_ProjectFinance} from "../../../interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol";
16
+ import {IMinterFilterV1} from "../../../interfaces/v0.8.x/IMinterFilterV1.sol";
17
+ import {ISharedMinterRequired} from "../../../interfaces/v0.8.x/ISharedMinterRequired.sol";
18
+
19
+ import {ERC165} from "@openzeppelin-4.7/contracts/utils/introspection/ERC165.sol";
20
+ import {IERC165} from "@openzeppelin-4.7/contracts/utils/introspection/IERC165.sol";
21
+ import {IERC2981} from "@openzeppelin-4.7/contracts/interfaces/IERC2981.sol";
22
+ import {ReentrancyGuard} from "@openzeppelin-4.7/contracts/security/ReentrancyGuard.sol";
23
+ import {Ownable} from "@openzeppelin-4.7/contracts/access/Ownable.sol";
24
+
25
+ /**
26
+ * @title SeaDropXArtBlocksShim
27
+ * @author Art Blocks Inc.
28
+ * @notice A shim minter to allow OpenSea's SeaDrop system to mint Art Blocks tokens.
29
+ * This contract is a shim layer between the SeaDrop system and the Art Blocks core contract.
30
+ * It allows the SeaDrop system to mint Art Blocks tokens, enforcing the max supply and max mintable
31
+ * by wallet restrictions.
32
+ * The contract is owned by the artist, and the artist can configure the SeaDrop system to mint.
33
+ * The contract is configured at the time of deployment to point to a single Art Blocks project, and
34
+ * can never be updated.
35
+ * A core contract is expected to set this contract as its minter, bypassing the typical Shared Minter Suite.
36
+ * This contract does not support setting the baseURI, or fee recipients, as these are configured on the
37
+ * Art Blocks core contract.
38
+ * maxSupply is configurable on this contract, but should be less than or equal to the project's max invocations.
39
+ * This contract does not support contractURI or provenanceHash, as these are not supported on Art Blocks contracts.
40
+ * SeaDrop must be configured to route primary sales to the appropriate creator payout address. This will likely be a
41
+ * splitter wallet that distributes funds to the artist and other parties such as render provider. The process is not
42
+ * automated and must be done manually by the artist via the SeaDrop UI.
43
+ * Any secondary fee recipients configured through SeaDrop will not be enforced on tokens minted through this shim,
44
+ * as the fees are configured on the Art Blocks core contract for the tokens that are minted.
45
+ */
46
+ contract SeaDropXArtBlocksShim is
47
+ ISeaDropShimForContract,
48
+ INonFungibleSeaDropToken,
49
+ ISharedMinterRequired,
50
+ ERC721SeaDropStructsErrorsAndEvents,
51
+ ERC165,
52
+ Ownable,
53
+ ReentrancyGuard
54
+ {
55
+ /// minterType for this minter
56
+ // @dev no version due to no plan of indexing the minter in AB subgraph
57
+ string public constant minterType = "SeaDropXArtBlocksShim";
58
+
59
+ /// @notice The immutable project ID for the Art Blocks project.
60
+ uint256 public immutable projectId;
61
+
62
+ /// @notice The SeaDrop contract allowed to mint on this shim layer.
63
+ ISeaDrop public immutable allowedSeaDrop;
64
+
65
+ /// @notice The Art Blocks core contract for the project.
66
+ IGenArt721CoreContractV3_Base public immutable genArt721Core;
67
+
68
+ /// Minter filter this minter may interact with.
69
+ IMinterFilterV1 public immutable minterFilter;
70
+
71
+ /// @notice mapping of minter address to number of tokens minted on this contract
72
+ mapping(address => uint256) public minterNumMinted;
73
+
74
+ /// @notice local max supply for this contract, enforced by this contract. Defers to core if 0 or > core max invocations
75
+ uint256 public localMaxSupply;
76
+
77
+ // --- internal modifier-like functions ---
78
+
79
+ /**
80
+ * @notice Reverts if not an allowed SeaDrop contract.
81
+ * This function is inlined instead of being a modifier
82
+ * to save contract space from being inlined N times.
83
+ * @param seaDrop The SeaDrop address to check if allowed.
84
+ */
85
+ function _onlyAllowedSeaDrop(address seaDrop) internal view {
86
+ if (seaDrop != address(allowedSeaDrop)) {
87
+ revert OnlyAllowedSeaDrop();
88
+ }
89
+ }
90
+
91
+ /**
92
+ * @notice Reverts if `msgSender` is not the artist or self.
93
+ * This function is inlined instead of being a modifier
94
+ * to save contract space from being inlined N times.
95
+ * @param msgSender The address to check if artist or self.
96
+ */
97
+ function _onlyArtistOrSelf(address msgSender) internal view {
98
+ if (
99
+ msgSender != address(this) &&
100
+ msgSender != genArt721Core.projectIdToArtistAddress(projectId)
101
+ ) {
102
+ revert(
103
+ "SeaDropXArtBlocksShim: Only the artist or self may call this function"
104
+ );
105
+ }
106
+ }
107
+
108
+ /**
109
+ * @notice Reverts if `msgSender` is not the artist.
110
+ * This function is inlined instead of being a modifier
111
+ * to save contract space from being inlined N times.
112
+ * @param msgSender The address to check if artist.
113
+ */
114
+ function _onlyArtist(address msgSender) internal view {
115
+ if (msgSender != genArt721Core.projectIdToArtistAddress(projectId)) {
116
+ revert(
117
+ "SeaDropXArtBlocksShim: Only the artist may call this function"
118
+ );
119
+ }
120
+ }
121
+
122
+ /**
123
+ * @notice Constructor for the SeaDropXArtBlocksShim contract.
124
+ * Transfers ownership to the artist address for the project, as indicated by the core contract.
125
+ * @dev The ownership of this contract only affects frontend displays, and does not affect the permissions of
126
+ * configuring drop settings.
127
+ * allowedSeaDrop, genArt721Core, and projectId are immutable and cannot be updated.
128
+ * @param minterFilter_ Minter filter for which this will be a filtered minter.
129
+ * @param allowedSeaDrop_ The SeaDrop contract allowed to mint on this shim layer.
130
+ * @param genArt721Core_ The core contract for the Art Blocks project.
131
+ * @param projectId_ The project ID for the Art Blocks project.
132
+ */
133
+ constructor(
134
+ IMinterFilterV1 minterFilter_,
135
+ ISeaDrop allowedSeaDrop_,
136
+ IGenArt721CoreContractV3_Base genArt721Core_,
137
+ uint256 projectId_
138
+ ) Ownable() {
139
+ minterFilter = minterFilter_;
140
+ allowedSeaDrop = allowedSeaDrop_;
141
+ genArt721Core = genArt721Core_;
142
+ projectId = projectId_;
143
+ // set ownership to be the artist (snapshot)
144
+ // @dev if artist address is updated on the core contract, use the function syncOwnerToArtistAddress to update
145
+ // the ownership of this contract to the new artist address. The ownership of this contract only affects
146
+ // frontend displays, and does not affect the permissions of configuring drop settings.
147
+ _transferOwnership(genArt721Core.projectIdToArtistAddress(projectId_));
148
+ // emit SeaDrop event for indexing purposes
149
+ emit SeaDropTokenDeployed();
150
+ // indicate this is a shim layer that mints tokens on a different contract, for OpenSea's indexing purposes
151
+ emit SeaDropShimForContract(address(genArt721Core_));
152
+ }
153
+
154
+ // -- external functions to sync ownership for UI --
155
+
156
+ /**
157
+ * @notice Sync the ownership of this contract to the artist address on the core contract.
158
+ * This function is useful if the artist address is updated on the core contract.
159
+ * The ownership of this contract only affects frontend displays, and does not affect the permissions of
160
+ * configuring drop settings.
161
+ * @dev intentionally unpermissioned, as this function only syncs state and is not manipulatable by untrusted
162
+ * third parties.
163
+ */
164
+ function syncOwnerToArtistAddress() external {
165
+ _transferOwnership(genArt721Core.projectIdToArtistAddress(projectId));
166
+ }
167
+
168
+ // --- external functions from INonFungibleSeaDropToken ---
169
+
170
+ /**
171
+ *
172
+ * @notice Update the allowed SeaDrop contract.
173
+ * Reverts - not supported on this contract.
174
+ */
175
+ function updateAllowedSeaDrop(
176
+ address[] calldata /*allowedSeaDrop*/
177
+ ) external pure {
178
+ revert("SeaDropXArtBlocksShim: updateAllowedSeaDrop not supported");
179
+ }
180
+
181
+ /**
182
+ * @notice Mint tokens, restricted to the SeaDrop contract.
183
+ * @param minter The address to mint to.
184
+ * @param quantity The number of tokens to mint.
185
+ */
186
+ function mintSeaDrop(
187
+ address minter,
188
+ uint256 quantity
189
+ ) external virtual override nonReentrant {
190
+ // Ensure the caller is an allowed SeaDrop contract
191
+ _onlyAllowedSeaDrop(msg.sender);
192
+
193
+ // check max supply, considering the local max supply and the core project's max invocations
194
+ // @dev block scope to free up stack
195
+ {
196
+ (
197
+ uint256 invocations,
198
+ uint256 maxInvocations
199
+ ) = _getInvocationsDataFromCore();
200
+ uint256 maxSupply_ = _calcMaxSupply({
201
+ coreMaxInvocations: maxInvocations,
202
+ localMaxSupply_: localMaxSupply
203
+ });
204
+ if (invocations + quantity > maxSupply_) {
205
+ revert MintQuantityExceedsMaxSupply(
206
+ invocations + quantity,
207
+ maxSupply_
208
+ );
209
+ }
210
+ }
211
+
212
+ // EFFECTS
213
+ // track the number of tokens minted by the minter via this contract to enforce maxTotalMintableByWallet
214
+ minterNumMinted[minter] += quantity;
215
+ // @dev Art Blocks core contract updates total minted - no need to track here
216
+
217
+ // INTERACTIONS
218
+ // Mint the quantity of tokens to the minter
219
+ for (uint256 i = 0; i < quantity; i++) {
220
+ minterFilter.mint_joo({
221
+ to: minter,
222
+ projectId: projectId,
223
+ coreContract: address(genArt721Core),
224
+ sender: msg.sender
225
+ });
226
+ }
227
+ }
228
+
229
+ /**
230
+ * @notice Update the public drop data for this nft contract on SeaDrop.
231
+ * Only the artist can use this function.
232
+ * @param seaDropImpl The allowed SeaDrop contract.
233
+ * @param publicDrop The public drop data.
234
+ */
235
+ function updatePublicDrop(
236
+ address seaDropImpl,
237
+ PublicDrop calldata publicDrop
238
+ ) external {
239
+ // CHECKS
240
+ // sender must be artist or contract itself
241
+ _onlyArtistOrSelf(msg.sender);
242
+ // only update the allowed SeaDrop contract
243
+ _onlyAllowedSeaDrop(seaDropImpl);
244
+
245
+ // EFFECTS
246
+ // update the public drop data on SeeaDrop
247
+ allowedSeaDrop.updatePublicDrop(publicDrop);
248
+ }
249
+
250
+ /**
251
+ * @notice Update the allow list data for this nft contract on SeaDrop.
252
+ * Only the artist can use this function.
253
+ * @param seaDropImpl The allowed SeaDrop contract.
254
+ * @param allowListData The allow list data.
255
+ */
256
+ function updateAllowList(
257
+ address seaDropImpl,
258
+ AllowListData calldata allowListData
259
+ ) external virtual override {
260
+ // CHECKS
261
+ // sender must be artist or contract itself
262
+ _onlyArtistOrSelf(msg.sender);
263
+ // only update the allowed SeaDrop contract
264
+ _onlyAllowedSeaDrop(seaDropImpl);
265
+
266
+ // EFFECTS
267
+ // Update the allow list on SeaDrop.
268
+ ISeaDrop(seaDropImpl).updateAllowList(allowListData);
269
+ }
270
+
271
+ /**
272
+ * @notice Update the token gated drop stage data for this nft contract on SeaDrop.
273
+ * Only the artist can use this function.
274
+ *
275
+ * Note: If two INonFungibleSeaDropToken tokens are doing
276
+ * simultaneous token gated drop promotions for each other,
277
+ * they can be minted by the same actor until
278
+ * `maxTokenSupplyForStage` is reached. Please ensure the
279
+ * `allowedNftToken` is not running an active drop during the
280
+ * `dropStage` time period.
281
+ * @param seaDropImpl The allowed SeaDrop contract.
282
+ * @param allowedNftToken The allowed nft token.
283
+ * @param dropStage The token gated drop stage data.
284
+ */
285
+ function updateTokenGatedDrop(
286
+ address seaDropImpl,
287
+ address allowedNftToken,
288
+ TokenGatedDropStage calldata dropStage
289
+ ) external virtual override {
290
+ // CHECKS
291
+ // sender must be artist or contract itself
292
+ _onlyArtistOrSelf(msg.sender);
293
+ // only update the allowed SeaDrop contract
294
+ _onlyAllowedSeaDrop(seaDropImpl);
295
+
296
+ // EFFECTS
297
+ // Update the token gated drop stage.
298
+ ISeaDrop(seaDropImpl).updateTokenGatedDrop(allowedNftToken, dropStage);
299
+ }
300
+
301
+ /**
302
+ * @notice Update the drop URI for this nft contract on SeaDrop.
303
+ * Only the artist can use this function.
304
+ * @param seaDropImpl The allowed SeaDrop contract.
305
+ * @param dropURI The new drop URI.
306
+ */
307
+ function updateDropURI(
308
+ address seaDropImpl,
309
+ string calldata dropURI
310
+ ) external virtual override {
311
+ // CHECKS
312
+ // sender must be artist or contract itself
313
+ _onlyArtistOrSelf(msg.sender);
314
+ // only update the allowed SeaDrop contract
315
+ _onlyAllowedSeaDrop(seaDropImpl);
316
+
317
+ // EFFECTS
318
+ // Update the drop URI.
319
+ ISeaDrop(seaDropImpl).updateDropURI(dropURI);
320
+ }
321
+
322
+ /**
323
+ * @notice Update the creator payout address for this nft contract on SeaDrop.
324
+ * Only the artist can set the creator payout address.
325
+ * @param seaDropImpl The allowed SeaDrop contract.
326
+ * @param payoutAddress The new payout address.
327
+ */
328
+ function updateCreatorPayoutAddress(
329
+ address seaDropImpl,
330
+ address payoutAddress
331
+ ) external virtual override {
332
+ // CHECKS
333
+ // sender must be artist or contract itself
334
+ _onlyArtistOrSelf(msg.sender);
335
+ // only update the allowed SeaDrop contract
336
+ _onlyAllowedSeaDrop(seaDropImpl);
337
+
338
+ // EFFECTS
339
+ // Update the creator payout address.
340
+ ISeaDrop(seaDropImpl).updateCreatorPayoutAddress(payoutAddress);
341
+ }
342
+
343
+ /**
344
+ * @notice Update the allowed fee recipient for this nft contract on SeaDrop.
345
+ * Note: ERC2981 fees must be configured on the Art Blocks core contract. This setting has no effect on tokens
346
+ * minted on the core contract that this shim layer is for.
347
+ * @param seaDropImpl The allowed SeaDrop contract.
348
+ * @param feeRecipient The new fee recipient.
349
+ * @param allowed Whether the fee recipient is allowed.
350
+ */
351
+ function updateAllowedFeeRecipient(
352
+ address seaDropImpl,
353
+ address feeRecipient,
354
+ bool allowed
355
+ ) external virtual override {
356
+ // CHECKS
357
+ // sender must be artist or contract itself
358
+ _onlyArtistOrSelf(msg.sender);
359
+ // only update the allowed SeaDrop contract
360
+ _onlyAllowedSeaDrop(seaDropImpl);
361
+
362
+ // EFFECTS
363
+ // Update the allowed fee recipient.
364
+ ISeaDrop(seaDropImpl).updateAllowedFeeRecipient(feeRecipient, allowed);
365
+ }
366
+
367
+ /**
368
+ * @notice Update the server-side signers for this nft contract on SeaDrop.
369
+ * Only the artist can use this function.
370
+ * @param seaDropImpl The allowed SeaDrop contract.
371
+ * @param signer The signer to update.
372
+ * @param signedMintValidationParams Minimum and maximum parameters to enforce for signed mints.
373
+ */
374
+ function updateSignedMintValidationParams(
375
+ address seaDropImpl,
376
+ address signer,
377
+ SignedMintValidationParams memory signedMintValidationParams
378
+ ) external virtual override {
379
+ // CHECKS
380
+ // sender must be artist or contract itself
381
+ _onlyArtistOrSelf(msg.sender);
382
+ // only update the allowed SeaDrop contract
383
+ _onlyAllowedSeaDrop(seaDropImpl);
384
+
385
+ // EFFECTS
386
+ // Update the signer.
387
+ ISeaDrop(seaDropImpl).updateSignedMintValidationParams(
388
+ signer,
389
+ signedMintValidationParams
390
+ );
391
+ }
392
+
393
+ /**
394
+ * @notice Update the allowed payers for this nft contract on SeaDrop.
395
+ * Only the artist can use this function.
396
+ * @param seaDropImpl The allowed SeaDrop contract.
397
+ * @param payer The payer to update.
398
+ * @param allowed Whether the payer is allowed.
399
+ */
400
+ function updatePayer(
401
+ address seaDropImpl,
402
+ address payer,
403
+ bool allowed
404
+ ) external virtual override {
405
+ // CHECKS
406
+ // sender must be artist or contract itself
407
+ _onlyArtistOrSelf(msg.sender);
408
+ // only update the allowed SeaDrop contract
409
+ _onlyAllowedSeaDrop(seaDropImpl);
410
+
411
+ // EFFECTS
412
+ // Update the payer.
413
+ ISeaDrop(seaDropImpl).updatePayer(payer, allowed);
414
+ }
415
+
416
+ // --- external functions from ISeaDropTokenContractMetadata ---
417
+
418
+ /**
419
+ * @notice Sets the base URI for the token metadata and emits an event.
420
+ * Reverts - baseURI must be configured on the Art Blocks core contract.
421
+ */
422
+ function setBaseURI(string calldata /*tokenURI*/) external pure {
423
+ revert(
424
+ "SeaDropXArtBlocksShim: baseURI must be configured on the Art Blocks core contract"
425
+ );
426
+ }
427
+
428
+ /**
429
+ * @notice Sets the contract URI for contract metadata.
430
+ * Reverts - contractURI is not supported on the Art Blocks core contract.
431
+ */
432
+ function setContractURI(string calldata /*newContractURI*/) external pure {
433
+ revert(
434
+ "SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
435
+ );
436
+ }
437
+
438
+ /**
439
+ * @notice Sets the max supply and emits an event.
440
+ * newMaxSupply must be less than or equal to the project's maxInvocations configured on the Art Blocks core
441
+ * contract.
442
+ * @dev this function enables SeaDrop to enforce a minter-local max invocations, while still deferring to the core
443
+ * contract for the project's total max invocations.
444
+ * @param newMaxSupply The new max supply to limit this shim minter to. Stored locally - does not affect max
445
+ * invocations on the core contract.
446
+ */
447
+ function setMaxSupply(uint256 newMaxSupply) external {
448
+ // CHECKS
449
+ _onlyArtistOrSelf(msg.sender);
450
+
451
+ // ensure maxSupply lte project's max invocations on core contract
452
+ (, uint256 maxInvocations) = _getInvocationsDataFromCore();
453
+ if (newMaxSupply > maxInvocations) {
454
+ revert(
455
+ "SeaDropXArtBlocksShim: Only newMaxSupply lte max invocations on the Art Blocks core contract"
456
+ );
457
+ }
458
+
459
+ // EFFECTS
460
+ // set the local max supply
461
+ localMaxSupply = newMaxSupply;
462
+ emit LocalMaxSupplyUpdated(newMaxSupply);
463
+ }
464
+
465
+ /**
466
+ * @notice Sets the provenance hash and emits an event.
467
+ * Reverts - provenanceHash is not supported on the Art Blocks core contract.
468
+ */
469
+ function setProvenanceHash(bytes32 /*newProvenanceHash*/) external pure {
470
+ revert(
471
+ "SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
472
+ );
473
+ }
474
+
475
+ /**
476
+ * @notice Sets the address and basis points for royalties.
477
+ * Reverts - royalties must be configured on the Art Blocks core contract.
478
+ */
479
+ function setRoyaltyInfo(RoyaltyInfo calldata /*newInfo*/) external pure {
480
+ revert(
481
+ "SeaDropXArtBlocksShim: royalties must be configured on the Art Blocks core contract"
482
+ );
483
+ }
484
+
485
+ // --- external functions from https://github.com/ProjectOpenSea/seadrop/blob/main/src/ERC721SeaDrop.sol ---
486
+
487
+ /**
488
+ * @notice Configure multiple properties at a time.
489
+ * Note: The individual configure methods should be used to unset or reset any properties to zero, as this method
490
+ * will ignore zero-value properties in the config struct.
491
+ * The following parameters are not supported in this function, will cause revert, and should be configured on the
492
+ * Art Blocks core contract directly:
493
+ * - maxSupply
494
+ * - baseURI
495
+ * - allowedFeeRecipients
496
+ * - disallowedFeeRecipients
497
+ * The following parameters are not supported by Art Blocks contracts and will cause revert:
498
+ * - contractURI
499
+ * - provenanceHash
500
+ * @dev logic for supported operations is taken from example SeaDrop implementation, and was tested end-to-end, and
501
+ * therefore may not be covered in this repository's tests. Unsupported operations are tested for reversion.
502
+ * @param config The configuration struct.
503
+ */
504
+ function multiConfigure(MultiConfigureStruct calldata config) external {
505
+ // CHECKS
506
+ _onlyArtist(msg.sender);
507
+
508
+ // INTERACTIONS w/self
509
+ if (config.maxSupply > 0) {
510
+ this.setMaxSupply(config.maxSupply);
511
+ }
512
+ if (bytes(config.baseURI).length != 0) {
513
+ revert(
514
+ "SeaDropXArtBlocksShim: baseURI must be configured on the Art Blocks core contract"
515
+ );
516
+ }
517
+ if (bytes(config.contractURI).length != 0) {
518
+ revert(
519
+ "SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
520
+ );
521
+ }
522
+ if (
523
+ config.publicDrop.startTime != 0 || config.publicDrop.endTime != 0
524
+ ) {
525
+ this.updatePublicDrop(config.seaDropImpl, config.publicDrop);
526
+ }
527
+ if (bytes(config.dropURI).length != 0) {
528
+ this.updateDropURI(config.seaDropImpl, config.dropURI);
529
+ }
530
+ if (config.allowListData.merkleRoot != bytes32(0)) {
531
+ this.updateAllowList(config.seaDropImpl, config.allowListData);
532
+ }
533
+ if (config.creatorPayoutAddress != address(0)) {
534
+ this.updateCreatorPayoutAddress(
535
+ config.seaDropImpl,
536
+ config.creatorPayoutAddress
537
+ );
538
+ }
539
+ if (config.provenanceHash != bytes32(0)) {
540
+ revert(
541
+ "SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
542
+ );
543
+ }
544
+ if (config.allowedFeeRecipients.length > 0) {
545
+ for (uint256 i = 0; i < config.allowedFeeRecipients.length; ) {
546
+ this.updateAllowedFeeRecipient(
547
+ config.seaDropImpl,
548
+ config.allowedFeeRecipients[i],
549
+ true
550
+ );
551
+ unchecked {
552
+ ++i;
553
+ }
554
+ }
555
+ }
556
+ if (config.disallowedFeeRecipients.length > 0) {
557
+ for (uint256 i = 0; i < config.disallowedFeeRecipients.length; ) {
558
+ this.updateAllowedFeeRecipient(
559
+ config.seaDropImpl,
560
+ config.disallowedFeeRecipients[i],
561
+ false
562
+ );
563
+ unchecked {
564
+ ++i;
565
+ }
566
+ }
567
+ }
568
+ if (config.allowedPayers.length > 0) {
569
+ for (uint256 i = 0; i < config.allowedPayers.length; ) {
570
+ this.updatePayer(
571
+ config.seaDropImpl,
572
+ config.allowedPayers[i],
573
+ true
574
+ );
575
+ unchecked {
576
+ ++i;
577
+ }
578
+ }
579
+ }
580
+ if (config.disallowedPayers.length > 0) {
581
+ for (uint256 i = 0; i < config.disallowedPayers.length; ) {
582
+ this.updatePayer(
583
+ config.seaDropImpl,
584
+ config.disallowedPayers[i],
585
+ false
586
+ );
587
+ unchecked {
588
+ ++i;
589
+ }
590
+ }
591
+ }
592
+ if (config.tokenGatedDropStages.length > 0) {
593
+ if (
594
+ config.tokenGatedDropStages.length !=
595
+ config.tokenGatedAllowedNftTokens.length
596
+ ) {
597
+ revert TokenGatedMismatch();
598
+ }
599
+ for (uint256 i = 0; i < config.tokenGatedDropStages.length; ) {
600
+ this.updateTokenGatedDrop(
601
+ config.seaDropImpl,
602
+ config.tokenGatedAllowedNftTokens[i],
603
+ config.tokenGatedDropStages[i]
604
+ );
605
+ unchecked {
606
+ ++i;
607
+ }
608
+ }
609
+ }
610
+ if (config.disallowedTokenGatedAllowedNftTokens.length > 0) {
611
+ for (
612
+ uint256 i = 0;
613
+ i < config.disallowedTokenGatedAllowedNftTokens.length;
614
+
615
+ ) {
616
+ TokenGatedDropStage memory emptyStage;
617
+ this.updateTokenGatedDrop(
618
+ config.seaDropImpl,
619
+ config.disallowedTokenGatedAllowedNftTokens[i],
620
+ emptyStage
621
+ );
622
+ unchecked {
623
+ ++i;
624
+ }
625
+ }
626
+ }
627
+ if (config.signedMintValidationParams.length > 0) {
628
+ if (
629
+ config.signedMintValidationParams.length !=
630
+ config.signers.length
631
+ ) {
632
+ revert SignersMismatch();
633
+ }
634
+ for (
635
+ uint256 i = 0;
636
+ i < config.signedMintValidationParams.length;
637
+
638
+ ) {
639
+ this.updateSignedMintValidationParams(
640
+ config.seaDropImpl,
641
+ config.signers[i],
642
+ config.signedMintValidationParams[i]
643
+ );
644
+ unchecked {
645
+ ++i;
646
+ }
647
+ }
648
+ }
649
+ if (config.disallowedSigners.length > 0) {
650
+ for (uint256 i = 0; i < config.disallowedSigners.length; ) {
651
+ SignedMintValidationParams memory emptyParams;
652
+ this.updateSignedMintValidationParams(
653
+ config.seaDropImpl,
654
+ config.disallowedSigners[i],
655
+ emptyParams
656
+ );
657
+ unchecked {
658
+ ++i;
659
+ }
660
+ }
661
+ }
662
+ }
663
+
664
+ // -- required shared minter view functions for minter suite compatibility (ISharedMinterRequired) --
665
+
666
+ // @dev minterType requirement satisfied by public constant minterType
667
+
668
+ /**
669
+ * @notice Returns the minter's associated shared minter filter address.
670
+ * @dev used by subgraph indexing service for entity relation purposes.
671
+ * @return The minter filter address.
672
+ */
673
+ function minterFilterAddress() external view returns (address) {
674
+ return address(minterFilter);
675
+ }
676
+
677
+ // --- public view functions from INonFungibleSeaDropToken ---
678
+
679
+ /**
680
+ * @notice Returns a set of mint stats for the address. This assists SeaDrop in enforcing maxSupply,
681
+ * maxTotalMintableByWallet, and maxTokenSupplyForStage checks.
682
+ * @param minter The minter address.
683
+ * @return minterNumMinted_ The number of tokens minted by the minter.
684
+ * @return currentTotalSupply The current total supply of the project (sourced from the core contract).
685
+ * @return maxSupply_ The max supply of the project (sourced from the core contract).
686
+ */
687
+ function getMintStats(
688
+ address minter
689
+ )
690
+ external
691
+ view
692
+ override
693
+ returns (
694
+ uint256 minterNumMinted_,
695
+ uint256 currentTotalSupply,
696
+ uint256 maxSupply_
697
+ )
698
+ {
699
+ // @dev only able to track mint qty performed via this contract; Art Blocks does not implement ERC721Enumerable
700
+ minterNumMinted_ = minterNumMinted[minter];
701
+
702
+ // defer to the core contract for the current supply details, for configured project
703
+ (
704
+ uint256 invocations,
705
+ uint256 maxInvocations
706
+ ) = _getInvocationsDataFromCore();
707
+ // current supply is number of invocations for the configured project
708
+ currentTotalSupply = invocations;
709
+ // max supply depends on the local max supply and the core project's max invocations
710
+ maxSupply_ = _calcMaxSupply({
711
+ coreMaxInvocations: maxInvocations,
712
+ localMaxSupply_: localMaxSupply
713
+ });
714
+ }
715
+
716
+ // --- public view functions from ISeaDropTokenContractMetadata ---
717
+ /**
718
+ * @notice Returns the base URI for token metadata.
719
+ * @return The base URI.
720
+ */
721
+ function baseURI() external view returns (string memory) {
722
+ return genArt721Core.projectURIInfo(projectId);
723
+ }
724
+
725
+ /**
726
+ * @notice Returns the contract URI.
727
+ * Reverts, because the contract URI is not supported on Art Blocks contracts.
728
+ */
729
+ function contractURI() external pure returns (string memory) {
730
+ // return "https://external-link-url.com/my-contract-metadata.json";
731
+ revert(
732
+ "SeaDropXArtBlocksShim: contractURI not supported on the Art Blocks core contract"
733
+ );
734
+ }
735
+
736
+ /**
737
+ * @notice Returns the max token supply for the configured project.
738
+ */
739
+ function maxSupply() external view returns (uint256) {
740
+ // defer to the core contract for the current supply details, for configured project
741
+ (, uint256 maxInvocations) = _getInvocationsDataFromCore();
742
+ return
743
+ _calcMaxSupply({
744
+ coreMaxInvocations: maxInvocations,
745
+ localMaxSupply_: localMaxSupply
746
+ });
747
+ }
748
+
749
+ /**
750
+ * @notice Returns the provenance hash.
751
+ * Reverts - provenance hash is not supported on Art Blocks contracts.
752
+ */
753
+ function provenanceHash() external pure returns (bytes32) {
754
+ revert(
755
+ "SeaDropXArtBlocksShim: provenance hash not supported on Art Blocks contracts"
756
+ );
757
+ }
758
+
759
+ /**
760
+ * @notice Returns the address that receives royalties.
761
+ * @dev defers to the core contract for the royalty splitter address, for configured project.
762
+ * @return The address that receives royalties.
763
+ */
764
+ function royaltyAddress() external view returns (address) {
765
+ // defer to the core contract for the royalty splitter address, for configured project
766
+ // @dev assumes v3.2 or later, where the ERC2981 royaltySplitter is stored in the project financials
767
+ return
768
+ IGenArt721CoreContractV3_ProjectFinance(address(genArt721Core))
769
+ .projectIdToFinancials(projectId)
770
+ .royaltySplitter;
771
+ }
772
+
773
+ /**
774
+ * @notice Returns the royalty basis points out of 10_000.
775
+ * @dev defers to the core contract for the royalty basis points, for configured project.
776
+ * @return The royalty basis points.
777
+ */
778
+ function royaltyBasisPoints() external view returns (uint256) {
779
+ // defer to the core contract for the royalty basis points, for configured project
780
+ // @dev assumes v3.2 or later, where the ERC2981 royaltySplitter is stored in the project financials
781
+ IGenArt721CoreContractV3_ProjectFinance.ProjectFinance
782
+ memory financials = IGenArt721CoreContractV3_ProjectFinance(
783
+ address(genArt721Core)
784
+ ).projectIdToFinancials(projectId);
785
+ // total royalty basis points is the sum of the artist's royalty percentage converted to BPS, the platform
786
+ // provider's secondary sales BPS, and the render provider's secondary sales BPS
787
+ // @dev uint256 required to avoid overflow for reasonable royalty percentages
788
+ return
789
+ (uint256(financials.secondaryMarketRoyaltyPercentage) * 100) +
790
+ financials.platformProviderSecondarySalesBPS +
791
+ financials.renderProviderSecondarySalesBPS;
792
+ }
793
+
794
+ // --- public view functions from IERC2981 ---
795
+
796
+ /**
797
+ * @notice Returns the royalty receiver and amount for a given token ID and sale price.
798
+ * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
799
+ * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
800
+ * @param tokenId The token ID for which royalty information is needed.
801
+ * @param salePrice The sale price of the token.
802
+ * @return receiver The address of the royalty receiver.
803
+ * @return royaltyAmount The amount of royalty that is owed.
804
+ */
805
+ function royaltyInfo(
806
+ uint256 tokenId,
807
+ uint256 salePrice
808
+ ) external view returns (address receiver, uint256 royaltyAmount) {
809
+ // defer to the core contract for the royalty receiver and amount, for the given token ID
810
+ // @dev assumes v3.2 or later, where ERC2981 is supported
811
+ return
812
+ IERC2981(address(genArt721Core)).royaltyInfo({
813
+ tokenId: tokenId,
814
+ salePrice: salePrice
815
+ });
816
+ }
817
+
818
+ // --- public view functions from IERC165 ---
819
+
820
+ /**
821
+ * @notice Returns whether the interface is supported.
822
+ * @param interfaceId The interface id to check against.
823
+ * @return Whether the interface is supported.
824
+ */
825
+ function supportsInterface(
826
+ bytes4 interfaceId
827
+ ) public view virtual override(ERC165, IERC165) returns (bool) {
828
+ // @dev no coverage
829
+ // Note: do not support ERC721, ERC721Metadata in this shim layer
830
+ return
831
+ interfaceId == type(INonFungibleSeaDropToken).interfaceId ||
832
+ interfaceId == type(ISeaDropTokenContractMetadata).interfaceId ||
833
+ interfaceId == type(IERC2981).interfaceId ||
834
+ // ERC165 returns supportsInterface true for ERC165
835
+ super.supportsInterface(interfaceId);
836
+ }
837
+
838
+ /**
839
+ * @notice Returns the invocations and max invocations for the configured project, from the core contract.
840
+ * @return invocations The number of invocations for the configured project.
841
+ * @return maxInvocations The max invocations for the configured project.
842
+ */
843
+ function _getInvocationsDataFromCore()
844
+ private
845
+ view
846
+ returns (uint256 invocations, uint256 maxInvocations)
847
+ {
848
+ (invocations, maxInvocations, , , , ) = genArt721Core.projectStateData(
849
+ projectId
850
+ );
851
+ }
852
+
853
+ /**
854
+ * helper function to calculate the max supply for this contract, based on the core max invocations and local max
855
+ * supply.
856
+ * @dev if localMaxSupply is 0 or > coreMaxInvocations, defers to coreMaxInvocations
857
+ * @param coreMaxInvocations The max invocations for the configured project on the Art Blocks core contract.
858
+ * @param localMaxSupply_ The local max supply for this contract (configured via setMaxSupply).
859
+ */
860
+ function _calcMaxSupply(
861
+ uint256 coreMaxInvocations,
862
+ uint256 localMaxSupply_
863
+ ) private pure returns (uint256) {
864
+ return
865
+ localMaxSupply_ == 0 || localMaxSupply_ > coreMaxInvocations
866
+ ? coreMaxInvocations
867
+ : localMaxSupply_;
868
+ }
869
+ }