@artblocks/contracts 1.0.3 → 1.1.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 (383) hide show
  1. package/README.md +32 -25
  2. package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
  3. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  4. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +212 -17
  5. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +6 -6
  6. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV0.sol/MinterDAExpV0.json +2 -2
  7. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV1.sol/MinterDAExpV1.json +2 -2
  8. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
  9. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
  10. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
  11. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
  12. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV0.sol/MinterDALinV0.json +2 -2
  13. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV1.sol/MinterDALinV1.json +2 -2
  14. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
  15. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
  16. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV0.sol/MinterHolderV0.json +2 -2
  17. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
  18. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
  19. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
  20. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV0.sol/MinterMerkleV0.json +2 -2
  21. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
  22. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
  23. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
  24. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
  25. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV0.sol/MinterSetPriceV0.json +2 -2
  26. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV1.sol/MinterSetPriceV1.json +2 -2
  27. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
  28. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
  29. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +2 -2
  30. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +2 -2
  31. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
  32. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
  33. package/artifacts/contracts/engine/V2/GenArt721CoreV2_ENGINE_FLEX.sol/GenArt721CoreV2_ENGINE_FLEX.json +2 -2
  34. package/artifacts/contracts/engine/V2/GenArt721CoreV2_PBAB.sol/GenArt721CoreV2_PBAB.json +2 -2
  35. package/artifacts/contracts/engine/V2/GenArt721CoreV2_PRTNR.sol/GenArt721CoreV2_PRTNR.json +2 -2
  36. package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +2 -2
  37. package/artifacts/contracts/engine/V2/GenArt721MinterDAExp_PBAB.sol/GenArt721MinterDAExp_PBAB.json +2 -2
  38. package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +2 -2
  39. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +6 -11
  40. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +6 -11
  41. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +6 -11
  42. package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
  43. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +6 -11
  44. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
  45. package/artifacts/contracts/engine-registry/EngineRegistryV0.sol/EngineRegistryV0.json +2 -2
  46. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +6 -6
  47. package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IBonusContract.sol/IBonusContract.json +1 -1
  48. package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +1 -1
  49. package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +1 -1
  50. package/artifacts/contracts/interfaces/{0.5.x → v0.5.x}/IRandomizer.sol/IRandomizer.json +1 -1
  51. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IAdminACLV0.sol/IAdminACLV0.json +1 -1
  52. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IArtblocksRoyaltyOverride.sol/IArtblocksRoyaltyOverride.json +1 -1
  53. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IBonusContract.sol/IBonusContract.json +1 -1
  54. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +1 -1
  55. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ICoreRegistryV1.sol/ICoreRegistryV1.json +7 -7
  56. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDelegationRegistry.sol/IDelegationRegistry.json +1 -1
  57. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryCompatibleV0.sol/IDependencyRegistryCompatibleV0.json +1 -1
  58. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +22 -3
  59. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IEngineRegistryV0.sol/IEngineRegistryV0.json +1 -1
  60. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +1 -1
  61. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +1 -1
  62. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlement_Mixin.sol/IFilteredMinterDAExpSettlement_Mixin.json +1 -1
  63. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV0.sol/IFilteredMinterDAExpV0.json +1 -1
  64. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV1.sol/IFilteredMinterDAExpV1.json +1 -1
  65. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV0.sol/IFilteredMinterDALinV0.json +1 -1
  66. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV1.sol/IFilteredMinterDALinV1.json +1 -1
  67. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV0.sol/IFilteredMinterHolderV0.json +1 -1
  68. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV1.sol/IFilteredMinterHolderV1.json +1 -1
  69. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV2.sol/IFilteredMinterHolderV2.json +1 -1
  70. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV0.sol/IFilteredMinterMerkleV0.json +1 -1
  71. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV1.sol/IFilteredMinterMerkleV1.json +1 -1
  72. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV2.sol/IFilteredMinterMerkleV2.json +1 -1
  73. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterSEAV0.sol/IFilteredMinterSEAV0.json +1 -1
  74. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV0.sol/IFilteredMinterV0.json +1 -1
  75. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV1.sol/IFilteredMinterV1.json +1 -1
  76. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV2.sol/IFilteredMinterV2.json +1 -1
  77. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractExposesHashSeed.sol/IGenArt721CoreContractExposesHashSeed.json +1 -1
  78. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +1 -1
  79. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +1 -1
  80. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol/IGenArt721CoreContractV3WithSharedRandomizer.json +24 -0
  81. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +1 -1
  82. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +1 -1
  83. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +1 -1
  84. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +1 -1
  85. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IManifold.sol/IManifold.json +1 -1
  86. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterBaseV0.sol/IMinterBaseV0.json +1 -1
  87. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV0.sol/IMinterFilterV0.json +1 -1
  88. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol/IMinterFilterV1.json +104 -19
  89. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPICoreV0.sol/IMintingAPICoreV0.json +1 -1
  90. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPIMinterV0.sol/IMintingAPIMinterV0.json +1 -1
  91. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
  92. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer.sol/IRandomizer.json +1 -1
  93. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerPolyptychV0.sol/IRandomizerPolyptychV0.json +1 -1
  94. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerV2.sol/IRandomizerV2.json +1 -1
  95. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer_V3CoreBase.sol/IRandomizer_V3CoreBase.json +1 -1
  96. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +114 -0
  97. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +37 -0
  98. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +37 -0
  99. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +50 -0
  100. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
  101. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +128 -0
  102. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +97 -0
  103. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +29 -0
  104. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +64 -0
  105. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +117 -0
  106. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +52 -36
  107. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol/IWETH.json +1 -1
  108. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Address.json +2 -2
  109. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Counters.json +2 -2
  110. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/CustomERC721Metadata.json +2 -2
  111. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721.json +2 -2
  112. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721Enumerable.json +2 -2
  113. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/GenArt721CoreV1.json +2 -2
  114. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/SafeMath.json +2 -2
  115. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Strings.json +2 -2
  116. package/artifacts/contracts/legacy/GenArt721LegacyMinter.sol/GenArt721LegacyMinter.json +2 -2
  117. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
  118. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol/CustomERC721Metadata.json +3 -3
  119. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol/IERC20.json +1 -1
  120. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol/SafeMath.json +3 -3
  121. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/Strings.sol/Strings.json +3 -3
  122. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +10 -0
  123. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +10 -0
  124. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol/BytecodeStorage.json +3 -3
  125. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageReader.json +3 -3
  126. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageWriter.json +3 -3
  127. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol/Bytes32Strings.json +3 -3
  128. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +3 -3
  129. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol/SSTORE2.json +3 -3
  130. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +67 -0
  131. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +30 -0
  132. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +67 -0
  133. package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +346 -0
  134. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +36 -0
  135. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +37 -0
  136. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +10 -0
  137. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +261 -0
  138. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +55 -0
  139. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +48 -0
  140. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +42 -0
  141. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +86 -0
  142. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV0.sol/MinterFilterV0.json +2 -2
  143. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  144. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +96 -40
  145. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +662 -0
  146. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -20
  147. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +619 -0
  148. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
  149. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +418 -0
  150. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +662 -0
  151. package/artifacts/contracts/minter-suite/Minters/MinterDALinV4.sol/MinterDALinV4.json +2 -2
  152. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +418 -0
  153. package/artifacts/contracts/minter-suite/Minters/MinterHolderV4.sol/MinterHolderV4.json +2 -2
  154. package/artifacts/contracts/minter-suite/Minters/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
  155. package/artifacts/contracts/minter-suite/Minters/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
  156. package/artifacts/contracts/minter-suite/Minters/MinterSEAV0.sol/MinterSEAV0.json +2 -2
  157. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +659 -0
  158. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
  159. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +452 -0
  160. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +600 -0
  161. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +633 -0
  162. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +782 -0
  163. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +676 -0
  164. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
  165. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +356 -0
  166. package/artifacts/contracts/mock/BytecodeV0TextCR_DMock.sol/BytecodeV0TextCR_DMock.json +2 -2
  167. package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
  168. package/artifacts/contracts/mock/BytecodeV1TextCR_DMock.sol/BytecodeV1TextCR_DMock.json +4 -4
  169. package/artifacts/contracts/mock/DeadReceiverBidderMock.sol/DeadReceiverBidderMock.json +25 -2
  170. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  171. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +28 -2
  172. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +6 -11
  173. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +2 -2
  174. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
  175. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  176. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  177. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
  178. package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +136 -0
  179. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
  180. package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +105 -0
  181. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
  182. package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +100 -0
  183. package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
  184. package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +69 -0
  185. package/artifacts/contracts/mock/SSTORE2Mock.sol/SSTORE2Mock.json +2 -2
  186. package/artifacts/contracts/randomizer/deprecated/BasicRandomizer.sol/BasicRandomizer.json +2 -2
  187. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  188. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  189. package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
  190. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +58 -42
  191. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +2 -2
  192. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +2 -2
  193. package/contracts/AdminACLV0.sol +1 -1
  194. package/contracts/AdminACLV1.sol +1 -1
  195. package/contracts/DependencyRegistryV0.sol +300 -123
  196. package/contracts/GenArt721CoreV3.sol +27 -12
  197. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV0.sol +3 -3
  198. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV1.sol +3 -3
  199. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol +3 -3
  200. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol +3 -3
  201. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +3 -3
  202. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +3 -3
  203. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV0.sol +3 -3
  204. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV1.sol +3 -3
  205. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol +3 -3
  206. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol +3 -3
  207. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV0.sol +3 -3
  208. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol +3 -3
  209. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol +4 -4
  210. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol +4 -4
  211. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV0.sol +3 -3
  212. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol +3 -3
  213. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol +4 -4
  214. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol +4 -4
  215. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol +4 -4
  216. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV0.sol +3 -3
  217. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV1.sol +3 -3
  218. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol +3 -3
  219. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol +3 -3
  220. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +3 -3
  221. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +3 -3
  222. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol +3 -3
  223. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol +3 -3
  224. package/contracts/archive/readme.md +16 -0
  225. package/contracts/engine/README.md +21 -0
  226. package/contracts/engine/V2/GenArt721CoreV2_ENGINE_FLEX.sol +2 -2
  227. package/contracts/engine/V2/GenArt721CoreV2_PBAB.sol +2 -2
  228. package/contracts/engine/V2/GenArt721CoreV2_PRTNR.sol +3 -3
  229. package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +2 -2
  230. package/contracts/engine/V2/GenArt721MinterDAExp_PBAB.sol +1 -1
  231. package/contracts/engine/V2/GenArt721Minter_PBAB.sol +2 -2
  232. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +31 -22
  233. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +31 -22
  234. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +12 -18
  235. package/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol +1 -1
  236. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +23 -24
  237. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IAdminACLV0_PROHIBITION.sol +1 -1
  238. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +1 -1
  239. package/contracts/engine-registry/CoreRegistryV1.sol +58 -65
  240. package/contracts/engine-registry/EngineRegistryV0.sol +1 -1
  241. package/contracts/explorations/GenArt721CoreV3_Explorations.sol +27 -12
  242. package/contracts/interfaces/{0.8.x → v0.8.x}/ICoreRegistryV1.sol +6 -8
  243. package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol +5 -2
  244. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol +23 -0
  245. package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol +45 -19
  246. package/contracts/interfaces/v0.8.x/IRandomizer_V3CoreBase.sol +23 -0
  247. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +28 -0
  248. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +12 -0
  249. package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +12 -0
  250. package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +13 -0
  251. package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
  252. package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +41 -0
  253. package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +34 -0
  254. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +15 -0
  255. package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +28 -0
  256. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +43 -0
  257. package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +123 -0
  258. package/contracts/legacy/GenArt721CoreV1.sol +2 -2
  259. package/contracts/legacy/GenArt721LegacyMinter.sol +5 -5
  260. package/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol +1 -1
  261. package/contracts/libs/v0.8.x/ABHelpers.sol +55 -0
  262. package/contracts/libs/v0.8.x/AuthLib.sol +196 -0
  263. package/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol +5 -5
  264. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +250 -0
  265. package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
  266. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +216 -0
  267. package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
  268. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +488 -0
  269. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +384 -0
  270. package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +240 -0
  271. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +995 -0
  272. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +166 -0
  273. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +770 -0
  274. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +741 -0
  275. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +291 -0
  276. package/contracts/minter-suite/MinterFilter/MinterFilterV0.sol +3 -3
  277. package/contracts/minter-suite/MinterFilter/MinterFilterV1.sol +5 -5
  278. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +414 -297
  279. package/contracts/minter-suite/Minters/MinterBase_v0_1_1.sol +4 -4
  280. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +866 -0
  281. package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +4 -57
  282. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +886 -0
  283. package/contracts/minter-suite/Minters/MinterDAExpV4.sol +3 -3
  284. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +545 -0
  285. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +857 -0
  286. package/contracts/minter-suite/Minters/MinterDALinV4.sol +3 -3
  287. package/contracts/minter-suite/Minters/MinterDALinV5.sol +534 -0
  288. package/contracts/minter-suite/Minters/MinterHolderV4.sol +4 -4
  289. package/contracts/minter-suite/Minters/MinterMerkleV5.sol +4 -4
  290. package/contracts/minter-suite/Minters/MinterPolyptychV0.sol +6 -6
  291. package/contracts/minter-suite/Minters/MinterSEAV0.sol +3 -3
  292. package/contracts/minter-suite/Minters/MinterSEAV1.sol +853 -0
  293. package/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol +5 -5
  294. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +545 -0
  295. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +730 -0
  296. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +714 -0
  297. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +1012 -0
  298. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +868 -0
  299. package/contracts/minter-suite/Minters/MinterSetPriceV4.sol +3 -3
  300. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +414 -0
  301. package/contracts/mock/BytecodeV0TextCR_DMock.sol +1 -1
  302. package/contracts/mock/BytecodeV1LibCallsMock.sol +1 -1
  303. package/contracts/mock/BytecodeV1TextCR_DMock.sol +1 -1
  304. package/contracts/mock/DeadReceiverBidderMock.sol +15 -0
  305. package/contracts/mock/DummySharedMinter.sol +2 -2
  306. package/contracts/mock/ERC20Mock.sol +16 -0
  307. package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +11 -18
  308. package/contracts/mock/MockAdminACLV0.sol +1 -1
  309. package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +1 -1
  310. package/contracts/mock/OriginRegisterMock.sol +1 -1
  311. package/contracts/mock/ReentrancyHolderMock.sol +1 -1
  312. package/contracts/mock/ReentrancyHolderMockShared.sol +59 -0
  313. package/contracts/mock/ReentrancyMerkleMock.sol +1 -1
  314. package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
  315. package/contracts/mock/ReentrancyMock.sol +1 -1
  316. package/contracts/mock/ReentrancyMockShared.sol +48 -0
  317. package/contracts/mock/ReentrancySEAMock.sol +1 -1
  318. package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
  319. package/contracts/mock/SSTORE2Mock.sol +1 -1
  320. package/contracts/randomizer/deprecated/BasicRandomizer.sol +1 -1
  321. package/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol +2 -2
  322. package/contracts/randomizer/deprecated/RandomizerV2.sol +2 -2
  323. package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
  324. package/contracts/randomizer/shared/SharedRandomizerV0.sol +134 -111
  325. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +2 -2
  326. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +2 -2
  327. package/package.json +57 -36
  328. package/LICENSE +0 -165
  329. package/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol +0 -10
  330. package/contracts/interfaces/0.8.x/ISharedRandomizerV0.sol +0 -105
  331. /package/contracts/interfaces/{0.5.x → v0.5.x}/IBonusContract.sol +0 -0
  332. /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreContractV1.sol +0 -0
  333. /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreV2_PBAB.sol +0 -0
  334. /package/contracts/interfaces/{0.5.x → v0.5.x}/IRandomizer.sol +0 -0
  335. /package/contracts/interfaces/{0.8.x → v0.8.x}/IAdminACLV0.sol +0 -0
  336. /package/contracts/interfaces/{0.8.x → v0.8.x}/IArtblocksRoyaltyOverride.sol +0 -0
  337. /package/contracts/interfaces/{0.8.x → v0.8.x}/IBonusContract.sol +0 -0
  338. /package/contracts/interfaces/{0.8.x → v0.8.x}/IBytecodeStorageReader.sol +0 -0
  339. /package/contracts/interfaces/{0.8.x → v0.8.x}/IDelegationRegistry.sol +0 -0
  340. /package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryCompatibleV0.sol +0 -0
  341. /package/contracts/interfaces/{0.8.x → v0.8.x}/IEngineRegistryV0.sol +0 -0
  342. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV0.sol +0 -0
  343. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV1.sol +0 -0
  344. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlement_Mixin.sol +0 -0
  345. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV0.sol +0 -0
  346. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV1.sol +0 -0
  347. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV0.sol +0 -0
  348. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV1.sol +0 -0
  349. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV0.sol +0 -0
  350. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV1.sol +0 -0
  351. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV2.sol +0 -0
  352. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV0.sol +0 -0
  353. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV1.sol +0 -0
  354. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV2.sol +0 -0
  355. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterSEAV0.sol +0 -0
  356. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV0.sol +0 -0
  357. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV1.sol +0 -0
  358. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV2.sol +0 -0
  359. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractExposesHashSeed.sol +0 -0
  360. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV1.sol +0 -0
  361. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3.sol +0 -0
  362. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Base.sol +0 -0
  363. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine.sol +0 -0
  364. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine_Flex.sol +0 -0
  365. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreV2_PBAB.sol +0 -0
  366. /package/contracts/interfaces/{0.8.x → v0.8.x}/IManifold.sol +0 -0
  367. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterBaseV0.sol +0 -0
  368. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV0.sol +0 -0
  369. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPICoreV0.sol +0 -0
  370. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPIMinterV0.sol +0 -0
  371. /package/contracts/interfaces/{0.8.x → v0.8.x}/IPseudorandomAtomic.sol +0 -0
  372. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer.sol +0 -0
  373. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerPolyptychV0.sol +0 -0
  374. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerV2.sol +0 -0
  375. /package/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol +0 -0
  376. /package/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol +0 -0
  377. /package/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol +0 -0
  378. /package/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol +0 -0
  379. /package/contracts/libs/{0.5.x → v0.5.x}/Strings.sol +0 -0
  380. /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol +0 -0
  381. /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol +0 -0
  382. /package/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol +0 -0
  383. /package/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol +0 -0
@@ -0,0 +1,866 @@
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.19;
7
+
8
+ import {IDelegationRegistry} from "../../interfaces/v0.8.x/IDelegationRegistry.sol";
9
+ import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
10
+ import {ISharedMinterDAV0} from "../../interfaces/v0.8.x/ISharedMinterDAV0.sol";
11
+ import {ISharedMinterDAExpV0} from "../../interfaces/v0.8.x/ISharedMinterDAExpV0.sol";
12
+ import {ISharedMinterHolderV0} from "../../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
13
+ import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
14
+
15
+ import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
16
+ import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
17
+ import {TokenHolderLib} from "../../libs/v0.8.x/minter-libs/TokenHolderLib.sol";
18
+ import {DAExpLib} from "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
19
+ import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
20
+
21
+ import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
22
+ import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
23
+ import {EnumerableSet} from "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
24
+
25
+ /**
26
+ * @title Shared, filtered Minter contract that allows tokens to be minted with
27
+ * ETH when purchaser owns an allowlisted ERC-721 NFT. This contract does NOT
28
+ * track if a purchaser has/has not minted already -- it simply restricts
29
+ * purchasing to anybody that holds one or more of a specified list of ERC-721
30
+ * NFTs. Pricing is achieved using an automated, exponential Dutch-auction mechanism.
31
+ * This is designed to be used with GenArt721CoreContractV3 flagship or
32
+ * engine contracts.
33
+ * @author Art Blocks Inc.
34
+ * @notice Privileged Roles and Ownership:
35
+ * This contract is designed to be managed, with limited powers.
36
+ * Privileged roles and abilities are controlled by the project's artist, which
37
+ * can be modified by the core contract's Admin ACL contract. Both of these
38
+ * roles hold extensive power and can modify minter details.
39
+ * Care must be taken to ensure that the admin ACL contract and artist
40
+ * addresses are secure behind a multi-sig or other access control mechanism.
41
+ * ----------------------------------------------------------------------------
42
+ * The following functions are restricted to the minter filter's Admin ACL
43
+ * contract:
44
+ * - setMinimumPriceDecayHalfLifeSeconds
45
+ * ----------------------------------------------------------------------------
46
+ * The following functions are restricted to the core contract's Admin ACL
47
+ * contract:
48
+ * - resetAuctionDetails (note: this will prevent minting until a new auction
49
+ * is created)
50
+ * ----------------------------------------------------------------------------
51
+ * The following functions are restricted to a project's artist:
52
+ * - setAuctionDetails (note: this may only be called when there is no active
53
+ * auction)
54
+ * - syncProjectMaxInvocationsToCore
55
+ * - manuallyLimitProjectMaxInvocations
56
+ * - allowHoldersOfProjects
57
+ * - removeHoldersOfProjects
58
+ * - allowAndRemoveHoldersOfProjects
59
+ * ----------------------------------------------------------------------------
60
+ * Additional admin and artist privileged roles may be described on other
61
+ * contracts that this minter integrates with.
62
+ *
63
+ * This contract allows gated minting with support for vaults to delegate minting
64
+ * privileges via an external delegation registry. This means a vault holding an
65
+ * allowed token can delegate minting privileges to a wallet that is not holding an
66
+ * allowed token, enabling the vault to remain air-gapped while still allowing minting.
67
+ * The delegation registry contract is responsible for managing these delegations,
68
+ * and is available at the address returned by the public immutable
69
+ * `delegationRegistryAddress`. At the time of writing, the delegation
70
+ * registry enables easy delegation configuring at https://delegate.cash/.
71
+ * Art Blocks does not guarentee the security of the delegation registry, and
72
+ * users should take care to ensure that the delegation registry is secure.
73
+ * Delegations must be configured by the vault owner prior to purchase. Supported
74
+ * delegation types include token-level, contract-level (via genArt721CoreAddress), or
75
+ * wallet-level delegation. Contract-level delegations must be configured for the core
76
+ * token contract as returned by the public immutable variable `genArt721CoreAddress`.
77
+ * ----------------------------------------------------------------------------
78
+ * @notice Caution: While Engine projects must be registered on the Art Blocks
79
+ * Core Registry to assign this minter, this minter does not enforce that a
80
+ * project is registered when configured or queried. This is primarily for gas
81
+ * optimization purposes. It is, therefore, possible that fake projects may be
82
+ * configured on this minter, but they will not be able to mint tokens due to
83
+ * checks performed by this minter's Minter Filter.
84
+ *
85
+ * @dev Note that while this minter makes use of `block.timestamp` and it is
86
+ * technically possible that this value is manipulated by block producers, such
87
+ * manipulation will not have material impact on the price values of this minter
88
+ * given the business practices for how pricing is congfigured for this minter
89
+ * and that variations on the order of less than a minute should not
90
+ * meaningfully impact price given the minimum allowable price decay rate that
91
+ * this minter intends to support.
92
+ */
93
+ contract MinterDAExpHolderV5 is
94
+ ReentrancyGuard,
95
+ ISharedMinterV0,
96
+ ISharedMinterDAV0,
97
+ ISharedMinterDAExpV0,
98
+ ISharedMinterHolderV0
99
+ {
100
+ using SafeCast for uint256;
101
+ // add Enumerable Set methods
102
+ using EnumerableSet for EnumerableSet.AddressSet;
103
+
104
+ /// Minter filter address this minter interacts with
105
+ address public immutable minterFilterAddress;
106
+
107
+ /// Minter filter this minter may interact with.
108
+ IMinterFilterV1 private immutable _minterFilter;
109
+
110
+ // Delegation registry address
111
+ address public immutable delegationRegistryAddress;
112
+
113
+ // Delegation registry address
114
+ IDelegationRegistry private immutable _delegationRegistryContract;
115
+
116
+ /// minterType for this minter
117
+ string public constant minterType = "MinterDAExpHolderV5";
118
+
119
+ /// minter version for this minter
120
+ string public constant minterVersion = "v5.0.0";
121
+
122
+ //// Minimum price decay half life: price must decay with a half life of at
123
+ /// least this amount (must cut in half at least every N seconds).
124
+ uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
125
+
126
+ /**
127
+ * @notice Initializes contract to be a Filtered Minter for
128
+ * `minterFilter` minter filter.
129
+ * @param minterFilter Minter filter for which this will be a
130
+ * filtered minter.
131
+ */
132
+ constructor(
133
+ address minterFilter,
134
+ address delegationRegistryAddress_
135
+ ) ReentrancyGuard() {
136
+ minterFilterAddress = minterFilter;
137
+ _minterFilter = IMinterFilterV1(minterFilter);
138
+
139
+ delegationRegistryAddress = delegationRegistryAddress_;
140
+ _delegationRegistryContract = IDelegationRegistry(
141
+ delegationRegistryAddress_
142
+ );
143
+ emit TokenHolderLib.DelegationRegistryUpdated(
144
+ delegationRegistryAddress_
145
+ );
146
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
147
+ minimumPriceDecayHalfLifeSeconds
148
+ );
149
+ }
150
+
151
+ /**
152
+ * @notice Manually sets the local maximum invocations of project `projectId`
153
+ * with the provided `maxInvocations`, checking that `maxInvocations` is less
154
+ * than or equal to the value of project `project_id`'s maximum invocations that is
155
+ * set on the core contract.
156
+ * @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
157
+ * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
158
+ * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
159
+ * @param projectId Project ID to set the maximum invocations for.
160
+ * @param coreContract Core contract address for the given project.
161
+ * @param maxInvocations Maximum invocations to set for the project.
162
+ */
163
+ function manuallyLimitProjectMaxInvocations(
164
+ uint256 projectId,
165
+ address coreContract,
166
+ uint24 maxInvocations
167
+ ) external {
168
+ AuthLib.onlyArtist({
169
+ projectId: projectId,
170
+ coreContract: coreContract,
171
+ sender: msg.sender
172
+ });
173
+ MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
174
+ projectId: projectId,
175
+ coreContract: coreContract,
176
+ maxInvocations: maxInvocations
177
+ });
178
+ }
179
+
180
+ /**
181
+ * @notice Allows holders of NFTs at addresses `ownedNFTAddresses`,
182
+ * project IDs `ownedNFTProjectIds` to mint on project `projectId`.
183
+ * `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
184
+ * e.g. Allows holders of project `ownedNFTProjectIds[0]` on token
185
+ * contract `ownedNFTAddresses[0]` to mint `projectId`.
186
+ * WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
187
+ * due to assumptions about tokenId and projectId relationships.
188
+ * @param projectId Project ID to enable minting on.
189
+ * @param coreContract Core contract address for the given project.
190
+ * @param ownedNFTAddresses NFT core addresses of projects to be
191
+ * allowlisted. Indexes must align with `ownedNFTProjectIds`.
192
+ * @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
193
+ * holders shall be allowlisted to mint project `projectId`. Indexes must
194
+ * align with `ownedNFTAddresses`.
195
+ */
196
+ function allowHoldersOfProjects(
197
+ uint256 projectId,
198
+ address coreContract,
199
+ address[] calldata ownedNFTAddresses,
200
+ uint256[] calldata ownedNFTProjectIds
201
+ ) external {
202
+ AuthLib.onlyArtist({
203
+ projectId: projectId,
204
+ coreContract: coreContract,
205
+ sender: msg.sender
206
+ });
207
+ TokenHolderLib.allowHoldersOfProjects({
208
+ projectId: projectId,
209
+ coreContract: coreContract,
210
+ ownedNFTAddresses: ownedNFTAddresses,
211
+ ownedNFTProjectIds: ownedNFTProjectIds
212
+ });
213
+ }
214
+
215
+ /**
216
+ * @notice Removes holders of NFTs at addresses `ownedNFTAddresses`,
217
+ * project IDs `ownedNFTProjectIds` to mint on project `projectId`. If
218
+ * other projects owned by a holder are still allowed to mint, holder will
219
+ * maintain ability to purchase.
220
+ * `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
221
+ * e.g. Removes holders of project `ownedNFTProjectIds[0]` on token
222
+ * contract `ownedNFTAddresses[0]` from mint allowlist of `projectId`.
223
+ * @param projectId Project ID to enable minting on.
224
+ * @param coreContract Core contract address for the given project.
225
+ * @param ownedNFTAddresses NFT core addresses of projects to be removed
226
+ * from allowlist. Indexes must align with `ownedNFTProjectIds`.
227
+ * @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
228
+ * holders will be removed from allowlist to mint project `projectId`.
229
+ * Indexes must align with `ownedNFTAddresses`.
230
+ */
231
+ function removeHoldersOfProjects(
232
+ uint256 projectId,
233
+ address coreContract,
234
+ address[] calldata ownedNFTAddresses,
235
+ uint256[] calldata ownedNFTProjectIds
236
+ ) external {
237
+ AuthLib.onlyArtist({
238
+ projectId: projectId,
239
+ coreContract: coreContract,
240
+ sender: msg.sender
241
+ });
242
+ // require same length arrays
243
+ TokenHolderLib.removeHoldersOfProjects({
244
+ projectId: projectId,
245
+ coreContract: coreContract,
246
+ ownedNFTAddresses: ownedNFTAddresses,
247
+ ownedNFTProjectIds: ownedNFTProjectIds
248
+ });
249
+ }
250
+
251
+ /**
252
+ * @notice Allows holders of NFTs at addresses `ownedNFTAddressesAdd`,
253
+ * project IDs `ownedNFTProjectIdsAdd` to mint on project `projectId`.
254
+ * Also removes holders of NFTs at addresses `ownedNFTAddressesRemove`,
255
+ * project IDs `ownedNFTProjectIdsRemove` from minting on project
256
+ * `projectId`.
257
+ * `ownedNFTAddressesAdd` assumed to be aligned with
258
+ * `ownedNFTProjectIdsAdd`.
259
+ * e.g. Allows holders of project `ownedNFTProjectIdsAdd[0]` on token
260
+ * contract `ownedNFTAddressesAdd[0]` to mint `projectId`.
261
+ * `ownedNFTAddressesRemove` also assumed to be aligned with
262
+ * `ownedNFTProjectIdsRemove`.
263
+ * WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
264
+ * due to assumptions about tokenId and projectId relationships.
265
+ * @param projectId Project ID to enable minting on.
266
+ * @param coreContract Core contract address for the given project.
267
+ * @param ownedNFTAddressesAdd NFT core addresses of projects to be
268
+ * allowlisted. Indexes must align with `ownedNFTProjectIdsAdd`.
269
+ * @param ownedNFTProjectIdsAdd Project IDs on `ownedNFTAddressesAdd`
270
+ * whose holders shall be allowlisted to mint project `projectId`. Indexes
271
+ * must align with `ownedNFTAddressesAdd`.
272
+ * @param ownedNFTAddressesRemove NFT core addresses of projects to be
273
+ * removed from allowlist. Indexes must align with
274
+ * `ownedNFTProjectIdsRemove`.
275
+ * @param ownedNFTProjectIdsRemove Project IDs on
276
+ * `ownedNFTAddressesRemove` whose holders will be removed from allowlist
277
+ * to mint project `projectId`. Indexes must align with
278
+ * `ownedNFTAddressesRemove`.
279
+ * @dev if a project is included in both add and remove arrays, it will be
280
+ * removed.
281
+ */
282
+ function allowAndRemoveHoldersOfProjects(
283
+ uint256 projectId,
284
+ address coreContract,
285
+ address[] calldata ownedNFTAddressesAdd,
286
+ uint256[] calldata ownedNFTProjectIdsAdd,
287
+ address[] calldata ownedNFTAddressesRemove,
288
+ uint256[] calldata ownedNFTProjectIdsRemove
289
+ ) external {
290
+ AuthLib.onlyArtist({
291
+ projectId: projectId,
292
+ coreContract: coreContract,
293
+ sender: msg.sender
294
+ });
295
+ TokenHolderLib.allowAndRemoveHoldersOfProjects({
296
+ projectId: projectId,
297
+ coreContract: coreContract,
298
+ ownedNFTAddressesAdd: ownedNFTAddressesAdd,
299
+ ownedNFTProjectIdsAdd: ownedNFTProjectIdsAdd,
300
+ ownedNFTAddressesRemove: ownedNFTAddressesRemove,
301
+ ownedNFTProjectIdsRemove: ownedNFTProjectIdsRemove
302
+ });
303
+ }
304
+
305
+ /**
306
+ * @notice Sets auction details for project `projectId`.
307
+ * Requires one of the following:
308
+ * - The auction is unconfigured
309
+ * - The auction has not yet started
310
+ * - The minter-local max invocations have been reached
311
+ * @dev Note that allowing the artist to set auction details after reaching
312
+ * max invocations effectively grants the artist the ability to set a new
313
+ * auction at any point, since minter-local max invocations can be set by
314
+ * the artist.
315
+ * @param projectId Project ID to set auction details for.
316
+ * @param coreContract Core contract address for the given project.
317
+ * @param auctionTimestampStart Timestamp at which to start the auction.
318
+ * @param priceDecayHalfLifeSeconds The half life with which to decay the
319
+ * price (in seconds).
320
+ * @param startPrice Price at which to start the auction, in Wei.
321
+ * @param basePrice Resting price of the auction, in Wei.
322
+ * @dev Note that it is intentionally supported here that the configured
323
+ * price may be explicitly set to `0`.
324
+ */
325
+ function setAuctionDetails(
326
+ uint256 projectId,
327
+ address coreContract,
328
+ uint40 auctionTimestampStart,
329
+ uint40 priceDecayHalfLifeSeconds,
330
+ uint256 startPrice,
331
+ uint256 basePrice
332
+ ) external {
333
+ AuthLib.onlyArtist({
334
+ projectId: projectId,
335
+ coreContract: coreContract,
336
+ sender: msg.sender
337
+ });
338
+ // CHECKS
339
+ require(
340
+ (priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
341
+ "Price decay half life must be greater than min allowable value"
342
+ );
343
+
344
+ // EFFECTS
345
+ bool maxHasBeenInvoked = MaxInvocationsLib.getMaxHasBeenInvoked(
346
+ projectId,
347
+ coreContract
348
+ );
349
+ DAExpLib.setAuctionDetailsExp({
350
+ projectId: projectId,
351
+ coreContract: coreContract,
352
+ auctionTimestampStart: auctionTimestampStart,
353
+ priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
354
+ startPrice: startPrice.toUint88(),
355
+ basePrice: basePrice.toUint88(),
356
+ allowReconfigureAfterStart: maxHasBeenInvoked
357
+ });
358
+
359
+ // sync local max invocations if not initially populated
360
+ // @dev if local max invocations and maxHasBeenInvoked are both
361
+ // initial values, we know they have not been populated.
362
+ if (
363
+ MaxInvocationsLib.maxInvocationsIsUnconfigured({
364
+ projectId: projectId,
365
+ coreContract: coreContract
366
+ })
367
+ ) {
368
+ syncProjectMaxInvocationsToCore({
369
+ projectId: projectId,
370
+ coreContract: coreContract
371
+ });
372
+ }
373
+ }
374
+
375
+ /**
376
+ * @notice Sets the minimum and maximum values that are settable for
377
+ * `priceDecayHalfLifeSeconds` across all projects.
378
+ * @param minimumPriceDecayHalfLifeSeconds_ Minimum price decay half life
379
+ * (in seconds).
380
+ */
381
+ function setMinimumPriceDecayHalfLifeSeconds(
382
+ uint256 minimumPriceDecayHalfLifeSeconds_
383
+ ) external {
384
+ AuthLib.onlyMinterFilterAdminACL({
385
+ minterFilterAddress: minterFilterAddress,
386
+ sender: msg.sender,
387
+ contract_: address(this),
388
+ selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
389
+ });
390
+ require(
391
+ minimumPriceDecayHalfLifeSeconds_ > 0,
392
+ "Half life of zero not allowed"
393
+ );
394
+ minimumPriceDecayHalfLifeSeconds = minimumPriceDecayHalfLifeSeconds_;
395
+
396
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
397
+ minimumPriceDecayHalfLifeSeconds_
398
+ );
399
+ }
400
+
401
+ /**
402
+ * @notice Resets auction details for project `projectId`, zero-ing out all
403
+ * relevant auction fields. Not intended to be used in normal auction
404
+ * operation, but rather only in case of the need to halt an auction.
405
+ * @param projectId Project ID to set auction details for.
406
+ * @param coreContract Core contract address for the given project.
407
+ */
408
+ function resetAuctionDetails(
409
+ uint256 projectId,
410
+ address coreContract
411
+ ) external {
412
+ AuthLib.onlyCoreAdminACL({
413
+ coreContract: coreContract,
414
+ sender: msg.sender,
415
+ contract_: address(this),
416
+ selector: this.resetAuctionDetails.selector
417
+ });
418
+
419
+ DAExpLib.resetAuctionDetails({
420
+ projectId: projectId,
421
+ coreContract: coreContract
422
+ });
423
+ }
424
+
425
+ /**
426
+ * @notice Purchases a token from project `projectId`.
427
+ * Note: Collectors should not send excessive value with their purchase
428
+ * transaction, because the artist has the ability to change the auction
429
+ * details at any time, including the price.
430
+ * @param projectId Project ID to mint a token on.
431
+ * @param coreContract Core contract address for the given project.
432
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
433
+ * msg.sender being used to claim right to purchase.
434
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
435
+ * to claim right to purchase.
436
+ * @return tokenId Token ID of minted token
437
+ */
438
+ function purchase(
439
+ uint256 projectId,
440
+ address coreContract,
441
+ address ownedNFTAddress,
442
+ uint256 ownedNFTTokenId
443
+ ) external payable returns (uint256 tokenId) {
444
+ tokenId = purchaseTo({
445
+ to: msg.sender,
446
+ projectId: projectId,
447
+ coreContract: coreContract,
448
+ ownedNFTAddress: ownedNFTAddress,
449
+ ownedNFTTokenId: ownedNFTTokenId,
450
+ vault: address(0)
451
+ });
452
+
453
+ return tokenId;
454
+ }
455
+
456
+ /**
457
+ * @notice Purchases a token from project `projectId` and sets
458
+ * the token's owner to `to`.
459
+ * Note: Collectors should not send excessive value with their purchase
460
+ * transaction, because the artist has the ability to change the auction
461
+ * details at any time, including the price.
462
+ * @param to Address to be the new token's owner.
463
+ * @param projectId Project ID to mint a token on.
464
+ * @param coreContract Core contract address for the given project.
465
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
466
+ * msg.sender being used to claim right to purchase.
467
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
468
+ * to claim right to purchase.
469
+ * @return tokenId Token ID of minted token
470
+ */
471
+ function purchaseTo(
472
+ address to,
473
+ uint256 projectId,
474
+ address coreContract,
475
+ address ownedNFTAddress,
476
+ uint256 ownedNFTTokenId
477
+ ) external payable returns (uint256 tokenId) {
478
+ return
479
+ purchaseTo({
480
+ to: to,
481
+ projectId: projectId,
482
+ coreContract: coreContract,
483
+ ownedNFTAddress: ownedNFTAddress,
484
+ ownedNFTTokenId: ownedNFTTokenId,
485
+ vault: address(0)
486
+ });
487
+ }
488
+
489
+ // public getter functions
490
+ /**
491
+ * @notice Gets the maximum invocations project configuration.
492
+ * @param projectId The ID of the project whose data needs to be fetched.
493
+ * @param coreContract The address of the core contract.
494
+ * @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
495
+ * configuration data.
496
+ */
497
+ function maxInvocationsProjectConfig(
498
+ uint256 projectId,
499
+ address coreContract
500
+ )
501
+ external
502
+ view
503
+ returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
504
+ {
505
+ return
506
+ MaxInvocationsLib.getMaxInvocationsProjectConfig({
507
+ projectId: projectId,
508
+ coreContract: coreContract
509
+ });
510
+ }
511
+
512
+ /**
513
+ * @notice Retrieves the auction parameters for a specific project.
514
+ * @param projectId The unique identifier for the project.
515
+ * @param coreContract The address of the core contract for the project.
516
+ * @return timestampStart The start timestamp for the auction.
517
+ * @return priceDecayHalfLifeSeconds The half-life for the price decay
518
+ * during the auction, in seconds.
519
+ * @return startPrice The starting price of the auction.
520
+ * @return basePrice The base price of the auction.
521
+ */
522
+ function projectAuctionParameters(
523
+ uint256 projectId,
524
+ address coreContract
525
+ )
526
+ external
527
+ view
528
+ returns (
529
+ uint40 timestampStart,
530
+ uint40 priceDecayHalfLifeSeconds,
531
+ uint256 startPrice,
532
+ uint256 basePrice
533
+ )
534
+ {
535
+ DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
536
+ .getDAProjectConfig({
537
+ projectId: projectId,
538
+ coreContract: coreContract
539
+ });
540
+ timestampStart = auctionProjectConfig.timestampStart;
541
+ priceDecayHalfLifeSeconds = auctionProjectConfig
542
+ .priceDecayHalfLifeSeconds;
543
+ startPrice = auctionProjectConfig.startPrice;
544
+ basePrice = auctionProjectConfig.basePrice;
545
+ }
546
+
547
+ /**
548
+ * @notice Checks if the specified `coreContract` is a valid engine contract.
549
+ * @dev This function retrieves the cached value of `coreContract` from
550
+ * the `isEngineCache` mapping. If the cached value is already set, it
551
+ * returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
552
+ * function from the `SplitFundsLib` library to check if `coreContract`
553
+ * is a valid engine contract.
554
+ * @dev This function will revert if the provided `coreContract` is not
555
+ * a valid Engine or V3 Flagship contract.
556
+ * @param coreContract The address of the contract to check.
557
+ * @return bool indicating if `coreContract` is a valid engine contract.
558
+ */
559
+ function isEngineView(address coreContract) external view returns (bool) {
560
+ SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
561
+ .getIsEngineCacheConfig(coreContract);
562
+ if (isEngineCache.isCached) {
563
+ return isEngineCache.isEngine;
564
+ } else {
565
+ // @dev this calls the non-state-modifying variant of isEngine
566
+ return SplitFundsLib.getV3CoreIsEngineView(coreContract);
567
+ }
568
+ }
569
+
570
+ /**
571
+ * @notice projectId => has project reached its maximum number of
572
+ * invocations? Note that this returns a local cache of the core contract's
573
+ * state, and may be out of sync with the core contract. This is
574
+ * intentional, as it only enables gas optimization of mints after a
575
+ * project's maximum invocations has been reached. A false negative will
576
+ * only result in a gas cost increase, since the core contract will still
577
+ * enforce a maxInvocation check during minting. A false positive is not
578
+ * possible because the V3 core contract only allows maximum invocations
579
+ * to be reduced, not increased. Based on this rationale, we intentionally
580
+ * do not do input validation in this method as to whether or not the input
581
+ * @param projectId is an existing project ID.
582
+ * @param coreContract is an existing core contract address.
583
+ */
584
+ function projectMaxHasBeenInvoked(
585
+ uint256 projectId,
586
+ address coreContract
587
+ ) external view returns (bool) {
588
+ return
589
+ MaxInvocationsLib.getMaxHasBeenInvoked({
590
+ projectId: projectId,
591
+ coreContract: coreContract
592
+ });
593
+ }
594
+
595
+ /**
596
+ * @notice projectId => project's maximum number of invocations.
597
+ * Optionally synced with core contract value, for gas optimization.
598
+ * Note that this returns a local cache of the core contract's
599
+ * state, and may be out of sync with the core contract. This is
600
+ * intentional, as it only enables gas optimization of mints after a
601
+ * project's maximum invocations has been reached.
602
+ * @dev A number greater than the core contract's project max invocations
603
+ * will only result in a gas cost increase, since the core contract will
604
+ * still enforce a maxInvocation check during minting. A number less than
605
+ * the core contract's project max invocations is only possible when the
606
+ * project's max invocations have not been synced on this minter, since the
607
+ * V3 core contract only allows maximum invocations to be reduced, not
608
+ * increased. When this happens, the minter will enable minting, allowing
609
+ * the core contract to enforce the max invocations check. Based on this
610
+ * rationale, we intentionally do not do input validation in this method as
611
+ * to whether or not the input `projectId` is an existing project ID.
612
+ * @param projectId is an existing project ID.
613
+ * @param coreContract is an existing core contract address.
614
+ */
615
+ function projectMaxInvocations(
616
+ uint256 projectId,
617
+ address coreContract
618
+ ) external view returns (uint256) {
619
+ return
620
+ MaxInvocationsLib.getMaxInvocations({
621
+ projectId: projectId,
622
+ coreContract: coreContract
623
+ });
624
+ }
625
+
626
+ /**
627
+ * @notice Gets if price of token is configured, price of minting a
628
+ * token on project `projectId`, and currency symbol and address to be
629
+ * used as payment. Supersedes any core contract price information.
630
+ * @param projectId Project ID to get price information for
631
+ * @param coreContract Contract address of the core contract
632
+ * @return isConfigured true only if token price has been configured on
633
+ * this minter
634
+ * @return tokenPriceInWei current price of token on this minter - invalid
635
+ * if price has not yet been configured
636
+ * @return currencySymbol currency symbol for purchases of project on this
637
+ * minter. This minter always returns "ETH"
638
+ * @return currencyAddress currency address for purchases of project on
639
+ * this minter. This minter always returns null address, reserved for ether
640
+ */
641
+ function getPriceInfo(
642
+ uint256 projectId,
643
+ address coreContract
644
+ )
645
+ external
646
+ view
647
+ returns (
648
+ bool isConfigured,
649
+ uint256 tokenPriceInWei,
650
+ string memory currencySymbol,
651
+ address currencyAddress
652
+ )
653
+ {
654
+ DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
655
+ .getDAProjectConfig({
656
+ projectId: projectId,
657
+ coreContract: coreContract
658
+ });
659
+ isConfigured = (auctionProjectConfig.startPrice > 0);
660
+ if (!isConfigured) {
661
+ // In the case of unconfigured auction, return price of zero when
662
+ // getPriceExp would otherwise revert
663
+ tokenPriceInWei = 0;
664
+ } else if (block.timestamp <= auctionProjectConfig.timestampStart) {
665
+ // Provide a reasonable value for `tokenPriceInWei` when
666
+ // getPriceExp would otherwise revert, using the starting price
667
+ // before auction starts.
668
+ tokenPriceInWei = auctionProjectConfig.startPrice;
669
+ } else {
670
+ tokenPriceInWei = DAExpLib.getPriceExp({
671
+ projectId: projectId,
672
+ coreContract: coreContract
673
+ });
674
+ }
675
+ currencySymbol = "ETH";
676
+ currencyAddress = address(0);
677
+ }
678
+
679
+ /**
680
+ * @notice Checks if a specific NFT owner is allowed in a given project.
681
+ * @dev This function retrieves the allowance status of an NFT owner
682
+ * within a specific project from the allowedProjectHoldersMapping.
683
+ * @param projectId The ID of the project to check.
684
+ * @param coreContract Core contract address for the given project.
685
+ * @param ownedNFTAddress The address of the owned NFT contract.
686
+ * @param ownedNFTProjectId The ID of the owned NFT project.
687
+ * @return bool True if the NFT owner is allowed in the given project, False otherwise.
688
+ */
689
+ function allowedProjectHolders(
690
+ uint256 projectId,
691
+ address coreContract,
692
+ address ownedNFTAddress,
693
+ uint256 ownedNFTProjectId
694
+ ) external view returns (bool) {
695
+ return
696
+ TokenHolderLib
697
+ .getHolderProjectConfig({
698
+ projectId: projectId,
699
+ coreContract: coreContract
700
+ })
701
+ .allowedProjectHolders[ownedNFTAddress][ownedNFTProjectId];
702
+ }
703
+
704
+ /**
705
+ * @notice Returns if token is an allowlisted NFT for project `projectId`.
706
+ * @param projectId Project ID to be checked.
707
+ * @param coreContract Core contract address for the given project.
708
+ * @param ownedNFTAddress ERC-721 NFT token address to be checked.
709
+ * @param ownedNFTTokenId ERC-721 NFT token ID to be checked.
710
+ * @return bool Token is allowlisted
711
+ * @dev does not check if token has been used to purchase
712
+ * @dev assumes project ID can be derived from tokenId / 1_000_000
713
+ */
714
+ function isAllowlistedNFT(
715
+ uint256 projectId,
716
+ address coreContract,
717
+ address ownedNFTAddress,
718
+ uint256 ownedNFTTokenId
719
+ ) external view returns (bool) {
720
+ return
721
+ TokenHolderLib.isAllowlistedNFT({
722
+ projectId: projectId,
723
+ coreContract: coreContract,
724
+ ownedNFTAddress: ownedNFTAddress,
725
+ ownedNFTTokenId: ownedNFTTokenId
726
+ });
727
+ }
728
+
729
+ /**
730
+ * @notice Syncs local maximum invocations of project `projectId` based on
731
+ * the value currently defined in the core contract.
732
+ * @param projectId Project ID to set the maximum invocations for.
733
+ * @param coreContract Core contract address for the given project.
734
+ * @dev this enables gas reduction after maxInvocations have been reached -
735
+ * core contracts shall still enforce a maxInvocation check during mint.
736
+ */
737
+ function syncProjectMaxInvocationsToCore(
738
+ uint256 projectId,
739
+ address coreContract
740
+ ) public {
741
+ AuthLib.onlyArtist({
742
+ projectId: projectId,
743
+ coreContract: coreContract,
744
+ sender: msg.sender
745
+ });
746
+
747
+ MaxInvocationsLib.syncProjectMaxInvocationsToCore({
748
+ projectId: projectId,
749
+ coreContract: coreContract
750
+ });
751
+ }
752
+
753
+ /**
754
+ * @notice Purchases a token from project `projectId` and sets
755
+ * the token's owner to `to`.
756
+ * Note: Collectors should not send excessive value with their purchase
757
+ * transaction, because the artist has the ability to change the auction
758
+ * details at any time, including the price.
759
+ * @param to Address to be the new token's owner.
760
+ * @param projectId Project ID to mint a token on.
761
+ * @param coreContract Core contract address for the given project.
762
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
763
+ * msg.sender being used to claim right to purchase.
764
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
765
+ * to claim right to purchase.
766
+ * @return tokenId Token ID of minted token
767
+ */
768
+ function purchaseTo(
769
+ address to,
770
+ uint256 projectId,
771
+ address coreContract,
772
+ address ownedNFTAddress,
773
+ uint256 ownedNFTTokenId,
774
+ address vault
775
+ ) public payable nonReentrant returns (uint256 tokenId) {
776
+ // CHECKS
777
+ // pre-mint MaxInvocationsLib checks
778
+ // Note that `maxHasBeenInvoked` is only checked here to reduce gas
779
+ // consumption after a project has been fully minted.
780
+ // `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
781
+ // gas consumption, but if not in sync with the core contract's value,
782
+ // the core contract also enforces its own max invocation check during
783
+ // minting.
784
+ MaxInvocationsLib.preMintChecks({
785
+ projectId: projectId,
786
+ coreContract: coreContract
787
+ });
788
+
789
+ // getPriceExp reverts if auction is unconfigured or has not started
790
+ uint256 pricePerTokenInWei = DAExpLib.getPriceExp({
791
+ projectId: projectId,
792
+ coreContract: coreContract
793
+ });
794
+ require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
795
+
796
+ // require token used to claim to be in set of allowlisted NFTs
797
+ require(
798
+ TokenHolderLib.isAllowlistedNFT({
799
+ projectId: projectId,
800
+ coreContract: coreContract,
801
+ ownedNFTAddress: ownedNFTAddress,
802
+ ownedNFTTokenId: ownedNFTTokenId
803
+ }),
804
+ "Only allowlisted NFTs"
805
+ );
806
+
807
+ // NOTE: delegate-vault handling **begins here**.
808
+
809
+ // handle that the vault may be either the `msg.sender` in the case
810
+ // that there is not a true vault, or may be `vault` if one is
811
+ // provided explicitly (and it is valid).
812
+ address vault_ = msg.sender;
813
+ if (vault != address(0)) {
814
+ // If a vault is provided, it must be valid, otherwise throw rather
815
+ // than optimistically-minting with original `msg.sender`.
816
+ // Note, we do not check `checkDelegateForAll` or `checkDelegateForContract` as well,
817
+ // as they are known to be implicitly checked by calling `checkDelegateForToken`.
818
+ bool isValidVault = _delegationRegistryContract
819
+ .checkDelegateForToken({
820
+ delegate: msg.sender,
821
+ vault: vault,
822
+ contract_: coreContract,
823
+ tokenId: ownedNFTTokenId
824
+ });
825
+
826
+ require(isValidVault, "Invalid delegate-vault pairing");
827
+ vault_ = vault;
828
+ }
829
+
830
+ // EFFECTS
831
+ tokenId = _minterFilter.mint_joo({
832
+ to: to,
833
+ projectId: projectId,
834
+ coreContract: coreContract,
835
+ sender: vault_
836
+ });
837
+
838
+ // NOTE: delegate-vault handling **ends here**.
839
+
840
+ MaxInvocationsLib.validatePurchaseEffectsInvocations({
841
+ tokenId: tokenId,
842
+ coreContract: coreContract
843
+ });
844
+
845
+ // INTERACTIONS
846
+ // require vault_ to own NFT used to redeem
847
+ /**
848
+ * @dev Considered an interaction because calling ownerOf on an NFT
849
+ * contract. Plan is to only integrate with AB/PBAB NFTs on the minter, but
850
+ * in case other NFTs are registered, better to check here. Also,
851
+ * function is non-reentrant, so this is extra cautious.
852
+ */
853
+ TokenHolderLib.validateNFTOwnership({
854
+ ownedNFTAddress: ownedNFTAddress,
855
+ ownedNFTTokenId: ownedNFTTokenId,
856
+ targetOwner: vault_
857
+ });
858
+ SplitFundsLib.splitFundsETHRefundSender({
859
+ projectId: projectId,
860
+ pricePerTokenInWei: pricePerTokenInWei,
861
+ coreContract: coreContract
862
+ });
863
+
864
+ return tokenId;
865
+ }
866
+ }