@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,886 @@
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 {ISharedMinterSimplePurchaseV0} from "../../interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.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 {ISharedMinterDAExpSettlementV0} from "../../interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol";
13
+ import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
14
+
15
+ import {SettlementExpLib} from "../../libs/v0.8.x/minter-libs/SettlementExpLib.sol";
16
+ import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
17
+ import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.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
+
24
+ /**
25
+ * @title Shared, filtered Minter contract that allows tokens to be minted with
26
+ * ETH.
27
+ * Pricing is achieved using an automated Dutch-auction mechanism, with a
28
+ * settlement mechanism for tokens purchased before the auction ends.
29
+ * This is designed to be used with GenArt721CoreContractV3 flagship or
30
+ * engine contracts.
31
+ * @author Art Blocks Inc.
32
+ * @notice Privileged Roles and Ownership:
33
+ * This contract is designed to be managed, with limited powers.
34
+ * Privileged roles and abilities are controlled by the core contract's Admin
35
+ * ACL contract and a project's artist. Both of these roles hold extensive
36
+ * power and can modify minter details.
37
+ * Care must be taken to ensure that the admin ACL contract and artist
38
+ * addresses are secure behind a multi-sig or other access control mechanism.
39
+ * Additionally, the purchaser of a token has some trust assumptions regarding
40
+ * settlement, beyond typical minter Art Blocks trust assumptions. In general,
41
+ * Artists and Admin are trusted to not abuse their powers in a way that
42
+ * would artifically inflate the sellout price of a project. They are
43
+ * incentivized to not do so, as it would diminish their reputation and
44
+ * ability to sell future projects. Agreements between Admin and Artist
45
+ * may or may not be in place to further dissuade artificial inflation of an
46
+ * auction's sellout price.
47
+ * ----------------------------------------------------------------------------
48
+ * The following functions are restricted to the minter filter's Admin ACL
49
+ * contract:
50
+ * - setMinimumPriceDecayHalfLifeSeconds
51
+ * ----------------------------------------------------------------------------
52
+ * The following functions are restricted to the core contract's Admin ACL
53
+ * contract:
54
+ * - resetAuctionDetails (note: this will prevent minting until a new auction
55
+ * is created)
56
+ * ----------------------------------------------------------------------------
57
+ * The following functions are restricted to a project's artist or the core
58
+ * contract's Admin ACL contract:
59
+ * - withdrawArtistAndAdminRevenues (note: this may only be called after an
60
+ * auction has sold out or has reached base price)
61
+ * ----------------------------------------------------------------------------
62
+ * The following functions are restricted to a project's artist:
63
+ * - setAuctionDetails (note: this may only be called when there is no active
64
+ * auction, and must start at a price less than or equal to any previously
65
+ * made purchases)
66
+ * - manuallyLimitProjectMaxInvocations
67
+ * - syncProjectMaxInvocationsToCore (not implemented)
68
+ * ----------------------------------------------------------------------------
69
+ * Additional admin and artist privileged roles may be described on other
70
+ * contracts that this minter integrates with.
71
+ * ----------------------------------------------------------------------------
72
+ * @notice Caution: While Engine projects must be registered on the Art Blocks
73
+ * Core Registry to assign this minter, this minter does not enforce that a
74
+ * project is registered when configured or queried. This is primarily for gas
75
+ * optimization purposes. It is, therefore, possible that fake projects may be
76
+ * configured on this minter, but they will not be able to mint tokens due to
77
+ * checks performed by this minter's Minter Filter.
78
+ *
79
+ * @dev Note that while this minter makes use of `block.timestamp` and it is
80
+ * technically possible that this value is manipulated by block producers via
81
+ * denial of service (in PoS), such manipulation will not have material impact
82
+ * on the price values of this minter given the business practices for how
83
+ * pricing is congfigured for this minter and that variations on the order of
84
+ * less than a minute should not meaningfully impact price given the minimum
85
+ * allowable price decay rate that this minter intends to support.
86
+ */
87
+ contract MinterDAExpSettlementV3 is
88
+ ReentrancyGuard,
89
+ ISharedMinterSimplePurchaseV0,
90
+ ISharedMinterV0,
91
+ ISharedMinterDAV0,
92
+ ISharedMinterDAExpV0,
93
+ ISharedMinterDAExpSettlementV0
94
+ {
95
+ using SafeCast for uint256;
96
+
97
+ /// @notice Minter filter address this minter interacts with
98
+ address public immutable minterFilterAddress;
99
+
100
+ /// @notice Minter filter this minter may interact with.
101
+ IMinterFilterV1 private immutable _minterFilter;
102
+
103
+ /// @notice minterType for this minter
104
+ string public constant minterType = "MinterDAExpSettlementV3";
105
+
106
+ /// @notice minter version for this minter
107
+ string public constant minterVersion = "v3.0.0";
108
+
109
+ /// @notice Minimum price decay half life: price can decay with a half life of a
110
+ /// minimum of this amount (can cut in half a minimum of every N seconds).
111
+ uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
112
+
113
+ /**
114
+ * @notice Initializes contract to be a Filtered Minter for
115
+ * `minterFilter` minter filter.
116
+ * @param minterFilter Minter filter for which this will be a
117
+ * filtered minter.
118
+ */
119
+ constructor(address minterFilter) ReentrancyGuard() {
120
+ minterFilterAddress = minterFilter;
121
+ _minterFilter = IMinterFilterV1(minterFilter);
122
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
123
+ minimumPriceDecayHalfLifeSeconds
124
+ );
125
+ }
126
+
127
+ /**
128
+ * @notice Manually sets the local maximum invocations of project `projectId`
129
+ * with the provided `maxInvocations`, checking that `maxInvocations` is less
130
+ * than or equal to the value of project `project_id`'s maximum invocations that is
131
+ * set on the core contract.
132
+ * @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
133
+ * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
134
+ * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
135
+ * @param projectId Project ID to set the maximum invocations for.
136
+ * @param coreContract Core contract address for the given project.
137
+ * @param maxInvocations Maximum invocations to set for the project.
138
+ */
139
+ function manuallyLimitProjectMaxInvocations(
140
+ uint256 projectId,
141
+ address coreContract,
142
+ uint24 maxInvocations
143
+ ) external {
144
+ AuthLib.onlyArtist({
145
+ projectId: projectId,
146
+ coreContract: coreContract,
147
+ sender: msg.sender
148
+ });
149
+ // @dev guard rail to prevent accidentally adjusting max invocations
150
+ // after one or more purchases have been made
151
+ require(
152
+ SettlementExpLib.getNumPurchasesOnMinter({
153
+ projectId: projectId,
154
+ coreContract: coreContract
155
+ }) == 0,
156
+ "Only before purchases"
157
+ );
158
+ MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
159
+ projectId: projectId,
160
+ coreContract: coreContract,
161
+ maxInvocations: maxInvocations
162
+ });
163
+ }
164
+
165
+ /**
166
+ * @notice Sets auction details for project `projectId`.
167
+ * @param projectId Project ID to set auction details for.
168
+ * @param coreContract Core contract address for the given project.
169
+ * @param auctionTimestampStart Timestamp at which to start the auction.
170
+ * @param priceDecayHalfLifeSeconds The half life with which to decay the
171
+ * price (in seconds).
172
+ * @param startPrice Price at which to start the auction, in Wei.
173
+ * @param basePrice Resting price of the auction, in Wei.
174
+ * @dev Note that a basePrice of `0` will cause the transaction to revert.
175
+ */
176
+ function setAuctionDetails(
177
+ uint256 projectId,
178
+ address coreContract,
179
+ uint40 auctionTimestampStart,
180
+ uint40 priceDecayHalfLifeSeconds,
181
+ uint256 startPrice,
182
+ uint256 basePrice
183
+ ) external {
184
+ AuthLib.onlyArtist({
185
+ projectId: projectId,
186
+ coreContract: coreContract,
187
+ sender: msg.sender
188
+ });
189
+ // CHECKS
190
+ // require valid start price on a settlement minter
191
+ require(
192
+ SettlementExpLib.isValidStartPrice({
193
+ projectId: projectId,
194
+ coreContract: coreContract,
195
+ startPrice: startPrice
196
+ }),
197
+ "Only monotonic decreasing price"
198
+ );
199
+ // do not allow a base price of zero (to simplify logic on this minter)
200
+ require(basePrice > 0, "Base price must be non-zero");
201
+ // require valid half life for this minter
202
+ require(
203
+ (priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
204
+ "Price decay half life must be greater than min allowable value"
205
+ );
206
+
207
+ // EFFECTS
208
+ DAExpLib.setAuctionDetailsExp({
209
+ projectId: projectId,
210
+ coreContract: coreContract,
211
+ auctionTimestampStart: auctionTimestampStart,
212
+ priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
213
+ startPrice: startPrice.toUint88(),
214
+ basePrice: basePrice.toUint88(),
215
+ // we set this to false so it prevents artist from altering auction
216
+ // even after max has been invoked (require explicit auction reset
217
+ // on settlement minter)
218
+ allowReconfigureAfterStart: false
219
+ });
220
+
221
+ // refresh max invocations, ensuring the values are populated, and
222
+ // updating any local values that are illogical with respect to the
223
+ // current core contract state.
224
+ // @dev this refresh enables the guarantee that a project's max
225
+ // invocation state is always populated if an auction is configured.
226
+ // @dev this minter pays the higher gas cost of a full refresh here due
227
+ // to the more severe ux degredation of a stale minter-local max
228
+ // invocations state.
229
+ MaxInvocationsLib.refreshMaxInvocations({
230
+ projectId: projectId,
231
+ coreContract: coreContract
232
+ });
233
+ }
234
+
235
+ /**
236
+ * @notice Sets the minimum and maximum values that are settable for
237
+ * `priceDecayHalfLifeSeconds` across all projects.
238
+ * @param minimumPriceDecayHalfLifeSeconds_ Minimum price decay half life
239
+ * (in seconds).
240
+ */
241
+ function setMinimumPriceDecayHalfLifeSeconds(
242
+ uint256 minimumPriceDecayHalfLifeSeconds_
243
+ ) external {
244
+ AuthLib.onlyMinterFilterAdminACL({
245
+ minterFilterAddress: minterFilterAddress,
246
+ sender: msg.sender,
247
+ contract_: address(this),
248
+ selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
249
+ });
250
+ require(
251
+ minimumPriceDecayHalfLifeSeconds_ > 0,
252
+ "Half life of zero not allowed"
253
+ );
254
+ minimumPriceDecayHalfLifeSeconds = minimumPriceDecayHalfLifeSeconds_;
255
+
256
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
257
+ minimumPriceDecayHalfLifeSeconds_
258
+ );
259
+ }
260
+
261
+ /**
262
+ * @notice Resets auction details for project `projectId`, zero-ing out all
263
+ * relevant auction fields. Not intended to be used in normal auction
264
+ * operation, but rather only in case of the need to halt an auction.
265
+ * @param projectId Project ID to set auction details for.
266
+ * @param coreContract Core contract address for the given project.
267
+ */
268
+ function resetAuctionDetails(
269
+ uint256 projectId,
270
+ address coreContract
271
+ ) external {
272
+ AuthLib.onlyCoreAdminACL({
273
+ coreContract: coreContract,
274
+ sender: msg.sender,
275
+ contract_: address(this),
276
+ selector: this.resetAuctionDetails.selector
277
+ });
278
+
279
+ SettlementExpLib.SettlementAuctionProjectConfig
280
+ storage settlementAuctionProjectConfig = SettlementExpLib
281
+ .getSettlementAuctionProjectConfig({
282
+ projectId: projectId,
283
+ coreContract: coreContract
284
+ });
285
+
286
+ // no reset after revenues collected, since that solidifies amount due
287
+ require(
288
+ !settlementAuctionProjectConfig.auctionRevenuesCollected,
289
+ "Only before revenues collected"
290
+ );
291
+
292
+ // EFFECTS
293
+ // delete auction parameters
294
+ DAExpLib.resetAuctionDetails({
295
+ projectId: projectId,
296
+ coreContract: coreContract
297
+ });
298
+
299
+ // @dev do NOT delete settlement parameters, as they are used to
300
+ // determine settlement amounts even through a reset
301
+ }
302
+
303
+ /**
304
+ * @notice This withdraws project revenues for the artist and admin.
305
+ * This function is only callable by the artist or admin, and only after
306
+ * one of the following is true:
307
+ * - the auction has sold out above base price
308
+ * - the auction has reached base price
309
+ * Note that revenues are not claimable if in a temporary state after
310
+ * an auction is reset.
311
+ * Revenues may only be collected a single time per project.
312
+ * After revenues are collected, auction parameters will never be allowed
313
+ * to be reset, and excess settlement funds will become immutable and fully
314
+ * deterministic.
315
+ * @param projectId Project ID to withdraw revenues for.
316
+ * @param coreContract Core contract address for the given project.
317
+ */
318
+ function withdrawArtistAndAdminRevenues(
319
+ uint256 projectId,
320
+ address coreContract
321
+ ) external nonReentrant {
322
+ AuthLib.onlyCoreAdminACLOrArtist({
323
+ projectId: projectId,
324
+ coreContract: coreContract,
325
+ sender: msg.sender,
326
+ contract_: address(this),
327
+ selector: this.withdrawArtistAndAdminRevenues.selector
328
+ });
329
+
330
+ // @dev the following function affects settlement state and marks
331
+ // revenues as collected, as well as distributes revenues.
332
+ // CHECKS-EFFECTS-INTERACTIONS
333
+ // @dev the following function updates the project's balance and will
334
+ // revert if the project's balance is insufficient to cover the
335
+ // settlement amount (which is expected to not be possible)
336
+ SettlementExpLib.distributeArtistAndAdminRevenues({
337
+ projectId: projectId,
338
+ coreContract: coreContract
339
+ });
340
+ }
341
+
342
+ /**
343
+ * @notice Reclaims the sender's payment above current settled price for
344
+ * project `projectId` on core contract `coreContract`.
345
+ * The current settled price is the the price paid for the most recently
346
+ * purchased token, or the base price if the artist has withdrawn revenues
347
+ * after the auction reached base price.
348
+ * This function is callable at any point, but is expected to typically be
349
+ * called after auction has sold out above base price or after the auction
350
+ * has been purchased at base price. This minimizes the amount of gas
351
+ * required to send all excess settlement funds to the sender.
352
+ * Sends excess settlement funds to msg.sender.
353
+ * @param projectId Project ID to reclaim excess settlement funds on.
354
+ * @param coreContract Contract address of the core contract
355
+ */
356
+ function reclaimProjectExcessSettlementFunds(
357
+ uint256 projectId,
358
+ address coreContract
359
+ ) external {
360
+ reclaimProjectExcessSettlementFundsTo({
361
+ to: payable(msg.sender),
362
+ projectId: projectId,
363
+ coreContract: coreContract
364
+ });
365
+ }
366
+
367
+ /**
368
+ * @notice Reclaims the sender's payment above current settled price for
369
+ * projects in `projectIds`. The current settled price is the the price
370
+ * paid for the most recently purchased token, or the base price if the
371
+ * artist has withdrawn revenues after the auction reached base price.
372
+ * This function is callable at any point, but is expected to typically be
373
+ * called after auction has sold out above base price or after the auction
374
+ * has been purchased at base price. This minimizes the amount of gas
375
+ * required to send all excess settlement funds to the sender.
376
+ * Sends total of all excess settlement funds to msg.sender in a single
377
+ * chunk. Entire transaction reverts if any excess settlement calculation
378
+ * fails.
379
+ * @param projectIds Array of project IDs to reclaim excess settlement
380
+ * funds on.
381
+ * @param coreContracts Array of core contract addresses for the given
382
+ * projects. Must be in the same order as `projectIds` (aligned by index).
383
+ */
384
+ function reclaimProjectsExcessSettlementFunds(
385
+ uint256[] calldata projectIds,
386
+ address[] calldata coreContracts
387
+ ) external {
388
+ // @dev input validation checks are performed in subcall
389
+ reclaimProjectsExcessSettlementFundsTo({
390
+ to: payable(msg.sender),
391
+ projectIds: projectIds,
392
+ coreContracts: coreContracts
393
+ });
394
+ }
395
+
396
+ /**
397
+ * @notice Purchases a token from project `projectId`.
398
+ * @param projectId Project ID to mint a token on.
399
+ * @param coreContract Core contract address for the given project.
400
+ * @return tokenId Token ID of minted token
401
+ */
402
+ function purchase(
403
+ uint256 projectId,
404
+ address coreContract
405
+ ) external payable returns (uint256 tokenId) {
406
+ tokenId = purchaseTo({
407
+ to: msg.sender,
408
+ projectId: projectId,
409
+ coreContract: coreContract
410
+ });
411
+
412
+ return tokenId;
413
+ }
414
+
415
+ // public getter functions
416
+ /**
417
+ * @notice Gets the maximum invocations project configuration.
418
+ * @param coreContract The address of the core contract.
419
+ * @param projectId The ID of the project whose data needs to be fetched.
420
+ * @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
421
+ * configuration data.
422
+ */
423
+ function maxInvocationsProjectConfig(
424
+ uint256 projectId,
425
+ address coreContract
426
+ )
427
+ external
428
+ view
429
+ returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
430
+ {
431
+ return
432
+ MaxInvocationsLib.getMaxInvocationsProjectConfig({
433
+ projectId: projectId,
434
+ coreContract: coreContract
435
+ });
436
+ }
437
+
438
+ /**
439
+ * @notice Retrieves the auction parameters for a specific project.
440
+ * @param projectId The unique identifier for the project.
441
+ * @param coreContract The address of the core contract for the project.
442
+ * @return timestampStart The start timestamp for the auction.
443
+ * @return priceDecayHalfLifeSeconds The half-life for the price decay
444
+ * during the auction, in seconds.
445
+ * @return startPrice The starting price of the auction.
446
+ * @return basePrice The base price of the auction.
447
+ */
448
+ function projectAuctionParameters(
449
+ uint256 projectId,
450
+ address coreContract
451
+ )
452
+ external
453
+ view
454
+ returns (
455
+ uint40 timestampStart,
456
+ uint40 priceDecayHalfLifeSeconds,
457
+ uint256 startPrice,
458
+ uint256 basePrice
459
+ )
460
+ {
461
+ DAExpLib.DAProjectConfig storage _auctionProjectConfig = DAExpLib
462
+ .getDAProjectConfig({
463
+ projectId: projectId,
464
+ coreContract: coreContract
465
+ });
466
+ timestampStart = _auctionProjectConfig.timestampStart;
467
+ priceDecayHalfLifeSeconds = _auctionProjectConfig
468
+ .priceDecayHalfLifeSeconds;
469
+ startPrice = _auctionProjectConfig.startPrice;
470
+ basePrice = _auctionProjectConfig.basePrice;
471
+ }
472
+
473
+ /**
474
+ * @notice Checks if the specified `coreContract` is a valid engine contract.
475
+ * @dev This function retrieves the cached value of `coreContract` from
476
+ * the `isEngineCache` mapping. If the cached value is already set, it
477
+ * returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
478
+ * function from the `SplitFundsLib` library to check if `coreContract`
479
+ * is a valid engine contract.
480
+ * @dev This function will revert if the provided `coreContract` is not
481
+ * a valid Engine or V3 Flagship contract.
482
+ * @param coreContract The address of the contract to check.
483
+ * @return bool indicating if `coreContract` is a valid engine contract.
484
+ */
485
+ function isEngineView(address coreContract) external view returns (bool) {
486
+ SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
487
+ .getIsEngineCacheConfig(coreContract);
488
+ if (isEngineCache.isCached) {
489
+ return isEngineCache.isEngine;
490
+ } else {
491
+ // @dev this calls the non-state-modifying variant of isEngine
492
+ return SplitFundsLib.getV3CoreIsEngineView(coreContract);
493
+ }
494
+ }
495
+
496
+ /**
497
+ * @notice projectId => has project reached its maximum number of
498
+ * invocations? Note that this returns a local cache of the core contract's
499
+ * state, and may be out of sync with the core contract. This is
500
+ * intentional, as it only enables gas optimization of mints after a
501
+ * project's maximum invocations has been reached. A false negative will
502
+ * only result in a gas cost increase, since the core contract will still
503
+ * enforce a maxInvocation check during minting. A false positive may be possible
504
+ * if function `manuallyLimitProjectMaxInvocations` has been invoked, resulting in
505
+ * `localMaxInvocations` < `coreContractMaxInvocations`. Based on this rationale, we intentionally
506
+ * do not do input validation in this method as to whether or not the input
507
+ * @param projectId is an existing project ID.
508
+ * @param coreContract is an existing core contract address.
509
+ */
510
+ function projectMaxHasBeenInvoked(
511
+ uint256 projectId,
512
+ address coreContract
513
+ ) external view returns (bool) {
514
+ return
515
+ MaxInvocationsLib.getMaxHasBeenInvoked({
516
+ projectId: projectId,
517
+ coreContract: coreContract
518
+ });
519
+ }
520
+
521
+ /**
522
+ * @notice projectId => project's maximum number of invocations.
523
+ * Optionally synced with core contract value, for gas optimization.
524
+ * Note that this returns a local cache of the core contract's
525
+ * state, and may be out of sync with the core contract. This is
526
+ * intentional, as it only enables gas optimization of mints after a
527
+ * project's maximum invocations has been reached.
528
+ * @dev A number greater than the core contract's project max invocations
529
+ * will only result in a gas cost increase, since the core contract will
530
+ * still enforce a maxInvocation check during minting. A number less than
531
+ * the core contract's project max invocations is possible if the artist
532
+ * has called manuallyLimitProjectMaxInvocations or when the project's max
533
+ * invocations have not been synced on this minter, since the
534
+ * V3 core contract only allows maximum invocations to be reduced, not
535
+ * increased. When this happens, the minter will enable minting, allowing
536
+ * the core contract to enforce the max invocations check. Based on this
537
+ * rationale, we intentionally do not do input validation in this method as
538
+ * to whether or not the input `projectId` is an existing project ID.
539
+ * @param projectId is an existing project ID.
540
+ * @param coreContract is an existing core contract address.
541
+ */
542
+ function projectMaxInvocations(
543
+ uint256 projectId,
544
+ address coreContract
545
+ ) external view returns (uint256) {
546
+ return
547
+ MaxInvocationsLib.getMaxInvocations({
548
+ projectId: projectId,
549
+ coreContract: coreContract
550
+ });
551
+ }
552
+
553
+ /**
554
+ * @notice Gets the latest purchase price for project `projectId`, or 0 if
555
+ * no purchases have been made.
556
+ * @param projectId Project ID to get latest purchase price for.
557
+ * @param coreContract Contract address of the core contract
558
+ * @return latestPurchasePrice Latest purchase price
559
+ */
560
+ function getProjectLatestPurchasePrice(
561
+ uint256 projectId,
562
+ address coreContract
563
+ ) external view returns (uint256 latestPurchasePrice) {
564
+ SettlementExpLib.SettlementAuctionProjectConfig
565
+ storage settlementAuctionProjectConfig = SettlementExpLib
566
+ .getSettlementAuctionProjectConfig({
567
+ projectId: projectId,
568
+ coreContract: coreContract
569
+ });
570
+ return settlementAuctionProjectConfig.latestPurchasePrice;
571
+ }
572
+
573
+ /**
574
+ * @notice Gets the number of settleable invocations for project `projectId`.
575
+ * @param projectId Project ID to get number of settleable invocations for.
576
+ * @param coreContract Contract address of the core contract
577
+ * @return numSettleableInvocations Number of settleable invocations
578
+ */
579
+ function getNumSettleableInvocations(
580
+ uint256 projectId,
581
+ address coreContract
582
+ ) external view returns (uint256 numSettleableInvocations) {
583
+ SettlementExpLib.SettlementAuctionProjectConfig
584
+ storage settlementAuctionProjectConfig = SettlementExpLib
585
+ .getSettlementAuctionProjectConfig({
586
+ projectId: projectId,
587
+ coreContract: coreContract
588
+ });
589
+ return settlementAuctionProjectConfig.numSettleableInvocations;
590
+ }
591
+
592
+ /**
593
+ * @notice Gets the balance of ETH, in wei, currently held by the minter
594
+ * for project `projectId`. This value is non-zero if not all purchasers
595
+ * have reclaimed their excess settlement funds, or if an artist/admin has
596
+ * not yet withdrawn their revenues.
597
+ * @param projectId Project ID to get balance for.
598
+ * @param coreContract Contract address of the core contract
599
+ */
600
+ function getProjectBalance(
601
+ uint256 projectId,
602
+ address coreContract
603
+ ) external view returns (uint256 projectBalance) {
604
+ SettlementExpLib.SettlementAuctionProjectConfig
605
+ storage settlementAuctionProjectConfig = SettlementExpLib
606
+ .getSettlementAuctionProjectConfig({
607
+ projectId: projectId,
608
+ coreContract: coreContract
609
+ });
610
+ return settlementAuctionProjectConfig.projectBalance;
611
+ }
612
+
613
+ /**
614
+ * @notice Gets if price of token is configured, price of minting a
615
+ * token on project `projectId`, and currency symbol and address to be
616
+ * used as payment. Supersedes any core contract price information.
617
+ * @param projectId Project ID to get price information for
618
+ * @param coreContract Contract address of the core contract
619
+ * @return isConfigured true only if token price has been configured on
620
+ * this minter
621
+ * @return tokenPriceInWei current price of token on this minter - invalid
622
+ * if price has not yet been configured
623
+ * @return currencySymbol currency symbol for purchases of project on this
624
+ * minter. This minter always returns "ETH"
625
+ * @return currencyAddress currency address for purchases of project on
626
+ * this minter. This minter always returns null address, reserved for ether
627
+ */
628
+ function getPriceInfo(
629
+ uint256 projectId,
630
+ address coreContract
631
+ )
632
+ external
633
+ view
634
+ returns (
635
+ bool isConfigured,
636
+ uint256 tokenPriceInWei,
637
+ string memory currencySymbol,
638
+ address currencyAddress
639
+ )
640
+ {
641
+ DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
642
+ .getDAProjectConfig({
643
+ projectId: projectId,
644
+ coreContract: coreContract
645
+ });
646
+
647
+ // take action based on configured state
648
+ isConfigured = (auctionProjectConfig.startPrice > 0);
649
+ if (!isConfigured) {
650
+ // In the case of unconfigured auction, return price of zero when
651
+ // getPriceSafe would otherwise revert
652
+ tokenPriceInWei = 0;
653
+ } else if (block.timestamp <= auctionProjectConfig.timestampStart) {
654
+ // Provide a reasonable value for `tokenPriceInWei` when
655
+ // getPriceSafe would otherwise revert, using the starting price
656
+ // before auction starts.
657
+ tokenPriceInWei = auctionProjectConfig.startPrice;
658
+ } else {
659
+ // call getPriceSafe to get the current price
660
+ // @dev we do not use getPriceUnsafe here, as this is a view
661
+ // function, and we prefer to use the extra gas to appropriately
662
+ // correct for the case of a stale minter max invocation state.
663
+ tokenPriceInWei = SettlementExpLib.getPriceSafe({
664
+ projectId: projectId,
665
+ coreContract: coreContract
666
+ });
667
+ }
668
+ currencySymbol = "ETH";
669
+ currencyAddress = address(0);
670
+ }
671
+
672
+ /**
673
+ * @notice Gets the current excess settlement funds on project `projectId`
674
+ * for address `walletAddress`. The returned value is expected to change
675
+ * throughtout an auction, since the latest purchase price is used when
676
+ * determining excess settlement funds.
677
+ * A user may claim excess settlement funds by calling the function
678
+ * `reclaimProjectExcessSettlementFunds(_projectId)`.
679
+ * @param projectId Project ID to query.
680
+ * @param coreContract Contract address of the core contract
681
+ * @param walletAddress Account address for which the excess posted funds
682
+ * is being queried.
683
+ * @return excessSettlementFundsInWei Amount of excess settlement funds, in
684
+ * wei
685
+ */
686
+ function getProjectExcessSettlementFunds(
687
+ uint256 projectId,
688
+ address coreContract,
689
+ address walletAddress
690
+ ) external view returns (uint256 excessSettlementFundsInWei) {
691
+ // input validation
692
+ require(walletAddress != address(0), "No zero address");
693
+
694
+ (excessSettlementFundsInWei, ) = SettlementExpLib
695
+ .getProjectExcessSettlementFunds({
696
+ projectId: projectId,
697
+ coreContract: coreContract,
698
+ walletAddress: walletAddress
699
+ });
700
+ }
701
+
702
+ /**
703
+ * @notice Reclaims the sender's payment above current settled price for
704
+ * project `projectId` on core contract `coreContract`.
705
+ * The current settled price is the the price paid for the most recently
706
+ * purchased token, or the base price if the artist has withdrawn revenues
707
+ * after the auction reached base price.
708
+ * This function is callable at any point, but is expected to typically be
709
+ * called after auction has sold out above base price or after the auction
710
+ * has been purchased at base price. This minimizes the amount of gas
711
+ * required to send all excess settlement funds to the sender.
712
+ * Sends excess settlement funds to address `to`.
713
+ * @param to Address to send excess settlement funds to.
714
+ * @param projectId Project ID to reclaim excess settlement funds on.
715
+ * @param coreContract Contract address of the core contract
716
+ */
717
+ function reclaimProjectExcessSettlementFundsTo(
718
+ address payable to,
719
+ uint256 projectId,
720
+ address coreContract
721
+ ) public nonReentrant {
722
+ require(to != address(0), "No claiming to the zero address");
723
+
724
+ SettlementExpLib.reclaimProjectExcessSettlementFundsTo({
725
+ to: to,
726
+ projectId: projectId,
727
+ coreContract: coreContract,
728
+ purchaserAddress: msg.sender
729
+ });
730
+ }
731
+
732
+ /**
733
+ * @notice Reclaims the sender's payment above current settled price for
734
+ * projects in `projectIds`. The current settled price is the the price
735
+ * paid for the most recently purchased token, or the base price if the
736
+ * artist has withdrawn revenues after the auction reached base price.
737
+ * This function is callable at any point, but is expected to typically be
738
+ * called after auction has sold out above base price or after the auction
739
+ * has been purchased at base price. This minimizes the amount of gas
740
+ * required to send all excess settlement funds to the sender.
741
+ * Sends total of all excess settlement funds to `to` in a single
742
+ * chunk. Entire transaction reverts if any excess settlement calculation
743
+ * fails.
744
+ * @param to Address to send excess settlement funds to.
745
+ * @param projectIds Array of project IDs to reclaim excess settlement
746
+ * funds on.
747
+ * @param coreContracts Array of core contract addresses for the given
748
+ * projects. Must be in the same order as `projectIds` (aligned by index).
749
+ */
750
+ function reclaimProjectsExcessSettlementFundsTo(
751
+ address payable to,
752
+ uint256[] calldata projectIds,
753
+ address[] calldata coreContracts
754
+ ) public nonReentrant {
755
+ // CHECKS
756
+ // input validation
757
+ require(to != address(0), "No claiming to the zero address");
758
+ uint256 projectIdsLength = projectIds.length;
759
+ require(
760
+ projectIdsLength == coreContracts.length,
761
+ "Array lengths must match"
762
+ );
763
+ // EFFECTS
764
+ // for each project, tally up the excess settlement funds and update
765
+ // the receipt in storage
766
+ uint256 excessSettlementFunds;
767
+ for (uint256 i; i < projectIdsLength; ) {
768
+ SettlementExpLib.reclaimProjectExcessSettlementFundsTo({
769
+ to: to,
770
+ projectId: projectIds[i],
771
+ coreContract: coreContracts[i],
772
+ purchaserAddress: msg.sender
773
+ });
774
+
775
+ // gas efficiently increment i
776
+ // won't overflow due to for loop, as well as gas limts
777
+ unchecked {
778
+ ++i;
779
+ }
780
+ }
781
+
782
+ // INTERACTIONS
783
+ // send excess settlement funds in a single chunk for all
784
+ // projects
785
+ bool success_;
786
+ (success_, ) = to.call{value: excessSettlementFunds}("");
787
+ require(success_, "Reclaiming failed");
788
+ }
789
+
790
+ /**
791
+ * @notice Purchases a token from project `projectId` and sets
792
+ * the token's owner to `to`.
793
+ * @param to Address to be the new token's owner.
794
+ * @param projectId Project ID to mint a token on.
795
+ * @param coreContract Core contract address for the given project.
796
+ * @return tokenId Token ID of minted token
797
+ */
798
+ function purchaseTo(
799
+ address to,
800
+ uint256 projectId,
801
+ address coreContract
802
+ ) public payable nonReentrant returns (uint256 tokenId) {
803
+ // CHECKS
804
+ // pre-mint MaxInvocationsLib checks
805
+ // Note that `maxHasBeenInvoked` is only checked here to reduce gas
806
+ // consumption after a project has been fully minted.
807
+ // `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
808
+ // gas consumption, but if not in sync with the core contract's value,
809
+ // the core contract also enforces its own max invocation check during
810
+ // minting.
811
+ MaxInvocationsLib.preMintChecks({
812
+ projectId: projectId,
813
+ coreContract: coreContract
814
+ });
815
+
816
+ // _getPriceUnsafe reverts if auction has not yet started or auction is
817
+ // unconfigured, and auction has not sold out or revenues have not been
818
+ // withdrawn.
819
+ // @dev _getPriceUnsafe is guaranteed to be accurate unless the core
820
+ // contract is limiting invocations and we have stale local state
821
+ // returning a false negative that max invocations have been reached.
822
+ // This is acceptable, because that case will revert this
823
+ // call later on in this function, when the core contract's max
824
+ // invocation check fails.
825
+ uint256 currentPriceInWei = SettlementExpLib.getPriceUnsafe({
826
+ projectId: projectId,
827
+ coreContract: coreContract,
828
+ maxHasBeenInvoked: false // always false due to MaxInvocationsLib.preMintChecks
829
+ });
830
+
831
+ // EFFECTS
832
+ // update and validate receipts, latest purchase price, overall project
833
+ // balance, and number of tokens auctioned on this minter
834
+ SettlementExpLib.preMintEffects({
835
+ projectId: projectId,
836
+ coreContract: coreContract,
837
+ currentPriceInWei: currentPriceInWei,
838
+ msgValue: msg.value,
839
+ purchaserAddress: msg.sender
840
+ });
841
+
842
+ // INTERACTIONS
843
+ tokenId = _minterFilter.mint_joo({
844
+ to: to,
845
+ projectId: projectId,
846
+ coreContract: coreContract,
847
+ sender: msg.sender
848
+ });
849
+
850
+ // verify token invocation is valid given local minter max invocations,
851
+ // update local maxHasBeenInvoked
852
+ MaxInvocationsLib.validatePurchaseEffectsInvocations({
853
+ tokenId: tokenId,
854
+ coreContract: coreContract
855
+ });
856
+
857
+ // distribute payments if revenues have been collected, or increment
858
+ // number of settleable invocations if revenues have not been collected
859
+ SettlementExpLib.postMintInteractions({
860
+ projectId: projectId,
861
+ coreContract: coreContract,
862
+ currentPriceInWei: currentPriceInWei
863
+ });
864
+ }
865
+
866
+ /**
867
+ * @notice This function is intentionally not implemented for this version
868
+ * of the minter. Due to potential for unintended consequences, the
869
+ * function `manuallyLimitProjectMaxInvocations` should be used to manually
870
+ * and explicitly limit the maximum invocations for a project to a value
871
+ * other than the core contract's maximum invocations for a project.
872
+ * @param coreContract Core contract address for the given project.
873
+ * @param projectId Project ID to set the maximum invocations for.
874
+ */
875
+ function syncProjectMaxInvocationsToCore(
876
+ uint256 projectId,
877
+ address coreContract
878
+ ) public view {
879
+ AuthLib.onlyArtist({
880
+ projectId: projectId,
881
+ coreContract: coreContract,
882
+ sender: msg.sender
883
+ });
884
+ revert("Not implemented");
885
+ }
886
+ }