@artblocks/contracts 1.0.3 → 1.0.4

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 (366) 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 +125 -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 -6
  40. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +6 -6
  41. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +4 -4
  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 -6
  44. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
  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 +1 -1
  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 +3 -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 +86 -1
  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 +207 -0
  97. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +93 -0
  98. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +93 -0
  99. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +69 -0
  100. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +203 -0
  101. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +123 -0
  102. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +261 -0
  103. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +64 -0
  104. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +533 -0
  105. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +42 -26
  106. package/artifacts/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol/IWETH.json +1 -1
  107. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Address.json +2 -2
  108. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Counters.json +2 -2
  109. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/CustomERC721Metadata.json +2 -2
  110. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721.json +2 -2
  111. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721Enumerable.json +2 -2
  112. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/GenArt721CoreV1.json +2 -2
  113. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/SafeMath.json +2 -2
  114. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Strings.json +2 -2
  115. package/artifacts/contracts/legacy/GenArt721LegacyMinter.sol/GenArt721LegacyMinter.json +2 -2
  116. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
  117. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol/CustomERC721Metadata.json +3 -3
  118. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol/IERC20.json +1 -1
  119. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol/SafeMath.json +3 -3
  120. package/artifacts/contracts/libs/{0.5.x → v0.5.x}/Strings.sol/Strings.json +3 -3
  121. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +10 -0
  122. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +10 -0
  123. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol/BytecodeStorage.json +3 -3
  124. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageReader.json +3 -3
  125. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol/BytecodeStorageWriter.json +3 -3
  126. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol/Bytes32Strings.json +3 -3
  127. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +3 -3
  128. package/artifacts/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol/SSTORE2.json +3 -3
  129. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +10 -0
  130. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +10 -0
  131. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +10 -0
  132. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +10 -0
  133. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +10 -0
  134. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +10 -0
  135. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +10 -0
  136. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +10 -0
  137. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +10 -0
  138. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +10 -0
  139. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV0.sol/MinterFilterV0.json +2 -2
  140. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  141. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +58 -2
  142. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +1228 -0
  143. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
  144. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +1146 -0
  145. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
  146. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +909 -0
  147. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +1228 -0
  148. package/artifacts/contracts/minter-suite/Minters/MinterDALinV4.sol/MinterDALinV4.json +2 -2
  149. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +909 -0
  150. package/artifacts/contracts/minter-suite/Minters/MinterHolderV4.sol/MinterHolderV4.json +2 -2
  151. package/artifacts/contracts/minter-suite/Minters/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
  152. package/artifacts/contracts/minter-suite/Minters/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
  153. package/artifacts/contracts/minter-suite/Minters/MinterSEAV0.sol/MinterSEAV0.json +2 -2
  154. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +1325 -0
  155. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
  156. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +848 -0
  157. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +1091 -0
  158. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +1075 -0
  159. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +1243 -0
  160. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +1167 -0
  161. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
  162. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +772 -0
  163. package/artifacts/contracts/mock/BytecodeV0TextCR_DMock.sol/BytecodeV0TextCR_DMock.json +2 -2
  164. package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
  165. package/artifacts/contracts/mock/BytecodeV1TextCR_DMock.sol/BytecodeV1TextCR_DMock.json +4 -4
  166. package/artifacts/contracts/mock/DeadReceiverBidderMock.sol/DeadReceiverBidderMock.json +25 -2
  167. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  168. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +28 -2
  169. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +4 -4
  170. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +2 -2
  171. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
  172. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  173. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  174. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
  175. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
  176. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
  177. package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
  178. package/artifacts/contracts/mock/SSTORE2Mock.sol/SSTORE2Mock.json +2 -2
  179. package/artifacts/contracts/randomizer/deprecated/BasicRandomizer.sol/BasicRandomizer.json +2 -2
  180. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  181. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  182. package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
  183. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +48 -32
  184. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +2 -2
  185. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +2 -2
  186. package/contracts/AdminACLV0.sol +1 -1
  187. package/contracts/AdminACLV1.sol +1 -1
  188. package/contracts/DependencyRegistryV0.sol +216 -107
  189. package/contracts/GenArt721CoreV3.sol +27 -12
  190. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV0.sol +3 -3
  191. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV1.sol +3 -3
  192. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol +3 -3
  193. package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol +3 -3
  194. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +3 -3
  195. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +3 -3
  196. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV0.sol +3 -3
  197. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV1.sol +3 -3
  198. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol +3 -3
  199. package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol +3 -3
  200. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV0.sol +3 -3
  201. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol +3 -3
  202. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol +4 -4
  203. package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol +4 -4
  204. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV0.sol +3 -3
  205. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol +3 -3
  206. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol +4 -4
  207. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol +4 -4
  208. package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol +4 -4
  209. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV0.sol +3 -3
  210. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV1.sol +3 -3
  211. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol +3 -3
  212. package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol +3 -3
  213. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +3 -3
  214. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +3 -3
  215. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol +3 -3
  216. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol +3 -3
  217. package/contracts/engine/V2/GenArt721CoreV2_ENGINE_FLEX.sol +2 -2
  218. package/contracts/engine/V2/GenArt721CoreV2_PBAB.sol +2 -2
  219. package/contracts/engine/V2/GenArt721CoreV2_PRTNR.sol +3 -3
  220. package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +2 -2
  221. package/contracts/engine/V2/GenArt721MinterDAExp_PBAB.sol +1 -1
  222. package/contracts/engine/V2/GenArt721Minter_PBAB.sol +2 -2
  223. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +29 -14
  224. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +29 -14
  225. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +9 -9
  226. package/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol +1 -1
  227. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +20 -15
  228. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IAdminACLV0_PROHIBITION.sol +1 -1
  229. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +1 -1
  230. package/contracts/engine-registry/CoreRegistryV1.sol +1 -1
  231. package/contracts/engine-registry/EngineRegistryV0.sol +1 -1
  232. package/contracts/explorations/GenArt721CoreV3_Explorations.sol +27 -12
  233. package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryV0.sol +2 -2
  234. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3WithSharedRandomizer.sol +23 -0
  235. package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV1.sol +26 -0
  236. package/contracts/interfaces/v0.8.x/IRandomizer_V3CoreBase.sol +23 -0
  237. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +37 -0
  238. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +25 -0
  239. package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +26 -0
  240. package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +19 -0
  241. package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +69 -0
  242. package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +44 -0
  243. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +78 -0
  244. package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +28 -0
  245. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +191 -0
  246. package/contracts/interfaces/{0.8.x → v0.8.x}/ISharedRandomizerV0.sol +42 -24
  247. package/contracts/legacy/GenArt721CoreV1.sol +2 -2
  248. package/contracts/legacy/GenArt721LegacyMinter.sol +5 -5
  249. package/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol +1 -1
  250. package/contracts/libs/v0.8.x/ABHelpers.sol +55 -0
  251. package/contracts/libs/v0.8.x/AuthLib.sol +197 -0
  252. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +125 -0
  253. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +109 -0
  254. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +348 -0
  255. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +175 -0
  256. package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +160 -0
  257. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +320 -0
  258. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +44 -0
  259. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +390 -0
  260. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +583 -0
  261. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +153 -0
  262. package/contracts/minter-suite/MinterFilter/MinterFilterV0.sol +3 -3
  263. package/contracts/minter-suite/MinterFilter/MinterFilterV1.sol +5 -5
  264. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +83 -9
  265. package/contracts/minter-suite/Minters/MinterBase_v0_1_1.sol +4 -4
  266. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +966 -0
  267. package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +3 -3
  268. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +1126 -0
  269. package/contracts/minter-suite/Minters/MinterDAExpV4.sol +3 -3
  270. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +606 -0
  271. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +952 -0
  272. package/contracts/minter-suite/Minters/MinterDALinV4.sol +3 -3
  273. package/contracts/minter-suite/Minters/MinterDALinV5.sol +591 -0
  274. package/contracts/minter-suite/Minters/MinterHolderV4.sol +4 -4
  275. package/contracts/minter-suite/Minters/MinterMerkleV5.sol +4 -4
  276. package/contracts/minter-suite/Minters/MinterPolyptychV0.sol +6 -6
  277. package/contracts/minter-suite/Minters/MinterSEAV0.sol +3 -3
  278. package/contracts/minter-suite/Minters/MinterSEAV1.sol +1190 -0
  279. package/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol +5 -5
  280. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +570 -0
  281. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +821 -0
  282. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +802 -0
  283. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +1096 -0
  284. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +992 -0
  285. package/contracts/minter-suite/Minters/MinterSetPriceV4.sol +3 -3
  286. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +461 -0
  287. package/contracts/mock/BytecodeV0TextCR_DMock.sol +1 -1
  288. package/contracts/mock/BytecodeV1LibCallsMock.sol +1 -1
  289. package/contracts/mock/BytecodeV1TextCR_DMock.sol +1 -1
  290. package/contracts/mock/DeadReceiverBidderMock.sol +15 -0
  291. package/contracts/mock/DummySharedMinter.sol +2 -2
  292. package/contracts/mock/ERC20Mock.sol +16 -0
  293. package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +9 -9
  294. package/contracts/mock/MockAdminACLV0.sol +1 -1
  295. package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +1 -1
  296. package/contracts/mock/OriginRegisterMock.sol +1 -1
  297. package/contracts/mock/ReentrancyHolderMock.sol +1 -1
  298. package/contracts/mock/ReentrancyMerkleMock.sol +1 -1
  299. package/contracts/mock/ReentrancyMock.sol +1 -1
  300. package/contracts/mock/ReentrancySEAMock.sol +1 -1
  301. package/contracts/mock/SSTORE2Mock.sol +1 -1
  302. package/contracts/randomizer/deprecated/BasicRandomizer.sol +1 -1
  303. package/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol +2 -2
  304. package/contracts/randomizer/deprecated/RandomizerV2.sol +2 -2
  305. package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
  306. package/contracts/randomizer/shared/SharedRandomizerV0.sol +91 -76
  307. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +2 -2
  308. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +2 -2
  309. package/package.json +46 -31
  310. package/LICENSE +0 -165
  311. package/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol +0 -10
  312. /package/contracts/interfaces/{0.5.x → v0.5.x}/IBonusContract.sol +0 -0
  313. /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreContractV1.sol +0 -0
  314. /package/contracts/interfaces/{0.5.x → v0.5.x}/IGenArt721CoreV2_PBAB.sol +0 -0
  315. /package/contracts/interfaces/{0.5.x → v0.5.x}/IRandomizer.sol +0 -0
  316. /package/contracts/interfaces/{0.8.x → v0.8.x}/IAdminACLV0.sol +0 -0
  317. /package/contracts/interfaces/{0.8.x → v0.8.x}/IArtblocksRoyaltyOverride.sol +0 -0
  318. /package/contracts/interfaces/{0.8.x → v0.8.x}/IBonusContract.sol +0 -0
  319. /package/contracts/interfaces/{0.8.x → v0.8.x}/IBytecodeStorageReader.sol +0 -0
  320. /package/contracts/interfaces/{0.8.x → v0.8.x}/ICoreRegistryV1.sol +0 -0
  321. /package/contracts/interfaces/{0.8.x → v0.8.x}/IDelegationRegistry.sol +0 -0
  322. /package/contracts/interfaces/{0.8.x → v0.8.x}/IDependencyRegistryCompatibleV0.sol +0 -0
  323. /package/contracts/interfaces/{0.8.x → v0.8.x}/IEngineRegistryV0.sol +0 -0
  324. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV0.sol +0 -0
  325. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlementV1.sol +0 -0
  326. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpSettlement_Mixin.sol +0 -0
  327. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV0.sol +0 -0
  328. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDAExpV1.sol +0 -0
  329. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV0.sol +0 -0
  330. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterDALinV1.sol +0 -0
  331. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV0.sol +0 -0
  332. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV1.sol +0 -0
  333. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterHolderV2.sol +0 -0
  334. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV0.sol +0 -0
  335. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV1.sol +0 -0
  336. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterMerkleV2.sol +0 -0
  337. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterSEAV0.sol +0 -0
  338. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV0.sol +0 -0
  339. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV1.sol +0 -0
  340. /package/contracts/interfaces/{0.8.x → v0.8.x}/IFilteredMinterV2.sol +0 -0
  341. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractExposesHashSeed.sol +0 -0
  342. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV1.sol +0 -0
  343. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3.sol +0 -0
  344. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Base.sol +0 -0
  345. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine.sol +0 -0
  346. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreContractV3_Engine_Flex.sol +0 -0
  347. /package/contracts/interfaces/{0.8.x → v0.8.x}/IGenArt721CoreV2_PBAB.sol +0 -0
  348. /package/contracts/interfaces/{0.8.x → v0.8.x}/IManifold.sol +0 -0
  349. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterBaseV0.sol +0 -0
  350. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMinterFilterV0.sol +0 -0
  351. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPICoreV0.sol +0 -0
  352. /package/contracts/interfaces/{0.8.x → v0.8.x}/IMintingAPIMinterV0.sol +0 -0
  353. /package/contracts/interfaces/{0.8.x → v0.8.x}/IPseudorandomAtomic.sol +0 -0
  354. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizer.sol +0 -0
  355. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerPolyptychV0.sol +0 -0
  356. /package/contracts/interfaces/{0.8.x → v0.8.x}/IRandomizerV2.sol +0 -0
  357. /package/contracts/interfaces/{0.8.x → v0.8.x}/IWETH.sol +0 -0
  358. /package/contracts/libs/{0.5.x → v0.5.x}/CustomERC721Metadata.sol +0 -0
  359. /package/contracts/libs/{0.5.x → v0.5.x}/IERC20.sol +0 -0
  360. /package/contracts/libs/{0.5.x → v0.5.x}/SafeMath.sol +0 -0
  361. /package/contracts/libs/{0.5.x → v0.5.x}/Strings.sol +0 -0
  362. /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV0.sol +0 -0
  363. /package/contracts/libs/{0.8.x → v0.8.x}/BytecodeStorageV1.sol +0 -0
  364. /package/contracts/libs/{0.8.x → v0.8.x}/Bytes32Strings.sol +0 -0
  365. /package/contracts/libs/{0.8.x → v0.8.x}/ERC721_PackedHashSeed.sol +0 -0
  366. /package/contracts/libs/{0.8.x → v0.8.x}/SSTORE2.sol +0 -0
@@ -0,0 +1,1126 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ import "../../interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol";
5
+ import "../../interfaces/v0.8.x/ISharedMinterV0.sol";
6
+ import "../../interfaces/v0.8.x/ISharedMinterDAV0.sol";
7
+ import "../../interfaces/v0.8.x/ISharedMinterDAExpV0.sol";
8
+ import "../../interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol";
9
+ import "../../interfaces/v0.8.x/IMinterFilterV1.sol";
10
+
11
+ import "../../libs/v0.8.x/minter-libs/SettlementExpLib.sol";
12
+ import "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
13
+ import "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
14
+ import "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
15
+ import "../../libs/v0.8.x/AuthLib.sol";
16
+
17
+ import "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
18
+ import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
19
+
20
+ pragma solidity 0.8.19;
21
+
22
+ /**
23
+ * @title Shared, filtered Minter contract that allows tokens to be minted with
24
+ * ETH.
25
+ * Pricing is achieved using an automated Dutch-auction mechanism, with a
26
+ * settlement mechanism for tokens purchased before the auction ends.
27
+ * This is designed to be used with GenArt721CoreContractV3 flagship or
28
+ * engine contracts.
29
+ * @author Art Blocks Inc.
30
+ * @notice Privileged Roles and Ownership:
31
+ * This contract is designed to be managed, with limited powers.
32
+ * Privileged roles and abilities are controlled by the core contract's Admin
33
+ * ACL contract and a project's artist. Both of these roles hold extensive
34
+ * power and can modify minter details.
35
+ * Care must be taken to ensure that the admin ACL contract and artist
36
+ * addresses are secure behind a multi-sig or other access control mechanism.
37
+ * Additionally, the purchaser of a token has some trust assumptions regarding
38
+ * settlement, beyond typical minter Art Blocks trust assumptions. In general,
39
+ * Artists and Admin are trusted to not abuse their powers in a way that
40
+ * would artifically inflate the sellout price of a project. They are
41
+ * incentivized to not do so, as it would diminish their reputation and
42
+ * ability to sell future projects. Agreements between Admin and Artist
43
+ * may or may not be in place to further dissuade artificial inflation of an
44
+ * auction's sellout price.
45
+ * ----------------------------------------------------------------------------
46
+ * The following functions are restricted to the minter filter's Admin ACL
47
+ * contract:
48
+ * - setMinimumPriceDecayHalfLifeSeconds
49
+ * ----------------------------------------------------------------------------
50
+ * The following functions are restricted to the core contract's Admin ACL
51
+ * contract:
52
+ * - resetAuctionDetails (note: this will prevent minting until a new auction
53
+ * is created)
54
+ * - adminEmergencyReduceSelloutPrice
55
+ * ----------------------------------------------------------------------------
56
+ * The following functions are restricted to a project's artist or the core
57
+ * contract's Admin ACL contract:
58
+ * - withdrawArtistAndAdminRevenues (note: this may only be called after an
59
+ * auction has sold out or has reached base price)
60
+ * ----------------------------------------------------------------------------
61
+ * The following functions are restricted to a project's artist:
62
+ * - setAuctionDetails (note: this may only be called when there is no active
63
+ * auction, and must start at a price less than or equal to any previously
64
+ * made purchases)
65
+ * - manuallyLimitProjectMaxInvocations
66
+ * - syncProjectMaxInvocationsToCore (not implemented)
67
+ * ----------------------------------------------------------------------------
68
+ * Additional admin and artist privileged roles may be described on other
69
+ * contracts that this minter integrates with.
70
+ *
71
+ * @dev Note that while this minter makes use of `block.timestamp` and it is
72
+ * technically possible that this value is manipulated by block producers via
73
+ * denial of service (in PoS), such manipulation will not have material impact
74
+ * on the price values of this minter given the business practices for how
75
+ * pricing is congfigured for this minter and that variations on the order of
76
+ * less than a minute should not meaningfully impact price given the minimum
77
+ * allowable price decay rate that this minter intends to support.
78
+ */
79
+ contract MinterDAExpSettlementV3 is
80
+ ReentrancyGuard,
81
+ ISharedMinterSimplePurchaseV0,
82
+ ISharedMinterV0,
83
+ ISharedMinterDAV0,
84
+ ISharedMinterDAExpV0,
85
+ ISharedMinterDAExpSettlementV0
86
+ {
87
+ using SafeCast for uint256;
88
+
89
+ /// Minter filter address this minter interacts with
90
+ address public immutable minterFilterAddress;
91
+
92
+ /// Minter filter this minter may interact with.
93
+ IMinterFilterV1 private immutable minterFilter;
94
+
95
+ /// minterType for this minter
96
+ string public constant minterType = "MinterDAExpSettlementV3";
97
+
98
+ /// minter version for this minter
99
+ string public constant minterVersion = "v3.0.0";
100
+
101
+ /// Minimum price decay half life: price can decay with a half life of a
102
+ /// minimum of this amount (can cut in half a minimum of every N seconds).
103
+ uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
104
+
105
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
106
+ // STATE VARIABLES FOR SplitFundsLib begin here
107
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
108
+
109
+ // contractAddress => IsEngineCache
110
+ mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
111
+
112
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
113
+ // STATE VARIABLES FOR SplitFundsLib end here
114
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
115
+
116
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
117
+ // STATE VARIABLES FOR SettlementExpLib begin here
118
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
119
+
120
+ mapping(address => mapping(uint256 => SettlementExpLib.SettlementAuctionProjectConfig))
121
+ private _settlementAuctionProjectConfigMapping;
122
+
123
+ /// user address => contractAddress => project ID => receipt
124
+ mapping(address => mapping(address => mapping(uint256 => SettlementExpLib.Receipt)))
125
+ private _receiptsMapping;
126
+
127
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
128
+ // STATE VARIABLES FOR SettlementExpLib end here
129
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
130
+
131
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
132
+ // STATE VARIABLES FOR DAExpLib begin here
133
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
134
+
135
+ mapping(address => mapping(uint256 => DAExpLib.DAProjectConfig))
136
+ private _auctionProjectConfigMapping;
137
+
138
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
139
+ // STATE VARIABLES FOR DAExpLib end here
140
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
141
+
142
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
143
+ // STATE VARIABLES FOR MaxInvocationsLib begin here
144
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
145
+
146
+ // contractAddress => projectId => max invocations specific project config
147
+ mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
148
+ private _maxInvocationsProjectConfigMapping;
149
+
150
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
151
+ // STATE VARIABLES FOR MaxInvocationsLib end here
152
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
153
+
154
+ /**
155
+ * @notice Initializes contract to be a Filtered Minter for
156
+ * `_minterFilter` minter filter.
157
+ * @param _minterFilter Minter filter for which this will be a
158
+ * filtered minter.
159
+ */
160
+ constructor(address _minterFilter) ReentrancyGuard() {
161
+ minterFilterAddress = _minterFilter;
162
+ minterFilter = IMinterFilterV1(_minterFilter);
163
+ emit AuctionMinHalfLifeSecondsUpdated(minimumPriceDecayHalfLifeSeconds);
164
+ }
165
+
166
+ /**
167
+ * @notice Manually sets the local maximum invocations of project `_projectId`
168
+ * with the provided `_maxInvocations`, checking that `_maxInvocations` is less
169
+ * than or equal to the value of project `_project_id`'s maximum invocations that is
170
+ * set on the core contract.
171
+ * @dev Note that a `_maxInvocations` of 0 can only be set if the current `invocations`
172
+ * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
173
+ * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
174
+ * @param _projectId Project ID to set the maximum invocations for.
175
+ * @param _coreContract Core contract address for the given project.
176
+ * @param _maxInvocations Maximum invocations to set for the project.
177
+ */
178
+ function manuallyLimitProjectMaxInvocations(
179
+ uint256 _projectId,
180
+ address _coreContract,
181
+ uint24 _maxInvocations
182
+ ) external {
183
+ AuthLib.onlyArtist({
184
+ _projectId: _projectId,
185
+ _coreContract: _coreContract,
186
+ _sender: msg.sender
187
+ });
188
+ MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
189
+ _projectId: _projectId,
190
+ _coreContract: _coreContract,
191
+ _maxInvocations: _maxInvocations,
192
+ maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
193
+ _coreContract
194
+ ][_projectId]
195
+ });
196
+
197
+ emit ProjectMaxInvocationsLimitUpdated(
198
+ _projectId,
199
+ _coreContract,
200
+ _maxInvocations
201
+ );
202
+ }
203
+
204
+ /**
205
+ * @notice Sets auction details for project `_projectId`.
206
+ * @param _projectId Project ID to set auction details for.
207
+ * @param _coreContract Core contract address for the given project.
208
+ * @param _auctionTimestampStart Timestamp at which to start the auction.
209
+ * @param _priceDecayHalfLifeSeconds The half life with which to decay the
210
+ * price (in seconds).
211
+ * @param _startPrice Price at which to start the auction, in Wei.
212
+ * @param _basePrice Resting price of the auction, in Wei.
213
+ * @dev Note that it is intentionally supported here that the configured
214
+ * price may be explicitly set to `0`.
215
+ */
216
+ function setAuctionDetails(
217
+ uint256 _projectId,
218
+ address _coreContract,
219
+ uint40 _auctionTimestampStart,
220
+ uint40 _priceDecayHalfLifeSeconds,
221
+ uint256 _startPrice,
222
+ uint256 _basePrice
223
+ ) external {
224
+ AuthLib.onlyArtist({
225
+ _projectId: _projectId,
226
+ _coreContract: _coreContract,
227
+ _sender: msg.sender
228
+ });
229
+ // CHECKS
230
+ DAExpLib.DAProjectConfig
231
+ storage _auctionProjectConfig = _auctionProjectConfigMapping[
232
+ _coreContract
233
+ ][_projectId];
234
+ SettlementExpLib.SettlementAuctionProjectConfig
235
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
236
+ _coreContract
237
+ ][_projectId];
238
+
239
+ // require valid start price on a settlement minter
240
+ require(
241
+ SettlementExpLib.isValidStartPrice({
242
+ _startPrice: _startPrice,
243
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig
244
+ }),
245
+ "Only monotonic decreasing price"
246
+ );
247
+ // do not allow a base price of zero (to simplify logic on this minter)
248
+ require(_basePrice > 0, "Base price must be non-zero");
249
+ // require valid half life for this minter
250
+ require(
251
+ (_priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
252
+ "Price decay half life must be greater than min allowable value"
253
+ );
254
+
255
+ // EFFECTS
256
+ DAExpLib.setAuctionDetailsExp({
257
+ _DAProjectConfig: _auctionProjectConfig,
258
+ _auctionTimestampStart: _auctionTimestampStart,
259
+ _priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
260
+ _startPrice: _startPrice.toUint88(),
261
+ _basePrice: _basePrice.toUint88(),
262
+ // we set this to false so it prevents artist from altering auction
263
+ // even after max has been invoked (require explicit auction reset
264
+ // on settlement minter)
265
+ _allowReconfigureAfterStart: false
266
+ });
267
+
268
+ emit SetAuctionDetailsExp({
269
+ _projectId: _projectId,
270
+ _coreContract: _coreContract,
271
+ _auctionTimestampStart: _auctionTimestampStart,
272
+ _priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
273
+ _startPrice: _startPrice,
274
+ _basePrice: _basePrice
275
+ });
276
+
277
+ // refresh max invocations, ensuring the values are populated, and
278
+ // updating any local values that are illogical with respect to the
279
+ // current core contract state.
280
+ // @dev this refresh enables the guarantee that a project's max
281
+ // invocation state is always populated if an auction is configured.
282
+ MaxInvocationsLib.MaxInvocationsProjectConfig
283
+ storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
284
+ _coreContract
285
+ ][_projectId];
286
+ // @dev this minter pays the higher gas cost of a full refresh here due
287
+ // to the more severe ux degredation of a stale minter-local max
288
+ // invocations state.
289
+ bool maxInvocationsUpdated = MaxInvocationsLib.refreshMaxInvocations(
290
+ _projectId,
291
+ _coreContract,
292
+ _maxInvocationsProjectConfig
293
+ );
294
+
295
+ // emit event to update state
296
+ if (maxInvocationsUpdated) {
297
+ emit ProjectMaxInvocationsLimitUpdated(
298
+ _projectId,
299
+ _coreContract,
300
+ _maxInvocationsProjectConfig.maxInvocations
301
+ );
302
+ }
303
+ }
304
+
305
+ /**
306
+ * @notice Sets the minimum and maximum values that are settable for
307
+ * `_priceDecayHalfLifeSeconds` across all projects.
308
+ * @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
309
+ * (in seconds).
310
+ */
311
+ function setMinimumPriceDecayHalfLifeSeconds(
312
+ uint256 _minimumPriceDecayHalfLifeSeconds
313
+ ) external {
314
+ AuthLib.onlyMinterFilterAdminACL({
315
+ _minterFilterAddress: minterFilterAddress,
316
+ _sender: msg.sender,
317
+ _contract: address(this),
318
+ _selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
319
+ });
320
+ require(
321
+ _minimumPriceDecayHalfLifeSeconds > 0,
322
+ "Half life of zero not allowed"
323
+ );
324
+ minimumPriceDecayHalfLifeSeconds = _minimumPriceDecayHalfLifeSeconds;
325
+
326
+ emit AuctionMinHalfLifeSecondsUpdated(
327
+ _minimumPriceDecayHalfLifeSeconds
328
+ );
329
+ }
330
+
331
+ /**
332
+ * @notice Resets auction details for project `_projectId`, zero-ing out all
333
+ * relevant auction fields. Not intended to be used in normal auction
334
+ * operation, but rather only in case of the need to halt an auction.
335
+ * @param _projectId Project ID to set auction details for.
336
+ */
337
+ function resetAuctionDetails(
338
+ uint256 _projectId,
339
+ address _coreContract
340
+ ) external {
341
+ AuthLib.onlyCoreAdminACL({
342
+ _coreContract: _coreContract,
343
+ _sender: msg.sender,
344
+ _contract: address(this),
345
+ _selector: this.resetAuctionDetails.selector
346
+ });
347
+
348
+ SettlementExpLib.SettlementAuctionProjectConfig
349
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
350
+ _coreContract
351
+ ][_projectId];
352
+
353
+ // no reset after revenues collected, since that solidifies amount due
354
+ require(
355
+ !_settlementAuctionProjectConfig.auctionRevenuesCollected,
356
+ "Only before revenues collected"
357
+ );
358
+
359
+ // EFFECTS
360
+ // delete auction parameters
361
+ delete _auctionProjectConfigMapping[_coreContract][_projectId];
362
+
363
+ // @dev do NOT delete settlement parameters, as they are used to
364
+ // determine settlement amounts even through a reset
365
+
366
+ // @dev V3: changed this event to be fully consistent with
367
+ // non-settlement minters, as the settlement-specific parameters were
368
+ // not being used for any indexing purposes
369
+ emit ResetAuctionDetails(_projectId, _coreContract);
370
+ }
371
+
372
+ /**
373
+ * @notice This represents an admin stepping in and reducing the sellout
374
+ * price of an auction. This is only callable by the core admin, only
375
+ * after the auction is complete, but before project revenues are
376
+ * withdrawn.
377
+ * This is only intended to be used in the case where for some reason, the
378
+ * sellout price was too high.
379
+ * @param _projectId Project ID to reduce auction sellout price for.
380
+ * @param _newSelloutPrice New sellout price to set for the auction. Must
381
+ * be less than the current sellout price.
382
+ */
383
+ function adminEmergencyReduceSelloutPrice(
384
+ uint256 _projectId,
385
+ address _coreContract,
386
+ uint128 _newSelloutPrice
387
+ ) external {
388
+ AuthLib.onlyCoreAdminACL({
389
+ _coreContract: _coreContract,
390
+ _sender: msg.sender,
391
+ _contract: address(this),
392
+ _selector: this.adminEmergencyReduceSelloutPrice.selector
393
+ });
394
+
395
+ SettlementExpLib.SettlementAuctionProjectConfig
396
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
397
+ _coreContract
398
+ ][_projectId];
399
+ MaxInvocationsLib.MaxInvocationsProjectConfig
400
+ storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
401
+ _coreContract
402
+ ][_projectId];
403
+ DAExpLib.DAProjectConfig
404
+ storage _auctionProjectConfig = _auctionProjectConfigMapping[
405
+ _coreContract
406
+ ][_projectId];
407
+
408
+ bool maxInvocationsUpdated = SettlementExpLib
409
+ .adminEmergencyReduceSelloutPrice({
410
+ _projectId: _projectId,
411
+ _coreContract: _coreContract,
412
+ _newSelloutPrice: _newSelloutPrice,
413
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
414
+ _maxInvocationsProjectConfig: _maxInvocationsProjectConfig,
415
+ _DAProjectConfig: _auctionProjectConfig
416
+ });
417
+ emit ConfigValueSet(
418
+ _projectId,
419
+ _coreContract,
420
+ SettlementExpLib.CONFIG_CURRENT_SETTLED_PRICE,
421
+ uint256(_newSelloutPrice)
422
+ );
423
+ if (maxInvocationsUpdated) {
424
+ emit ProjectMaxInvocationsLimitUpdated(
425
+ _projectId,
426
+ _coreContract,
427
+ _maxInvocationsProjectConfig.maxInvocations
428
+ );
429
+ }
430
+ }
431
+
432
+ /**
433
+ * @notice This withdraws project revenues for the artist and admin.
434
+ * This function is only callable by the artist or admin, and only after
435
+ * one of the following is true:
436
+ * - the auction has sold out above base price
437
+ * - the auction has reached base price
438
+ * Note that revenues are not claimable if in a temporary state after
439
+ * an auction is reset.
440
+ * Revenues may only be collected a single time per project.
441
+ * After revenues are collected, auction parameters will never be allowed
442
+ * to be reset, and excess settlement funds will become immutable and fully
443
+ * deterministic.
444
+ */
445
+ function withdrawArtistAndAdminRevenues(
446
+ uint256 _projectId,
447
+ address _coreContract
448
+ ) external nonReentrant {
449
+ AuthLib.onlyCoreAdminACLOrArtist({
450
+ _projectId: _projectId,
451
+ _coreContract: _coreContract,
452
+ _sender: msg.sender,
453
+ _contract: address(this),
454
+ _selector: this.adminEmergencyReduceSelloutPrice.selector
455
+ });
456
+
457
+ SettlementExpLib.SettlementAuctionProjectConfig
458
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
459
+ _coreContract
460
+ ][_projectId];
461
+ MaxInvocationsLib.MaxInvocationsProjectConfig
462
+ storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
463
+ _coreContract
464
+ ][_projectId];
465
+ DAExpLib.DAProjectConfig
466
+ storage _auctionProjectConfig = _auctionProjectConfigMapping[
467
+ _coreContract
468
+ ][_projectId];
469
+
470
+ // @dev the following function affects settlement state and marks
471
+ // revenues as collected. Therefore revenues MUST be subsequently sent
472
+ // distributed in this call.
473
+ // @dev getting isEngine is considered a potential interaction, but
474
+ // with a trusted contract, and therefore may be done prior to some
475
+ // checks and effects
476
+ bool isEngine = SplitFundsLib.isEngine(
477
+ _coreContract,
478
+ _isEngineCaches[_coreContract]
479
+ );
480
+ // CHECKS-EFFECTS-INTERACTIONS
481
+ bool maxInvocationsUpdated = SettlementExpLib
482
+ .distributeArtistAndAdminRevenues({
483
+ _projectId: _projectId,
484
+ _coreContract: _coreContract,
485
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
486
+ _maxInvocationsProjectConfig: _maxInvocationsProjectConfig,
487
+ _DAProjectConfig: _auctionProjectConfig,
488
+ _isEngine: isEngine
489
+ });
490
+ emit ConfigValueSet(
491
+ _projectId,
492
+ _coreContract,
493
+ SettlementExpLib.CONFIG_AUCTION_REVENUES_COLLECTED,
494
+ true
495
+ );
496
+ if (maxInvocationsUpdated) {
497
+ emit ProjectMaxInvocationsLimitUpdated(
498
+ _projectId,
499
+ _coreContract,
500
+ _maxInvocationsProjectConfig.maxInvocations
501
+ );
502
+ }
503
+ }
504
+
505
+ /**
506
+ * @notice Reclaims the sender's payment above current settled price for
507
+ * project `_projectId` on core contract `_coreContract`.
508
+ * The current settled price is the the price paid for the most recently
509
+ * purchased token, or the base price if the artist has withdrawn revenues
510
+ * after the auction reached base price.
511
+ * This function is callable at any point, but is expected to typically be
512
+ * called after auction has sold out above base price or after the auction
513
+ * has been purchased at base price. This minimizes the amount of gas
514
+ * required to send all excess settlement funds to the sender.
515
+ * Sends excess settlement funds to msg.sender.
516
+ * @param _projectId Project ID to reclaim excess settlement funds on.
517
+ * @param _coreContract Contract address of the core contract
518
+ */
519
+ function reclaimProjectExcessSettlementFunds(
520
+ uint256 _projectId,
521
+ address _coreContract
522
+ ) external {
523
+ reclaimProjectExcessSettlementFundsTo(
524
+ payable(msg.sender),
525
+ _projectId,
526
+ _coreContract
527
+ );
528
+ }
529
+
530
+ /**
531
+ * @notice Reclaims the sender's payment above current settled price for
532
+ * projects in `_projectIds`. The current settled price is the the price
533
+ * paid for the most recently purchased token, or the base price if the
534
+ * artist has withdrawn revenues after the auction reached base price.
535
+ * This function is callable at any point, but is expected to typically be
536
+ * called after auction has sold out above base price or after the auction
537
+ * has been purchased at base price. This minimizes the amount of gas
538
+ * required to send all excess settlement funds to the sender.
539
+ * Sends total of all excess settlement funds to msg.sender in a single
540
+ * chunk. Entire transaction reverts if any excess settlement calculation
541
+ * fails.
542
+ * @param _projectIds Array of project IDs to reclaim excess settlement
543
+ * funds on.
544
+ * @param _coreContracts Array of core contract addresses for the given
545
+ * projects. Must be in the same order as `_projectIds` (aligned by index).
546
+ */
547
+ function reclaimProjectsExcessSettlementFunds(
548
+ uint256[] calldata _projectIds,
549
+ address[] calldata _coreContracts
550
+ ) external {
551
+ // @dev input validation checks are performed in subcall
552
+ reclaimProjectsExcessSettlementFundsTo(
553
+ payable(msg.sender),
554
+ _projectIds,
555
+ _coreContracts
556
+ );
557
+ }
558
+
559
+ /**
560
+ * @notice Purchases a token from project `_projectId`.
561
+ * @param _projectId Project ID to mint a token on.
562
+ * @param _coreContract Core contract address for the given project.
563
+ * @return tokenId Token ID of minted token
564
+ */
565
+ function purchase(
566
+ uint256 _projectId,
567
+ address _coreContract
568
+ ) external payable returns (uint256 tokenId) {
569
+ tokenId = purchaseTo({
570
+ _to: msg.sender,
571
+ _projectId: _projectId,
572
+ _coreContract: _coreContract
573
+ });
574
+
575
+ return tokenId;
576
+ }
577
+
578
+ // public getter functions
579
+ /**
580
+ * @notice Gets the maximum invocations project configuration.
581
+ * @param _coreContract The address of the core contract.
582
+ * @param _projectId The ID of the project whose data needs to be fetched.
583
+ * @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
584
+ * configuration data.
585
+ */
586
+ function maxInvocationsProjectConfig(
587
+ uint256 _projectId,
588
+ address _coreContract
589
+ )
590
+ external
591
+ view
592
+ returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
593
+ {
594
+ return _maxInvocationsProjectConfigMapping[_coreContract][_projectId];
595
+ }
596
+
597
+ /**
598
+ * @notice Retrieves the auction parameters for a specific project.
599
+ * @param _projectId The unique identifier for the project.
600
+ * @param _coreContract The address of the core contract for the project.
601
+ * @return timestampStart The start timestamp for the auction.
602
+ * @return priceDecayHalfLifeSeconds The half-life for the price decay
603
+ * during the auction, in seconds.
604
+ * @return startPrice The starting price of the auction.
605
+ * @return basePrice The base price of the auction.
606
+ */
607
+ function projectAuctionParameters(
608
+ uint256 _projectId,
609
+ address _coreContract
610
+ )
611
+ external
612
+ view
613
+ returns (
614
+ uint40 timestampStart,
615
+ uint40 priceDecayHalfLifeSeconds,
616
+ uint256 startPrice,
617
+ uint256 basePrice
618
+ )
619
+ {
620
+ DAExpLib.DAProjectConfig
621
+ storage _auctionProjectConfig = _auctionProjectConfigMapping[
622
+ _coreContract
623
+ ][_projectId];
624
+ timestampStart = _auctionProjectConfig.timestampStart;
625
+ priceDecayHalfLifeSeconds = _auctionProjectConfig
626
+ .priceDecayHalfLifeSeconds;
627
+ startPrice = _auctionProjectConfig.startPrice;
628
+ basePrice = _auctionProjectConfig.basePrice;
629
+ }
630
+
631
+ /**
632
+ * @notice Checks if the specified `_coreContract` is a valid engine contract.
633
+ * @dev This function retrieves the cached value of `_coreContract` from
634
+ * the `isEngineCache` mapping. If the cached value is already set, it
635
+ * returns the cached value. Otherwise, it calls the `getV3CoreIsEngine`
636
+ * function from the `SplitFundsLib` library to check if `_coreContract`
637
+ * is a valid engine contract.
638
+ * @dev This function will revert if the provided `_coreContract` is not
639
+ * a valid Engine or V3 Flagship contract.
640
+ * @param _coreContract The address of the contract to check.
641
+ * @return bool indicating if `_coreContract` is a valid engine contract.
642
+ */
643
+ function isEngineView(address _coreContract) external view returns (bool) {
644
+ SplitFundsLib.IsEngineCache storage isEngineCache = _isEngineCaches[
645
+ _coreContract
646
+ ];
647
+ if (isEngineCache.isCached) {
648
+ return isEngineCache.isEngine;
649
+ } else {
650
+ // @dev this calls the non-modifying variant of getV3CoreIsEngine
651
+ return SplitFundsLib.getV3CoreIsEngineView(_coreContract);
652
+ }
653
+ }
654
+
655
+ /**
656
+ * @notice projectId => has project reached its maximum number of
657
+ * invocations? Note that this returns a local cache of the core contract's
658
+ * state, and may be out of sync with the core contract. This is
659
+ * intentional, as it only enables gas optimization of mints after a
660
+ * project's maximum invocations has been reached. A false negative will
661
+ * only result in a gas cost increase, since the core contract will still
662
+ * enforce a maxInvocation check during minting. A false positive is not
663
+ * possible because the V3 core contract only allows maximum invocations
664
+ * to be reduced, not increased. Based on this rationale, we intentionally
665
+ * do not do input validation in this method as to whether or not the input
666
+ * @param `_projectId` is an existing project ID.
667
+ * @param `_coreContract` is an existing core contract address.
668
+ */
669
+ function projectMaxHasBeenInvoked(
670
+ uint256 _projectId,
671
+ address _coreContract
672
+ ) external view returns (bool) {
673
+ return
674
+ MaxInvocationsLib.getMaxHasBeenInvoked(
675
+ _maxInvocationsProjectConfigMapping[_coreContract][_projectId]
676
+ );
677
+ }
678
+
679
+ /**
680
+ * @notice projectId => project's maximum number of invocations.
681
+ * Optionally synced with core contract value, for gas optimization.
682
+ * Note that this returns a local cache of the core contract's
683
+ * state, and may be out of sync with the core contract. This is
684
+ * intentional, as it only enables gas optimization of mints after a
685
+ * project's maximum invocations has been reached.
686
+ * @dev A number greater than the core contract's project max invocations
687
+ * will only result in a gas cost increase, since the core contract will
688
+ * still enforce a maxInvocation check during minting. A number less than
689
+ * the core contract's project max invocations is only possible when the
690
+ * project's max invocations have not been synced on this minter, since the
691
+ * V3 core contract only allows maximum invocations to be reduced, not
692
+ * increased. When this happens, the minter will enable minting, allowing
693
+ * the core contract to enforce the max invocations check. Based on this
694
+ * rationale, we intentionally do not do input validation in this method as
695
+ * to whether or not the input `_projectId` is an existing project ID.
696
+ * @param `_projectId` is an existing project ID.
697
+ * @param `_coreContract` is an existing core contract address.
698
+ */
699
+ function projectMaxInvocations(
700
+ uint256 _projectId,
701
+ address _coreContract
702
+ ) external view returns (uint256) {
703
+ return
704
+ MaxInvocationsLib.getMaxInvocations(
705
+ _maxInvocationsProjectConfigMapping[_coreContract][_projectId]
706
+ );
707
+ }
708
+
709
+ /**
710
+ * @notice Gets the latest purchase price for project `_projectId`, or 0 if
711
+ * no purchases have been made.
712
+ * @param _projectId Project ID to get latest purchase price for.
713
+ * @param _coreContract Contract address of the core contract
714
+ */
715
+ function getProjectLatestPurchasePrice(
716
+ uint256 _projectId,
717
+ address _coreContract
718
+ ) external view returns (uint256 latestPurchasePrice) {
719
+ SettlementExpLib.SettlementAuctionProjectConfig
720
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
721
+ _coreContract
722
+ ][_projectId];
723
+ return _settlementAuctionProjectConfig.latestPurchasePrice;
724
+ }
725
+
726
+ /**
727
+ * @notice Gets the number of settleable invocations for project `_projectId`.
728
+ * @param _projectId Project ID to get number of settleable invocations for.
729
+ * @param _coreContract Contract address of the core contract
730
+ */
731
+ function getNumSettleableInvocations(
732
+ uint256 _projectId,
733
+ address _coreContract
734
+ ) external view returns (uint256 numSettleableInvocations) {
735
+ SettlementExpLib.SettlementAuctionProjectConfig
736
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
737
+ _coreContract
738
+ ][_projectId];
739
+ return _settlementAuctionProjectConfig.numSettleableInvocations;
740
+ }
741
+
742
+ /**
743
+ * @notice Gets if price of token is configured, price of minting a
744
+ * token on project `_projectId`, and currency symbol and address to be
745
+ * used as payment. Supersedes any core contract price information.
746
+ * @param _projectId Project ID to get price information for
747
+ * @param _coreContract Contract address of the core contract
748
+ * @return isConfigured true only if token price has been configured on
749
+ * this minter
750
+ * @return tokenPriceInWei current price of token on this minter - invalid
751
+ * if price has not yet been configured
752
+ * @return currencySymbol currency symbol for purchases of project on this
753
+ * minter. This minter always returns "ETH"
754
+ * @return currencyAddress currency address for purchases of project on
755
+ * this minter. This minter always returns null address, reserved for ether
756
+ */
757
+ function getPriceInfo(
758
+ uint256 _projectId,
759
+ address _coreContract
760
+ )
761
+ external
762
+ view
763
+ returns (
764
+ bool isConfigured,
765
+ uint256 tokenPriceInWei,
766
+ string memory currencySymbol,
767
+ address currencyAddress
768
+ )
769
+ {
770
+ SettlementExpLib.SettlementAuctionProjectConfig
771
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
772
+ _coreContract
773
+ ][_projectId];
774
+ MaxInvocationsLib.MaxInvocationsProjectConfig
775
+ storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
776
+ _coreContract
777
+ ][_projectId];
778
+ DAExpLib.DAProjectConfig
779
+ storage auctionProjectConfig = _auctionProjectConfigMapping[
780
+ _coreContract
781
+ ][_projectId];
782
+
783
+ // take action based on configured state
784
+ isConfigured = (auctionProjectConfig.startPrice > 0);
785
+ if (!isConfigured) {
786
+ // In the case of unconfigured auction, return price of zero when
787
+ // getPriceSafe would otherwise revert
788
+ tokenPriceInWei = 0;
789
+ } else if (block.timestamp <= auctionProjectConfig.timestampStart) {
790
+ // Provide a reasonable value for `tokenPriceInWei` when
791
+ // getPriceSafe would otherwise revert, using the starting price
792
+ // before auction starts.
793
+ tokenPriceInWei = auctionProjectConfig.startPrice;
794
+ } else {
795
+ // call getPriceSafe to get the current price
796
+ // @dev we do not use getPriceUnsafe here, as this is a view
797
+ // function, and we prefer to use the extra gas to appropriately
798
+ // correct for the case of a stale minter max invocation state.
799
+ tokenPriceInWei = SettlementExpLib.getPriceSafe({
800
+ _projectId: _projectId,
801
+ _coreContract: _coreContract,
802
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
803
+ _maxInvocationsProjectConfig: _maxInvocationsProjectConfig,
804
+ _DAProjectConfig: auctionProjectConfig
805
+ });
806
+ }
807
+ currencySymbol = "ETH";
808
+ currencyAddress = address(0);
809
+ }
810
+
811
+ /**
812
+ * @notice Gets the current excess settlement funds on project `_projectId`
813
+ * for address `_walletAddress`. The returned value is expected to change
814
+ * throughtout an auction, since the latest purchase price is used when
815
+ * determining excess settlement funds.
816
+ * A user may claim excess settlement funds by calling the function
817
+ * `reclaimProjectExcessSettlementFunds(_projectId)`.
818
+ * @param _projectId Project ID to query.
819
+ * @param _walletAddress Account address for which the excess posted funds
820
+ * is being queried.
821
+ * @return excessSettlementFundsInWei Amount of excess settlement funds, in
822
+ * wei
823
+ */
824
+ function getProjectExcessSettlementFunds(
825
+ uint256 _projectId,
826
+ address _coreContract,
827
+ address _walletAddress
828
+ ) external view returns (uint256 excessSettlementFundsInWei) {
829
+ // input validation
830
+ require(_walletAddress != address(0), "No zero address");
831
+
832
+ SettlementExpLib.SettlementAuctionProjectConfig
833
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
834
+ _coreContract
835
+ ][_projectId];
836
+ SettlementExpLib.Receipt storage _receipt = _receiptsMapping[
837
+ _walletAddress
838
+ ][_coreContract][_projectId];
839
+
840
+ (excessSettlementFundsInWei, ) = SettlementExpLib
841
+ .getProjectExcessSettlementFunds({
842
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
843
+ _receipt: _receipt
844
+ });
845
+ return excessSettlementFundsInWei;
846
+ }
847
+
848
+ /**
849
+ * @notice Reclaims the sender's payment above current settled price for
850
+ * project `_projectId` on core contract `_coreContract`.
851
+ * The current settled price is the the price paid for the most recently
852
+ * purchased token, or the base price if the artist has withdrawn revenues
853
+ * after the auction reached base price.
854
+ * This function is callable at any point, but is expected to typically be
855
+ * called after auction has sold out above base price or after the auction
856
+ * has been purchased at base price. This minimizes the amount of gas
857
+ * required to send all excess settlement funds to the sender.
858
+ * Sends excess settlement funds to address `_to`.
859
+ * @param _to Address to send excess settlement funds to.
860
+ * @param _projectId Project ID to reclaim excess settlement funds on.
861
+ * @param _coreContract Contract address of the core contract
862
+ */
863
+ function reclaimProjectExcessSettlementFundsTo(
864
+ address payable _to,
865
+ uint256 _projectId,
866
+ address _coreContract
867
+ ) public nonReentrant {
868
+ require(_to != address(0), "No claiming to the zero address");
869
+
870
+ SettlementExpLib.SettlementAuctionProjectConfig
871
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
872
+ _coreContract
873
+ ][_projectId];
874
+ SettlementExpLib.Receipt storage _receipt = _receiptsMapping[
875
+ msg.sender
876
+ ][_coreContract][_projectId];
877
+
878
+ (
879
+ uint256 excessSettlementFunds,
880
+ uint256 requiredAmountPosted
881
+ ) = SettlementExpLib.getProjectExcessSettlementFunds({
882
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
883
+ _receipt: _receipt
884
+ });
885
+ uint232 newNetPosted = requiredAmountPosted.toUint232();
886
+ _receipt.netPosted = newNetPosted;
887
+
888
+ emit ReceiptUpdated({
889
+ _purchaser: msg.sender,
890
+ _projectId: _projectId,
891
+ _coreContract: _coreContract,
892
+ _numPurchased: _receipt.numPurchased,
893
+ _netPosted: newNetPosted
894
+ });
895
+
896
+ // INTERACTIONS
897
+ bool success_;
898
+ (success_, ) = _to.call{value: excessSettlementFunds}("");
899
+ require(success_, "Reclaiming failed");
900
+ }
901
+
902
+ /**
903
+ * @notice Reclaims the sender's payment above current settled price for
904
+ * projects in `_projectIds`. The current settled price is the the price
905
+ * paid for the most recently purchased token, or the base price if the
906
+ * artist has withdrawn revenues after the auction reached base price.
907
+ * This function is callable at any point, but is expected to typically be
908
+ * called after auction has sold out above base price or after the auction
909
+ * has been purchased at base price. This minimizes the amount of gas
910
+ * required to send all excess settlement funds to the sender.
911
+ * Sends total of all excess settlement funds to `_to` in a single
912
+ * chunk. Entire transaction reverts if any excess settlement calculation
913
+ * fails.
914
+ * @param _to Address to send excess settlement funds to.
915
+ * @param _projectIds Array of project IDs to reclaim excess settlement
916
+ * funds on.
917
+ * @param _coreContracts Array of core contract addresses for the given
918
+ * projects. Must be in the same order as `_projectIds` (aligned by index).
919
+ */
920
+ function reclaimProjectsExcessSettlementFundsTo(
921
+ address payable _to,
922
+ uint256[] calldata _projectIds,
923
+ address[] calldata _coreContracts
924
+ ) public nonReentrant {
925
+ // CHECKS
926
+ // input validation
927
+ require(_to != address(0), "No claiming to the zero address");
928
+ uint256 projectIdsLength = _projectIds.length;
929
+ require(
930
+ projectIdsLength == _coreContracts.length,
931
+ "Array lengths must match"
932
+ );
933
+ // EFFECTS
934
+ // for each project, tally up the excess settlement funds and update
935
+ // the receipt in storage
936
+ uint256 excessSettlementFunds;
937
+ for (uint256 i; i < projectIdsLength; ) {
938
+ uint256 projectId = _projectIds[i];
939
+ address coreContract = _coreContracts[i];
940
+
941
+ SettlementExpLib.SettlementAuctionProjectConfig
942
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
943
+ coreContract
944
+ ][projectId];
945
+ SettlementExpLib.Receipt storage _receipt = _receiptsMapping[
946
+ msg.sender
947
+ ][coreContract][projectId];
948
+
949
+ (
950
+ uint256 excessSettlementFundsForProject,
951
+ uint256 requiredAmountPosted
952
+ ) = SettlementExpLib.getProjectExcessSettlementFunds({
953
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
954
+ _receipt: _receipt
955
+ });
956
+ uint232 newNetPosted = requiredAmountPosted.toUint232();
957
+ _receipt.netPosted = newNetPosted;
958
+
959
+ excessSettlementFunds += excessSettlementFundsForProject;
960
+
961
+ // emit event indicating new receipt state
962
+ emit ReceiptUpdated({
963
+ _purchaser: msg.sender,
964
+ _projectId: projectId,
965
+ _coreContract: coreContract,
966
+ _numPurchased: _receipt.numPurchased,
967
+ _netPosted: newNetPosted
968
+ });
969
+ // gas efficiently increment i
970
+ // won't overflow due to for loop, as well as gas limts
971
+ unchecked {
972
+ ++i;
973
+ }
974
+ }
975
+
976
+ // INTERACTIONS
977
+ // send excess settlement funds in a single chunk for all
978
+ // projects
979
+ bool success_;
980
+ (success_, ) = _to.call{value: excessSettlementFunds}("");
981
+ require(success_, "Reclaiming failed");
982
+ }
983
+
984
+ /**
985
+ * @notice This function is intentionally not implemented for this version
986
+ * of the minter. Due to potential for unintended consequences, the
987
+ * function `manuallyLimitProjectMaxInvocations` should be used to manually
988
+ * and explicitly limit the maximum invocations for a project to a value
989
+ * other than the core contract's maximum invocations for a project.
990
+ * @param _coreContract Core contract address for the given project.
991
+ * @param _projectId Project ID to set the maximum invocations for.
992
+ */
993
+ function syncProjectMaxInvocationsToCore(
994
+ uint256 _projectId,
995
+ address _coreContract
996
+ ) public view {
997
+ AuthLib.onlyArtist({
998
+ _projectId: _projectId,
999
+ _coreContract: _coreContract,
1000
+ _sender: msg.sender
1001
+ });
1002
+ revert("Not implemented");
1003
+ }
1004
+
1005
+ /**
1006
+ * @notice Purchases a token from project `_projectId` and sets
1007
+ * the token's owner to `_to`.
1008
+ * @param _to Address to be the new token's owner.
1009
+ * @param _projectId Project ID to mint a token on.
1010
+ * @param _coreContract Core contract address for the given project.
1011
+ * @return tokenId Token ID of minted token
1012
+ */
1013
+ function purchaseTo(
1014
+ address _to,
1015
+ uint256 _projectId,
1016
+ address _coreContract
1017
+ ) public payable nonReentrant returns (uint256 tokenId) {
1018
+ // CHECKS
1019
+ SettlementExpLib.SettlementAuctionProjectConfig
1020
+ storage _settlementAuctionProjectConfig = _settlementAuctionProjectConfigMapping[
1021
+ _coreContract
1022
+ ][_projectId];
1023
+ MaxInvocationsLib.MaxInvocationsProjectConfig
1024
+ storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
1025
+ _coreContract
1026
+ ][_projectId];
1027
+ DAExpLib.DAProjectConfig
1028
+ storage _auctionProjectConfig = _auctionProjectConfigMapping[
1029
+ _coreContract
1030
+ ][_projectId];
1031
+
1032
+ // Note that `maxHasBeenInvoked` is only checked here to reduce gas
1033
+ // consumption after a project has been fully minted.
1034
+ // `_maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
1035
+ // gas consumption, but if not in sync with the core contract's value,
1036
+ // the core contract also enforces its own max invocation check during
1037
+ // minting.
1038
+ require(
1039
+ !_maxInvocationsProjectConfig.maxHasBeenInvoked,
1040
+ "Max invocations reached"
1041
+ );
1042
+
1043
+ // _getPriceUnsafe reverts if auction has not yet started or auction is
1044
+ // unconfigured, and auction has not sold out or revenues have not been
1045
+ // withdrawn.
1046
+ // @dev _getPriceUnsafe is guaranteed to be accurate unless the core
1047
+ // contract is limiting invocations and we have stale local state
1048
+ // returning a false negative that max invocations have been reached.
1049
+ // This is acceptable, because that case will revert this
1050
+ // call later on in this function, when the core contract's max
1051
+ // invocation check fails.
1052
+ uint256 currentPriceInWei = SettlementExpLib.getPriceUnsafe({
1053
+ _settlementAuctionProjectConfig: _settlementAuctionProjectConfig,
1054
+ _maxInvocationsProjectConfig: _maxInvocationsProjectConfig,
1055
+ _DAProjectConfig: _auctionProjectConfig
1056
+ });
1057
+
1058
+ // EFFECTS
1059
+ // update the purchaser's receipt and require sufficient net payment
1060
+ SettlementExpLib.Receipt storage receipt = _receiptsMapping[msg.sender][
1061
+ _coreContract
1062
+ ][_projectId];
1063
+
1064
+ (uint232 netPosted, uint24 numPurchased) = SettlementExpLib
1065
+ .validateReceiptEffects(receipt, currentPriceInWei);
1066
+
1067
+ // emit event indicating new receipt state
1068
+ emit ReceiptUpdated({
1069
+ _purchaser: msg.sender,
1070
+ _projectId: _projectId,
1071
+ _coreContract: _coreContract,
1072
+ _numPurchased: numPurchased,
1073
+ _netPosted: netPosted
1074
+ });
1075
+
1076
+ // update latest purchase price (on this minter) in storage
1077
+ // @dev this is used to enforce monotonically decreasing purchase price
1078
+ // across multiple auctions
1079
+ _settlementAuctionProjectConfig.latestPurchasePrice = currentPriceInWei
1080
+ .toUint128();
1081
+
1082
+ tokenId = minterFilter.mint_joo({
1083
+ _to: _to,
1084
+ _projectId: _projectId,
1085
+ _coreContract: _coreContract,
1086
+ _sender: msg.sender
1087
+ });
1088
+
1089
+ // verify token invocation is valid given local minter max invocations,
1090
+ // update local maxHasBeenInvoked
1091
+ MaxInvocationsLib.validatePurchaseEffectsInvocations(
1092
+ tokenId,
1093
+ _maxInvocationsProjectConfig
1094
+ );
1095
+
1096
+ // INTERACTIONS
1097
+ // @dev this logic is intentionally defined here to avoid a dependency
1098
+ // in SettlementLib on SplitFundsLib, which would increase complexity
1099
+ if (_settlementAuctionProjectConfig.auctionRevenuesCollected) {
1100
+ // if revenues have been collected, split funds immediately.
1101
+ // @dev note that we are guaranteed to be at auction base price,
1102
+ // since we know we didn't sellout prior to this tx.
1103
+ // note that we don't refund msg.sender here, since a separate
1104
+ // settlement mechanism is provided on this minter, unrelated to
1105
+ // msg.value
1106
+ // INTERACTIONS
1107
+ bool isEngine = SplitFundsLib.isEngine(
1108
+ _coreContract,
1109
+ _isEngineCaches[_coreContract]
1110
+ );
1111
+ SplitFundsLib.splitFundsETH({
1112
+ _projectId: _projectId,
1113
+ _pricePerTokenInWei: currentPriceInWei,
1114
+ _coreContract: _coreContract,
1115
+ _isEngine: isEngine
1116
+ });
1117
+ } else {
1118
+ // increment the number of settleable invocations that will be
1119
+ // claimable by the artist and admin once auction is validated.
1120
+ // do not split revenue here since will be claimed at a later time.
1121
+ _settlementAuctionProjectConfig.numSettleableInvocations++;
1122
+ }
1123
+
1124
+ return tokenId;
1125
+ }
1126
+ }