@artblocks/contracts 0.0.1

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 (196) hide show
  1. package/.env.example +10 -0
  2. package/LICENSE +165 -0
  3. package/README.md +286 -0
  4. package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +164 -0
  5. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +248 -0
  6. package/artifacts/contracts/BasicRandomizer.sol/BasicRandomizer.json +24 -0
  7. package/artifacts/contracts/BasicRandomizerV2.sol/BasicRandomizerV2.json +102 -0
  8. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +1020 -0
  9. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +1928 -0
  10. package/artifacts/contracts/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +1942 -0
  11. package/artifacts/contracts/engine/GenArt721CoreV2_ENGINE_FLEX.sol/GenArt721CoreV2_ENGINE_FLEX.json +1708 -0
  12. package/artifacts/contracts/engine/GenArt721CoreV2_PBAB.sol/GenArt721CoreV2_PBAB.json +1410 -0
  13. package/artifacts/contracts/engine/GenArt721CoreV2_PRTNR.sol/GenArt721CoreV2_PRTNR.json +1436 -0
  14. package/artifacts/contracts/engine/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +437 -0
  15. package/artifacts/contracts/engine/GenArt721MinterDAExp_PBAB.sol/GenArt721MinterDAExp_PBAB.json +508 -0
  16. package/artifacts/contracts/engine/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +381 -0
  17. package/artifacts/contracts/engine-registry/EngineRegistryV0.sol/EngineRegistryV0.json +109 -0
  18. package/artifacts/contracts/engine-registry/future/EngineRegistryV1.sol/EngineRegistryV1.json +109 -0
  19. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +1902 -0
  20. package/artifacts/contracts/interfaces/0.5.x/IBonusContract.sol/IBonusContract.json +47 -0
  21. package/artifacts/contracts/interfaces/0.5.x/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +413 -0
  22. package/artifacts/contracts/interfaces/0.5.x/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +392 -0
  23. package/artifacts/contracts/interfaces/0.5.x/IRandomizer.sol/IRandomizer.json +26 -0
  24. package/artifacts/contracts/interfaces/0.8.x/IAdminACLV0.sol/IAdminACLV0.json +122 -0
  25. package/artifacts/contracts/interfaces/0.8.x/IArtblocksRoyaltyOverride.sol/IArtblocksRoyaltyOverride.json +59 -0
  26. package/artifacts/contracts/interfaces/0.8.x/IBonusContract.sol/IBonusContract.json +43 -0
  27. package/artifacts/contracts/interfaces/0.8.x/IDelegationRegistry.sol/IDelegationRegistry.json +510 -0
  28. package/artifacts/contracts/interfaces/0.8.x/IDependencyRegistryCompatibleV0.sol/IDependencyRegistryCompatibleV0.json +53 -0
  29. package/artifacts/contracts/interfaces/0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +350 -0
  30. package/artifacts/contracts/interfaces/0.8.x/IEngineRegistryV0.sol/IEngineRegistryV0.json +85 -0
  31. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +730 -0
  32. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterDAExpV0.sol/IFilteredMinterDAExpV0.json +311 -0
  33. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterDAExpV1.sol/IFilteredMinterDAExpV1.json +617 -0
  34. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterDALinV0.sol/IFilteredMinterDALinV0.json +292 -0
  35. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterDALinV1.sol/IFilteredMinterDALinV1.json +598 -0
  36. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterHolderV0.sol/IFilteredMinterHolderV0.json +355 -0
  37. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterHolderV1.sol/IFilteredMinterHolderV1.json +368 -0
  38. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterHolderV2.sol/IFilteredMinterHolderV2.json +674 -0
  39. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterMerkleV0.sol/IFilteredMinterMerkleV0.json +551 -0
  40. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterMerkleV1.sol/IFilteredMinterMerkleV1.json +564 -0
  41. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterMerkleV2.sol/IFilteredMinterMerkleV2.json +601 -0
  42. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterV0.sol/IFilteredMinterV0.json +216 -0
  43. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterV1.sol/IFilteredMinterV1.json +485 -0
  44. package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterV2.sol/IFilteredMinterV2.json +522 -0
  45. package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV1.sol/IGenArt721CoreContractV1.json +299 -0
  46. package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +609 -0
  47. package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +448 -0
  48. package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +649 -0
  49. package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol/IGenArt721CoreV2_PBAB.json +362 -0
  50. package/artifacts/contracts/interfaces/0.8.x/IManifold.sol/IManifold.json +35 -0
  51. package/artifacts/contracts/interfaces/0.8.x/IMinterFilterV0.sol/IMinterFilterV0.json +192 -0
  52. package/artifacts/contracts/interfaces/0.8.x/IRandomizer.sol/IRandomizer.json +24 -0
  53. package/artifacts/contracts/interfaces/0.8.x/IRandomizerV2.sol/IRandomizerV2.json +37 -0
  54. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Address.json +10 -0
  55. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Counters.json +10 -0
  56. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/CustomERC721Metadata.json +425 -0
  57. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC165.json +38 -0
  58. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721.json +322 -0
  59. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/ERC721Enumerable.json +384 -0
  60. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/GenArt721CoreV1.json +1773 -0
  61. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/IERC165.json +32 -0
  62. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/IERC721.json +316 -0
  63. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/IERC721Enumerable.json +378 -0
  64. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/IERC721Receiver.json +47 -0
  65. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/SafeMath.json +10 -0
  66. package/artifacts/contracts/legacy/GenArt721CoreV1.sol/Strings.json +10 -0
  67. package/artifacts/contracts/legacy/GenArt721LegacyMinter.sol/GenArt721LegacyMinter.json +338 -0
  68. package/artifacts/contracts/libs/0.5.x/CustomERC721Metadata.sol/CustomERC721Metadata.json +425 -0
  69. package/artifacts/contracts/libs/0.5.x/IERC20.sol/IERC20.json +206 -0
  70. package/artifacts/contracts/libs/0.5.x/SafeMath.sol/SafeMath.json +10 -0
  71. package/artifacts/contracts/libs/0.5.x/Strings.sol/Strings.json +10 -0
  72. package/artifacts/contracts/libs/0.8.x/BytecodeStorage.sol/BytecodeStorage.json +10 -0
  73. package/artifacts/contracts/libs/0.8.x/Bytes32Strings.sol/Bytes32Strings.json +10 -0
  74. package/artifacts/contracts/libs/0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +357 -0
  75. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +529 -0
  76. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +1037 -0
  77. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +172 -0
  78. package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +24 -0
  79. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV0.sol/MinterFilterV0.json +342 -0
  80. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +322 -0
  81. package/artifacts/contracts/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +550 -0
  82. package/artifacts/contracts/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +856 -0
  83. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +1053 -0
  84. package/artifacts/contracts/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +526 -0
  85. package/artifacts/contracts/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +832 -0
  86. package/artifacts/contracts/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +794 -0
  87. package/artifacts/contracts/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +1100 -0
  88. package/artifacts/contracts/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +1002 -0
  89. package/artifacts/contracts/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +1039 -0
  90. package/artifacts/contracts/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +365 -0
  91. package/artifacts/contracts/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +671 -0
  92. package/artifacts/contracts/minter-suite/Minters/MinterSetPrice/deprecated/MinterSetPriceV1.sol/MinterSetPriceV1.json +288 -0
  93. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +436 -0
  94. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +742 -0
  95. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20/deprecated/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +461 -0
  96. package/artifacts/contracts/mock/BytecodeTextCR_DMock.sol/BytecodeTextCR_DMock.json +194 -0
  97. package/artifacts/contracts/mock/DeadReceiverMock.sol/DeadReceiverMock.json +15 -0
  98. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +292 -0
  99. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +165 -0
  100. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +128 -0
  101. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +118 -0
  102. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +87 -0
  103. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +82 -0
  104. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +208 -0
  105. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +301 -0
  106. package/contracts/AdminACLV0.sol +103 -0
  107. package/contracts/AdminACLV1.sol +193 -0
  108. package/contracts/BasicRandomizer.sol +23 -0
  109. package/contracts/BasicRandomizerV2.sol +36 -0
  110. package/contracts/DependencyRegistryV0.sol +893 -0
  111. package/contracts/GenArt721CoreV3.sol +2001 -0
  112. package/contracts/GenArt721CoreV3_Engine.sol +2061 -0
  113. package/contracts/engine/GenArt721CoreV2_ENGINE_FLEX.sol +887 -0
  114. package/contracts/engine/GenArt721CoreV2_PBAB.sol +695 -0
  115. package/contracts/engine/GenArt721CoreV2_PRTNR.sol +749 -0
  116. package/contracts/engine/GenArt721MinterBurner_PBAB.sol +467 -0
  117. package/contracts/engine/GenArt721MinterDAExp_PBAB.sol +614 -0
  118. package/contracts/engine/GenArt721Minter_PBAB.sol +420 -0
  119. package/contracts/engine-registry/EngineRegistryV0.sol +72 -0
  120. package/contracts/engine-registry/future/EngineRegistryV1.sol +86 -0
  121. package/contracts/explorations/GenArt721CoreV3_Explorations.sol +1989 -0
  122. package/contracts/interfaces/0.5.x/IBonusContract.sol +10 -0
  123. package/contracts/interfaces/0.5.x/IGenArt721CoreContractV1.sol +91 -0
  124. package/contracts/interfaces/0.5.x/IGenArt721CoreV2_PBAB.sol +92 -0
  125. package/contracts/interfaces/0.5.x/IRandomizer.sol +8 -0
  126. package/contracts/interfaces/0.8.x/IAdminACLV0.sol +51 -0
  127. package/contracts/interfaces/0.8.x/IArtblocksRoyaltyOverride.sol +34 -0
  128. package/contracts/interfaces/0.8.x/IBonusContract.sol +10 -0
  129. package/contracts/interfaces/0.8.x/IDelegationRegistry.sol +221 -0
  130. package/contracts/interfaces/0.8.x/IDependencyRegistryCompatibleV0.sol +31 -0
  131. package/contracts/interfaces/0.8.x/IDependencyRegistryV0.sol +95 -0
  132. package/contracts/interfaces/0.8.x/IEngineRegistryV0.sol +38 -0
  133. package/contracts/interfaces/0.8.x/IFilteredMinterDAExpSettlementV0.sol +70 -0
  134. package/contracts/interfaces/0.8.x/IFilteredMinterDAExpV0.sol +35 -0
  135. package/contracts/interfaces/0.8.x/IFilteredMinterDAExpV1.sol +16 -0
  136. package/contracts/interfaces/0.8.x/IFilteredMinterDALinV0.sol +32 -0
  137. package/contracts/interfaces/0.8.x/IFilteredMinterDALinV1.sol +16 -0
  138. package/contracts/interfaces/0.8.x/IFilteredMinterHolderV0.sol +68 -0
  139. package/contracts/interfaces/0.8.x/IFilteredMinterHolderV1.sol +19 -0
  140. package/contracts/interfaces/0.8.x/IFilteredMinterHolderV2.sol +19 -0
  141. package/contracts/interfaces/0.8.x/IFilteredMinterMerkleV0.sol +37 -0
  142. package/contracts/interfaces/0.8.x/IFilteredMinterMerkleV1.sol +19 -0
  143. package/contracts/interfaces/0.8.x/IFilteredMinterMerkleV2.sol +19 -0
  144. package/contracts/interfaces/0.8.x/IFilteredMinterV0.sol +74 -0
  145. package/contracts/interfaces/0.8.x/IFilteredMinterV1.sol +127 -0
  146. package/contracts/interfaces/0.8.x/IFilteredMinterV2.sol +30 -0
  147. package/contracts/interfaces/0.8.x/IGenArt721CoreContractV1.sol +73 -0
  148. package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3.sol +79 -0
  149. package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol +127 -0
  150. package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine.sol +80 -0
  151. package/contracts/interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol +91 -0
  152. package/contracts/interfaces/0.8.x/IManifold.sol +24 -0
  153. package/contracts/interfaces/0.8.x/IMinterFilterV0.sol +47 -0
  154. package/contracts/interfaces/0.8.x/IRandomizer.sol +8 -0
  155. package/contracts/interfaces/0.8.x/IRandomizerV2.sol +15 -0
  156. package/contracts/legacy/GenArt721CoreV1.sol +1593 -0
  157. package/contracts/legacy/GenArt721LegacyMinter.sol +275 -0
  158. package/contracts/libs/0.5.x/CustomERC721Metadata.sol +52 -0
  159. package/contracts/libs/0.5.x/IERC20.sol +96 -0
  160. package/contracts/libs/0.5.x/SafeMath.sol +98 -0
  161. package/contracts/libs/0.5.x/Strings.sol +92 -0
  162. package/contracts/libs/0.8.x/BytecodeStorage.sol +314 -0
  163. package/contracts/libs/0.8.x/Bytes32Strings.sol +66 -0
  164. package/contracts/libs/0.8.x/ERC721_PackedHashSeed.sol +514 -0
  165. package/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol +663 -0
  166. package/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol +6 -0
  167. package/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol +6 -0
  168. package/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol +6 -0
  169. package/contracts/minter-suite/MinterFilter/MinterFilterV0.sol +291 -0
  170. package/contracts/minter-suite/MinterFilter/MinterFilterV1.sol +320 -0
  171. package/contracts/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol +571 -0
  172. package/contracts/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol +622 -0
  173. package/contracts/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +1066 -0
  174. package/contracts/minter-suite/Minters/MinterDALin/MinterDALinV2.sol +527 -0
  175. package/contracts/minter-suite/Minters/MinterDALin/MinterDALinV3.sol +576 -0
  176. package/contracts/minter-suite/Minters/MinterHolder/MinterHolderV2.sol +749 -0
  177. package/contracts/minter-suite/Minters/MinterHolder/MinterHolderV3.sol +798 -0
  178. package/contracts/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol +682 -0
  179. package/contracts/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol +733 -0
  180. package/contracts/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol +350 -0
  181. package/contracts/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol +401 -0
  182. package/contracts/minter-suite/Minters/MinterSetPrice/deprecated/MinterSetPriceV1.sol +274 -0
  183. package/contracts/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol +491 -0
  184. package/contracts/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol +542 -0
  185. package/contracts/minter-suite/Minters/MinterSetPriceERC20/deprecated/MinterSetPriceERC20V0.sol +470 -0
  186. package/contracts/mock/BytecodeTextCR_DMock.sol +184 -0
  187. package/contracts/mock/DeadReceiverMock.sol +13 -0
  188. package/contracts/mock/ERC20Mock.sol +11 -0
  189. package/contracts/mock/MockAdminACLV0.sol +65 -0
  190. package/contracts/mock/RandomizerV2_NoAssignMock.sol +43 -0
  191. package/contracts/mock/ReentrancyHolderMock.sol +50 -0
  192. package/contracts/mock/ReentrancyMerkleMock.sol +64 -0
  193. package/contracts/mock/ReentrancyMock.sol +44 -0
  194. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +168 -0
  195. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +221 -0
  196. package/package.json +83 -0
@@ -0,0 +1,622 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ import "../../../interfaces/0.8.x/IGenArt721CoreContractV3.sol";
5
+ import "../../../interfaces/0.8.x/IMinterFilterV0.sol";
6
+ import "../../../interfaces/0.8.x/IFilteredMinterDAExpV1.sol";
7
+
8
+ import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
9
+ import "@openzeppelin-4.5/contracts/utils/math/SafeCast.sol";
10
+
11
+ pragma solidity 0.8.17;
12
+
13
+ /**
14
+ * @title Filtered Minter contract that allows tokens to be minted with ETH.
15
+ * Pricing is achieved using an automated Dutch-auction mechanism.
16
+ * This is designed to be used with IGenArt721CoreContractV3 contracts.
17
+ * @author Art Blocks Inc.
18
+ * @notice Privileged Roles and Ownership:
19
+ * This contract is designed to be managed, with limited powers.
20
+ * Privileged roles and abilities are controlled by the core contract's Admin
21
+ * ACL contract and a project's artist. Both of these roles hold extensive
22
+ * power and can modify minter details.
23
+ * Care must be taken to ensure that the admin ACL contract and artist
24
+ * addresses are secure behind a multi-sig or other access control mechanism.
25
+ * ----------------------------------------------------------------------------
26
+ * The following functions are restricted to the core contract's Admin ACL
27
+ * contract:
28
+ * - setAllowablePriceDecayHalfLifeRangeSeconds (note: this range is only
29
+ * enforced when creating new auctions)
30
+ * - resetAuctionDetails (note: this will prevent minting until a new auction
31
+ * is created)
32
+ * ----------------------------------------------------------------------------
33
+ * The following functions are restricted to a project's artist:
34
+ * - setAuctionDetails (note: this may only be called when there is no active
35
+ * auction)
36
+ * - setProjectMaxInvocations
37
+ * - manuallyLimitProjectMaxInvocations
38
+ * ----------------------------------------------------------------------------
39
+ * Additional admin and artist privileged roles may be described on other
40
+ * contracts that this minter integrates with.
41
+ *
42
+ * @dev Note that while this minter makes use of `block.timestamp` and it is
43
+ * technically possible that this value is manipulated by block producers, such
44
+ * manipulation will not have material impact on the price values of this minter
45
+ * given the business practices for how pricing is congfigured for this minter
46
+ * and that variations on the order of less than a minute should not
47
+ * meaningfully impact price given the minimum allowable price decay rate that
48
+ * this minter intends to support.
49
+ */
50
+ contract MinterDAExpV3 is ReentrancyGuard, IFilteredMinterDAExpV1 {
51
+ using SafeCast for uint256;
52
+
53
+ /// Core contract address this minter interacts with
54
+ address public immutable genArt721CoreAddress;
55
+
56
+ /// This contract handles cores with interface IV3
57
+ IGenArt721CoreContractV3 private immutable genArtCoreContract;
58
+
59
+ /// Minter filter address this minter interacts with
60
+ address public immutable minterFilterAddress;
61
+
62
+ /// Minter filter this minter may interact with.
63
+ IMinterFilterV0 private immutable minterFilter;
64
+
65
+ /// minterType for this minter
66
+ string public constant minterType = "MinterDAExpV3";
67
+
68
+ uint256 constant ONE_MILLION = 1_000_000;
69
+
70
+ struct ProjectConfig {
71
+ bool maxHasBeenInvoked;
72
+ uint24 maxInvocations;
73
+ // max uint64 ~= 1.8e19 sec ~= 570 billion years
74
+ uint64 timestampStart;
75
+ uint64 priceDecayHalfLifeSeconds;
76
+ uint256 startPrice;
77
+ uint256 basePrice;
78
+ }
79
+
80
+ mapping(uint256 => ProjectConfig) public projectConfig;
81
+
82
+ /// Minimum price decay half life: price must decay with a half life of at
83
+ /// least this amount (must cut in half at least every N seconds).
84
+ uint256 public minimumPriceDecayHalfLifeSeconds = 300; // 5 minutes
85
+ /// Maximum price decay half life: price may decay with a half life of no
86
+ /// more than this amount (may cut in half at no more than every N seconds).
87
+ uint256 public maximumPriceDecayHalfLifeSeconds = 3600; // 60 minutes
88
+
89
+ // modifier to restrict access to only AdminACL allowed calls
90
+ // @dev defers which ACL contract is used to the core contract
91
+ modifier onlyCoreAdminACL(bytes4 _selector) {
92
+ require(
93
+ genArtCoreContract.adminACLAllowed(
94
+ msg.sender,
95
+ address(this),
96
+ _selector
97
+ ),
98
+ "Only Core AdminACL allowed"
99
+ );
100
+ _;
101
+ }
102
+
103
+ modifier onlyArtist(uint256 _projectId) {
104
+ require(
105
+ (msg.sender ==
106
+ genArtCoreContract.projectIdToArtistAddress(_projectId)),
107
+ "Only Artist"
108
+ );
109
+ _;
110
+ }
111
+
112
+ /**
113
+ * @notice Initializes contract to be a Filtered Minter for
114
+ * `_minterFilter`, integrated with Art Blocks core contract
115
+ * at address `_genArt721Address`.
116
+ * @param _genArt721Address Art Blocks core contract address for
117
+ * which this contract will be a minter.
118
+ * @param _minterFilter Minter filter for which
119
+ * this will a filtered minter.
120
+ */
121
+ constructor(
122
+ address _genArt721Address,
123
+ address _minterFilter
124
+ ) ReentrancyGuard() {
125
+ genArt721CoreAddress = _genArt721Address;
126
+ genArtCoreContract = IGenArt721CoreContractV3(_genArt721Address);
127
+ minterFilterAddress = _minterFilter;
128
+ minterFilter = IMinterFilterV0(_minterFilter);
129
+ require(
130
+ minterFilter.genArt721CoreAddress() == _genArt721Address,
131
+ "Illegal contract pairing"
132
+ );
133
+ }
134
+
135
+ /**
136
+ * @notice Syncs local maximum invocations of project `_projectId` based on
137
+ * the value currently defined in the core contract.
138
+ * @param _projectId Project ID to set the maximum invocations for.
139
+ * @dev this enables gas reduction after maxInvocations have been reached -
140
+ * core contracts shall still enforce a maxInvocation check during mint.
141
+ */
142
+ function setProjectMaxInvocations(
143
+ uint256 _projectId
144
+ ) external onlyArtist(_projectId) {
145
+ uint256 maxInvocations;
146
+ uint256 invocations;
147
+ (invocations, maxInvocations, , , , ) = genArtCoreContract
148
+ .projectStateData(_projectId);
149
+
150
+ // update storage with results
151
+ projectConfig[_projectId].maxInvocations = uint24(maxInvocations);
152
+
153
+ // We need to ensure maxHasBeenInvoked is correctly set after manually syncing the
154
+ // local maxInvocations value with the core contract's maxInvocations value.
155
+ // This synced value of maxInvocations from the core contract will always be greater
156
+ // than or equal to the previous value of maxInvocations stored locally.
157
+ projectConfig[_projectId].maxHasBeenInvoked =
158
+ invocations == maxInvocations;
159
+
160
+ emit ProjectMaxInvocationsLimitUpdated(_projectId, maxInvocations);
161
+ }
162
+
163
+ /**
164
+ * @notice Manually sets the local maximum invocations of project `_projectId`
165
+ * with the provided `_maxInvocations`, checking that `_maxInvocations` is less
166
+ * than or equal to the value of project `_project_id`'s maximum invocations that is
167
+ * set on the core contract.
168
+ * @dev Note that a `_maxInvocations` of 0 can only be set if the current `invocations`
169
+ * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
170
+ * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
171
+ * @param _projectId Project ID to set the maximum invocations for.
172
+ * @param _maxInvocations Maximum invocations to set for the project.
173
+ */
174
+ function manuallyLimitProjectMaxInvocations(
175
+ uint256 _projectId,
176
+ uint256 _maxInvocations
177
+ ) external onlyArtist(_projectId) {
178
+ // CHECKS
179
+ // ensure that the manually set maxInvocations is not greater than what is set on the core contract
180
+ uint256 maxInvocations;
181
+ uint256 invocations;
182
+ (invocations, maxInvocations, , , , ) = genArtCoreContract
183
+ .projectStateData(_projectId);
184
+ require(
185
+ _maxInvocations <= maxInvocations,
186
+ "Cannot increase project max invocations above core contract set project max invocations"
187
+ );
188
+ require(
189
+ _maxInvocations >= invocations,
190
+ "Cannot set project max invocations to less than current invocations"
191
+ );
192
+ // EFFECTS
193
+ // update storage with results
194
+ projectConfig[_projectId].maxInvocations = uint24(_maxInvocations);
195
+ // We need to ensure maxHasBeenInvoked is correctly set after manually setting the
196
+ // local maxInvocations value.
197
+ projectConfig[_projectId].maxHasBeenInvoked =
198
+ invocations == _maxInvocations;
199
+
200
+ emit ProjectMaxInvocationsLimitUpdated(_projectId, _maxInvocations);
201
+ }
202
+
203
+ /**
204
+ * @notice Warning: Disabling purchaseTo is not supported on this minter.
205
+ * This method exists purely for interface-conformance purposes.
206
+ */
207
+ function togglePurchaseToDisabled(
208
+ uint256 _projectId
209
+ ) external view onlyArtist(_projectId) {
210
+ revert("Action not supported");
211
+ }
212
+
213
+ /**
214
+ * @notice projectId => has project reached its maximum number of
215
+ * invocations? Note that this returns a local cache of the core contract's
216
+ * state, and may be out of sync with the core contract. This is
217
+ * intentional, as it only enables gas optimization of mints after a
218
+ * project's maximum invocations has been reached. A false negative will
219
+ * only result in a gas cost increase, since the core contract will still
220
+ * enforce a maxInvocation check during minting. A false positive is not
221
+ * possible because the V3 core contract only allows maximum invocations
222
+ * to be reduced, not increased. Based on this rationale, we intentionally
223
+ * do not do input validation in this method as to whether or not the input
224
+ * `_projectId` is an existing project ID.
225
+ *
226
+ */
227
+ function projectMaxHasBeenInvoked(
228
+ uint256 _projectId
229
+ ) external view returns (bool) {
230
+ return projectConfig[_projectId].maxHasBeenInvoked;
231
+ }
232
+
233
+ /**
234
+ * @notice projectId => project's maximum number of invocations.
235
+ * Optionally synced with core contract value, for gas optimization.
236
+ * Note that this returns a local cache of the core contract's
237
+ * state, and may be out of sync with the core contract. This is
238
+ * intentional, as it only enables gas optimization of mints after a
239
+ * project's maximum invocations has been reached.
240
+ * @dev A number greater than the core contract's project max invocations
241
+ * will only result in a gas cost increase, since the core contract will
242
+ * still enforce a maxInvocation check during minting. A number less than
243
+ * the core contract's project max invocations is only possible when the
244
+ * project's max invocations have not been synced on this minter, since the
245
+ * V3 core contract only allows maximum invocations to be reduced, not
246
+ * increased. When this happens, the minter will enable minting, allowing
247
+ * the core contract to enforce the max invocations check. Based on this
248
+ * rationale, we intentionally do not do input validation in this method as
249
+ * to whether or not the input `_projectId` is an existing project ID.
250
+ */
251
+ function projectMaxInvocations(
252
+ uint256 _projectId
253
+ ) external view returns (uint256) {
254
+ return uint256(projectConfig[_projectId].maxInvocations);
255
+ }
256
+
257
+ /**
258
+ * @notice projectId => auction parameters
259
+ */
260
+ function projectAuctionParameters(
261
+ uint256 _projectId
262
+ )
263
+ external
264
+ view
265
+ returns (
266
+ uint256 timestampStart,
267
+ uint256 priceDecayHalfLifeSeconds,
268
+ uint256 startPrice,
269
+ uint256 basePrice
270
+ )
271
+ {
272
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
273
+ return (
274
+ _projectConfig.timestampStart,
275
+ _projectConfig.priceDecayHalfLifeSeconds,
276
+ _projectConfig.startPrice,
277
+ _projectConfig.basePrice
278
+ );
279
+ }
280
+
281
+ /**
282
+ * @notice Sets the minimum and maximum values that are settable for
283
+ * `_priceDecayHalfLifeSeconds` across all projects.
284
+ * @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
285
+ * (in seconds).
286
+ * @param _maximumPriceDecayHalfLifeSeconds Maximum price decay half life
287
+ * (in seconds).
288
+ */
289
+ function setAllowablePriceDecayHalfLifeRangeSeconds(
290
+ uint256 _minimumPriceDecayHalfLifeSeconds,
291
+ uint256 _maximumPriceDecayHalfLifeSeconds
292
+ )
293
+ external
294
+ onlyCoreAdminACL(
295
+ this.setAllowablePriceDecayHalfLifeRangeSeconds.selector
296
+ )
297
+ {
298
+ require(
299
+ _maximumPriceDecayHalfLifeSeconds >
300
+ _minimumPriceDecayHalfLifeSeconds,
301
+ "Maximum half life must be greater than minimum"
302
+ );
303
+ require(
304
+ _minimumPriceDecayHalfLifeSeconds > 0,
305
+ "Half life of zero not allowed"
306
+ );
307
+ minimumPriceDecayHalfLifeSeconds = _minimumPriceDecayHalfLifeSeconds;
308
+ maximumPriceDecayHalfLifeSeconds = _maximumPriceDecayHalfLifeSeconds;
309
+ emit AuctionHalfLifeRangeSecondsUpdated(
310
+ _minimumPriceDecayHalfLifeSeconds,
311
+ _maximumPriceDecayHalfLifeSeconds
312
+ );
313
+ }
314
+
315
+ ////// Auction Functions
316
+ /**
317
+ * @notice Sets auction details for project `_projectId`.
318
+ * @param _projectId Project ID to set auction details for.
319
+ * @param _auctionTimestampStart Timestamp at which to start the auction.
320
+ * @param _priceDecayHalfLifeSeconds The half life with which to decay the
321
+ * price (in seconds).
322
+ * @param _startPrice Price at which to start the auction, in Wei.
323
+ * @param _basePrice Resting price of the auction, in Wei.
324
+ * @dev Note that it is intentionally supported here that the configured
325
+ * price may be explicitly set to `0`.
326
+ */
327
+ function setAuctionDetails(
328
+ uint256 _projectId,
329
+ uint256 _auctionTimestampStart,
330
+ uint256 _priceDecayHalfLifeSeconds,
331
+ uint256 _startPrice,
332
+ uint256 _basePrice
333
+ ) external onlyArtist(_projectId) {
334
+ // CHECKS
335
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
336
+ require(
337
+ _projectConfig.timestampStart == 0 ||
338
+ block.timestamp < _projectConfig.timestampStart,
339
+ "No modifications mid-auction"
340
+ );
341
+ require(
342
+ block.timestamp < _auctionTimestampStart,
343
+ "Only future auctions"
344
+ );
345
+ require(
346
+ _startPrice > _basePrice,
347
+ "Auction start price must be greater than auction end price"
348
+ );
349
+ require(
350
+ (_priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds) &&
351
+ (_priceDecayHalfLifeSeconds <=
352
+ maximumPriceDecayHalfLifeSeconds),
353
+ "Price decay half life must fall between min and max allowable values"
354
+ );
355
+ // EFFECTS
356
+ _projectConfig.timestampStart = _auctionTimestampStart.toUint64();
357
+ _projectConfig.priceDecayHalfLifeSeconds = _priceDecayHalfLifeSeconds
358
+ .toUint64();
359
+ _projectConfig.startPrice = _startPrice;
360
+ _projectConfig.basePrice = _basePrice;
361
+
362
+ emit SetAuctionDetails(
363
+ _projectId,
364
+ _auctionTimestampStart,
365
+ _priceDecayHalfLifeSeconds,
366
+ _startPrice,
367
+ _basePrice
368
+ );
369
+ }
370
+
371
+ /**
372
+ * @notice Resets auction details for project `_projectId`, zero-ing out all
373
+ * relevant auction fields. Not intended to be used in normal auction
374
+ * operation, but rather only in case of the need to halt an auction.
375
+ * @param _projectId Project ID to set auction details for.
376
+ */
377
+ function resetAuctionDetails(
378
+ uint256 _projectId
379
+ ) external onlyCoreAdminACL(this.resetAuctionDetails.selector) {
380
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
381
+ // reset to initial values
382
+ _projectConfig.timestampStart = 0;
383
+ _projectConfig.priceDecayHalfLifeSeconds = 0;
384
+ _projectConfig.startPrice = 0;
385
+ _projectConfig.basePrice = 0;
386
+
387
+ emit ResetAuctionDetails(_projectId);
388
+ }
389
+
390
+ /**
391
+ * @notice Purchases a token from project `_projectId`.
392
+ * @param _projectId Project ID to mint a token on.
393
+ * @return tokenId Token ID of minted token
394
+ */
395
+ function purchase(
396
+ uint256 _projectId
397
+ ) external payable returns (uint256 tokenId) {
398
+ tokenId = purchaseTo_do6(msg.sender, _projectId);
399
+ return tokenId;
400
+ }
401
+
402
+ /**
403
+ * @notice gas-optimized version of purchase(uint256).
404
+ */
405
+ function purchase_H4M(
406
+ uint256 _projectId
407
+ ) external payable returns (uint256 tokenId) {
408
+ tokenId = purchaseTo_do6(msg.sender, _projectId);
409
+ return tokenId;
410
+ }
411
+
412
+ /**
413
+ * @notice Purchases a token from project `_projectId` and sets
414
+ * the token's owner to `_to`.
415
+ * @param _to Address to be the new token's owner.
416
+ * @param _projectId Project ID to mint a token on.
417
+ * @return tokenId Token ID of minted token
418
+ */
419
+ function purchaseTo(
420
+ address _to,
421
+ uint256 _projectId
422
+ ) external payable returns (uint256 tokenId) {
423
+ return purchaseTo_do6(_to, _projectId);
424
+ }
425
+
426
+ /**
427
+ * @notice gas-optimized version of purchaseTo(address, uint256).
428
+ */
429
+ function purchaseTo_do6(
430
+ address _to,
431
+ uint256 _projectId
432
+ ) public payable nonReentrant returns (uint256 tokenId) {
433
+ // CHECKS
434
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
435
+
436
+ // Note that `maxHasBeenInvoked` is only checked here to reduce gas
437
+ // consumption after a project has been fully minted.
438
+ // `_projectConfig.maxHasBeenInvoked` is locally cached to reduce
439
+ // gas consumption, but if not in sync with the core contract's value,
440
+ // the core contract also enforces its own max invocation check during
441
+ // minting.
442
+ require(
443
+ !_projectConfig.maxHasBeenInvoked,
444
+ "Maximum number of invocations reached"
445
+ );
446
+
447
+ // _getPrice reverts if auction is unconfigured or has not started
448
+ uint256 currentPriceInWei = _getPrice(_projectId);
449
+ require(
450
+ msg.value >= currentPriceInWei,
451
+ "Must send minimum value to mint!"
452
+ );
453
+
454
+ // EFFECTS
455
+ tokenId = minterFilter.mint(_to, _projectId, msg.sender);
456
+
457
+ // okay if this underflows because if statement will always eval false.
458
+ // this is only for gas optimization (core enforces maxInvocations).
459
+ unchecked {
460
+ if (tokenId % ONE_MILLION == _projectConfig.maxInvocations - 1) {
461
+ _projectConfig.maxHasBeenInvoked = true;
462
+ }
463
+ }
464
+
465
+ // INTERACTIONS
466
+ _splitFundsETHAuction(_projectId, currentPriceInWei);
467
+ return tokenId;
468
+ }
469
+
470
+ /**
471
+ * @dev splits ETH funds between sender (if refund), foundation,
472
+ * artist, and artist's additional payee for a token purchased on
473
+ * project `_projectId`.
474
+ * @dev possible DoS during splits is acknowledged, and mitigated by
475
+ * business practices, including end-to-end testing on mainnet, and
476
+ * admin-accepted artist payment addresses.
477
+ * @param _projectId Project ID for which funds shall be split.
478
+ * @param _currentPriceInWei Current price of token, in Wei.
479
+ */
480
+ function _splitFundsETHAuction(
481
+ uint256 _projectId,
482
+ uint256 _currentPriceInWei
483
+ ) internal {
484
+ if (msg.value > 0) {
485
+ bool success_;
486
+ // send refund to sender
487
+ uint256 refund = msg.value - _currentPriceInWei;
488
+ if (refund > 0) {
489
+ (success_, ) = msg.sender.call{value: refund}("");
490
+ require(success_, "Refund failed");
491
+ }
492
+ // split remaining funds between foundation, artist, and artist's
493
+ // additional payee
494
+ (
495
+ uint256 artblocksRevenue_,
496
+ address payable artblocksAddress_,
497
+ uint256 artistRevenue_,
498
+ address payable artistAddress_,
499
+ uint256 additionalPayeePrimaryRevenue_,
500
+ address payable additionalPayeePrimaryAddress_
501
+ ) = genArtCoreContract.getPrimaryRevenueSplits(
502
+ _projectId,
503
+ _currentPriceInWei
504
+ );
505
+ // Art Blocks payment
506
+ if (artblocksRevenue_ > 0) {
507
+ (success_, ) = artblocksAddress_.call{value: artblocksRevenue_}(
508
+ ""
509
+ );
510
+ require(success_, "Art Blocks payment failed");
511
+ }
512
+ // artist payment
513
+ if (artistRevenue_ > 0) {
514
+ (success_, ) = artistAddress_.call{value: artistRevenue_}("");
515
+ require(success_, "Artist payment failed");
516
+ }
517
+ // additional payee payment
518
+ if (additionalPayeePrimaryRevenue_ > 0) {
519
+ (success_, ) = additionalPayeePrimaryAddress_.call{
520
+ value: additionalPayeePrimaryRevenue_
521
+ }("");
522
+ require(success_, "Additional Payee payment failed");
523
+ }
524
+ }
525
+ }
526
+
527
+ /**
528
+ * @notice Gets price of minting a token on project `_projectId` given
529
+ * the project's AuctionParameters and current block timestamp.
530
+ * Reverts if auction has not yet started or auction is unconfigured.
531
+ * @param _projectId Project ID to get price of token for.
532
+ * @return current price of token in Wei
533
+ * @dev This method calculates price decay using a linear interpolation
534
+ * of exponential decay based on the artist-provided half-life for price
535
+ * decay, `_priceDecayHalfLifeSeconds`.
536
+ */
537
+ function _getPrice(uint256 _projectId) private view returns (uint256) {
538
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
539
+ // move parameters to memory if used more than once
540
+ uint256 _timestampStart = uint256(_projectConfig.timestampStart);
541
+ uint256 _priceDecayHalfLifeSeconds = uint256(
542
+ _projectConfig.priceDecayHalfLifeSeconds
543
+ );
544
+ uint256 _basePrice = _projectConfig.basePrice;
545
+
546
+ require(block.timestamp > _timestampStart, "Auction not yet started");
547
+ require(_priceDecayHalfLifeSeconds > 0, "Only configured auctions");
548
+ uint256 decayedPrice = _projectConfig.startPrice;
549
+ uint256 elapsedTimeSeconds;
550
+ unchecked {
551
+ // already checked that block.timestamp > _timestampStart above
552
+ elapsedTimeSeconds = block.timestamp - _timestampStart;
553
+ }
554
+ // Divide by two (via bit-shifting) for the number of entirely completed
555
+ // half-lives that have elapsed since auction start time.
556
+ unchecked {
557
+ // already required _priceDecayHalfLifeSeconds > 0
558
+ decayedPrice >>= elapsedTimeSeconds / _priceDecayHalfLifeSeconds;
559
+ }
560
+ // Perform a linear interpolation between partial half-life points, to
561
+ // approximate the current place on a perfect exponential decay curve.
562
+ unchecked {
563
+ // value of expression is provably always less than decayedPrice,
564
+ // so no underflow is possible when the subtraction assignment
565
+ // operator is used on decayedPrice.
566
+ decayedPrice -=
567
+ (decayedPrice *
568
+ (elapsedTimeSeconds % _priceDecayHalfLifeSeconds)) /
569
+ _priceDecayHalfLifeSeconds /
570
+ 2;
571
+ }
572
+ if (decayedPrice < _basePrice) {
573
+ // Price may not decay below stay `basePrice`.
574
+ return _basePrice;
575
+ }
576
+ return decayedPrice;
577
+ }
578
+
579
+ /**
580
+ * @notice Gets if price of token is configured, price of minting a
581
+ * token on project `_projectId`, and currency symbol and address to be
582
+ * used as payment. Supersedes any core contract price information.
583
+ * @param _projectId Project ID to get price information for.
584
+ * @return isConfigured true only if project's auction parameters have been
585
+ * configured on this minter
586
+ * @return tokenPriceInWei current price of token on this minter - invalid
587
+ * if auction has not yet been configured
588
+ * @return currencySymbol currency symbol for purchases of project on this
589
+ * minter. This minter always returns "ETH"
590
+ * @return currencyAddress currency address for purchases of project on
591
+ * this minter. This minter always returns null address, reserved for ether
592
+ */
593
+ function getPriceInfo(
594
+ uint256 _projectId
595
+ )
596
+ external
597
+ view
598
+ returns (
599
+ bool isConfigured,
600
+ uint256 tokenPriceInWei,
601
+ string memory currencySymbol,
602
+ address currencyAddress
603
+ )
604
+ {
605
+ ProjectConfig storage _projectConfig = projectConfig[_projectId];
606
+
607
+ isConfigured = (_projectConfig.startPrice > 0);
608
+ if (block.timestamp <= _projectConfig.timestampStart) {
609
+ // Provide a reasonable value for `tokenPriceInWei` when it would
610
+ // otherwise revert, using the starting price before auction starts.
611
+ tokenPriceInWei = _projectConfig.startPrice;
612
+ } else if (_projectConfig.startPrice == 0) {
613
+ // In the case of unconfigured auction, return price of zero when
614
+ // it would otherwise revert
615
+ tokenPriceInWei = 0;
616
+ } else {
617
+ tokenPriceInWei = _getPrice(_projectId);
618
+ }
619
+ currencySymbol = "ETH";
620
+ currencyAddress = address(0);
621
+ }
622
+ }