@artblocks/contracts 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +2 -2
  2. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  3. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +97 -10
  4. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +4 -4
  5. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +4 -9
  6. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +4 -9
  7. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +4 -9
  8. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +4 -9
  9. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
  10. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +4 -4
  11. package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +6 -6
  12. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +19 -0
  13. package/artifacts/contracts/interfaces/v0.8.x/IMinterFilterV1.sol/IMinterFilterV1.json +22 -22
  14. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +8 -101
  15. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +1 -57
  16. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +1 -57
  17. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +2 -21
  18. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
  19. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +15 -90
  20. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +10 -36
  21. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +4 -236
  22. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +5 -5
  23. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +7 -423
  24. package/artifacts/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +17 -17
  25. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
  26. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  27. package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
  28. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +60 -3
  29. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +30 -0
  30. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +60 -3
  31. package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +346 -0
  32. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +29 -3
  33. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +30 -3
  34. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  35. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +254 -3
  36. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +48 -3
  37. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +41 -3
  38. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +35 -3
  39. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +79 -3
  40. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  41. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +41 -41
  42. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +66 -632
  43. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -20
  44. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +67 -594
  45. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +33 -524
  46. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +66 -632
  47. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +33 -524
  48. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +51 -717
  49. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +58 -454
  50. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +61 -552
  51. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +55 -497
  52. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +110 -571
  53. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +69 -560
  54. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +28 -444
  55. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  56. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +4 -9
  57. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  58. package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +136 -0
  59. package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +105 -0
  60. package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +100 -0
  61. package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +69 -0
  62. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +19 -19
  63. package/contracts/DependencyRegistryV0.sol +84 -16
  64. package/contracts/archive/readme.md +16 -0
  65. package/contracts/engine/README.md +21 -0
  66. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +4 -10
  67. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +4 -10
  68. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +4 -10
  69. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +4 -10
  70. package/contracts/engine-registry/CoreRegistryV1.sol +58 -65
  71. package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +6 -8
  72. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +3 -0
  73. package/contracts/interfaces/v0.8.x/IMinterFilterV1.sol +25 -25
  74. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +11 -20
  75. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +1 -14
  76. package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +1 -15
  77. package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +2 -8
  78. package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
  79. package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +15 -43
  80. package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +10 -20
  81. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +4 -67
  82. package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +5 -5
  83. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +7 -155
  84. package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +37 -37
  85. package/contracts/libs/v0.8.x/ABHelpers.sol +14 -14
  86. package/contracts/libs/v0.8.x/AuthLib.sol +101 -102
  87. package/contracts/libs/v0.8.x/Bytes32Strings.sol +5 -5
  88. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +163 -38
  89. package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
  90. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +144 -37
  91. package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
  92. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +250 -110
  93. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +257 -48
  94. package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +138 -58
  95. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +778 -103
  96. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +135 -13
  97. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +567 -187
  98. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +480 -322
  99. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +214 -76
  100. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +347 -304
  101. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +391 -491
  102. package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +1 -54
  103. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +388 -628
  104. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +212 -273
  105. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +393 -488
  106. package/contracts/minter-suite/Minters/MinterDALinV5.sol +220 -277
  107. package/contracts/minter-suite/Minters/MinterSEAV1.sol +327 -664
  108. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +278 -303
  109. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +355 -446
  110. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +328 -416
  111. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +538 -622
  112. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +429 -553
  113. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +180 -227
  114. package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +3 -10
  115. package/contracts/mock/ReentrancyHolderMockShared.sol +59 -0
  116. package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
  117. package/contracts/mock/ReentrancyMockShared.sol +48 -0
  118. package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
  119. package/contracts/randomizer/shared/SharedRandomizerV0.sol +78 -70
  120. package/package.json +39 -33
@@ -1,25 +1,27 @@
1
1
  // SPDX-License-Identifier: LGPL-3.0-only
2
2
  // Created By: Art Blocks Inc.
3
3
 
4
- import "../../interfaces/v0.8.x/IDelegationRegistry.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/ISharedMinterHolderV0.sol";
9
- import "../../interfaces/v0.8.x/IMinterFilterV1.sol";
10
-
11
- import "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
12
- import "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
13
- import "../../libs/v0.8.x/minter-libs/TokenHolderLib.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
- import "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
20
-
4
+ // @dev fixed to specific solidity version for clarity and for more clear
5
+ // source code verification purposes.
21
6
  pragma solidity 0.8.19;
22
7
 
8
+ import {IDelegationRegistry} from "../../interfaces/v0.8.x/IDelegationRegistry.sol";
9
+ import {ISharedMinterV0} from "../../interfaces/v0.8.x/ISharedMinterV0.sol";
10
+ import {ISharedMinterDAV0} from "../../interfaces/v0.8.x/ISharedMinterDAV0.sol";
11
+ import {ISharedMinterDAExpV0} from "../../interfaces/v0.8.x/ISharedMinterDAExpV0.sol";
12
+ import {ISharedMinterHolderV0} from "../../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
13
+ import {IMinterFilterV1} from "../../interfaces/v0.8.x/IMinterFilterV1.sol";
14
+
15
+ import {SplitFundsLib} from "../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
16
+ import {MaxInvocationsLib} from "../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
17
+ import {TokenHolderLib} from "../../libs/v0.8.x/minter-libs/TokenHolderLib.sol";
18
+ import {DAExpLib} from "../../libs/v0.8.x/minter-libs/DAExpLib.sol";
19
+ import {AuthLib} from "../../libs/v0.8.x/AuthLib.sol";
20
+
21
+ import {SafeCast} from "@openzeppelin-4.7/contracts/utils/math/SafeCast.sol";
22
+ import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
23
+ import {EnumerableSet} from "@openzeppelin-4.5/contracts/utils/structs/EnumerableSet.sol";
24
+
23
25
  /**
24
26
  * @title Shared, filtered Minter contract that allows tokens to be minted with
25
27
  * ETH when purchaser owns an allowlisted ERC-721 NFT. This contract does NOT
@@ -72,6 +74,13 @@ pragma solidity 0.8.19;
72
74
  * delegation types include token-level, contract-level (via genArt721CoreAddress), or
73
75
  * wallet-level delegation. Contract-level delegations must be configured for the core
74
76
  * token contract as returned by the public immutable variable `genArt721CoreAddress`.
77
+ * ----------------------------------------------------------------------------
78
+ * @notice Caution: While Engine projects must be registered on the Art Blocks
79
+ * Core Registry to assign this minter, this minter does not enforce that a
80
+ * project is registered when configured or queried. This is primarily for gas
81
+ * optimization purposes. It is, therefore, possible that fake projects may be
82
+ * configured on this minter, but they will not be able to mint tokens due to
83
+ * checks performed by this minter's Minter Filter.
75
84
  *
76
85
  * @dev Note that while this minter makes use of `block.timestamp` and it is
77
86
  * technically possible that this value is manipulated by block producers, such
@@ -96,13 +105,13 @@ contract MinterDAExpHolderV5 is
96
105
  address public immutable minterFilterAddress;
97
106
 
98
107
  /// Minter filter this minter may interact with.
99
- IMinterFilterV1 private immutable minterFilter;
108
+ IMinterFilterV1 private immutable _minterFilter;
100
109
 
101
110
  // Delegation registry address
102
111
  address public immutable delegationRegistryAddress;
103
112
 
104
113
  // Delegation registry address
105
- IDelegationRegistry private immutable delegationRegistryContract;
114
+ IDelegationRegistry private immutable _delegationRegistryContract;
106
115
 
107
116
  /// minterType for this minter
108
117
  string public constant minterType = "MinterDAExpHolderV5";
@@ -114,274 +123,187 @@ contract MinterDAExpHolderV5 is
114
123
  /// least this amount (must cut in half at least every N seconds).
115
124
  uint256 public minimumPriceDecayHalfLifeSeconds = 45; // 45 seconds
116
125
 
117
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
118
- // STATE VARIABLES FOR SplitFundsLib begin here
119
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
120
-
121
- // contractAddress => IsEngineCache
122
- mapping(address => SplitFundsLib.IsEngineCache) private _isEngineCaches;
123
-
124
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
125
- // STATE VARIABLES FOR SplitFundsLib end here
126
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
127
-
128
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
129
- // STATE VARIABLES FOR DAExpLib begin here
130
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
131
-
132
- mapping(address => mapping(uint256 => DAExpLib.DAProjectConfig))
133
- private _auctionProjectConfigMapping;
134
-
135
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
136
- // STATE VARIABLES FOR DAExpLib end here
137
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
138
-
139
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
140
- // STATE VARIABLES FOR MaxInvocationsLib begin here
141
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
142
-
143
- // contractAddress => projectId => max invocations specific project config
144
- mapping(address => mapping(uint256 => MaxInvocationsLib.MaxInvocationsProjectConfig))
145
- private _maxInvocationsProjectConfigMapping;
146
-
147
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
148
- // STATE VARIABLES FOR MaxInvocationsLib end here
149
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
150
-
151
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
152
- // STATE VARIABLES FOR TokenHolderLib begin here
153
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
154
-
155
- /**
156
- * coreContract => projectId => ownedNFTAddress => ownedNFTProjectIds => bool
157
- * projects whose holders are allowed to purchase a token on `projectId`
158
- */
159
- mapping(address => mapping(uint256 => TokenHolderLib.HolderProjectConfig))
160
- private _allowedProjectHoldersMapping;
161
-
162
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
163
- // STATE VARIABLES FOR TokenHolderLib end here
164
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////
165
-
166
126
  /**
167
127
  * @notice Initializes contract to be a Filtered Minter for
168
- * `_minterFilter` minter filter.
169
- * @param _minterFilter Minter filter for which this will be a
128
+ * `minterFilter` minter filter.
129
+ * @param minterFilter Minter filter for which this will be a
170
130
  * filtered minter.
171
131
  */
172
132
  constructor(
173
- address _minterFilter,
174
- address _delegationRegistryAddress
133
+ address minterFilter,
134
+ address delegationRegistryAddress_
175
135
  ) ReentrancyGuard() {
176
- minterFilterAddress = _minterFilter;
177
- minterFilter = IMinterFilterV1(_minterFilter);
136
+ minterFilterAddress = minterFilter;
137
+ _minterFilter = IMinterFilterV1(minterFilter);
178
138
 
179
- delegationRegistryAddress = _delegationRegistryAddress;
180
- delegationRegistryContract = IDelegationRegistry(
181
- _delegationRegistryAddress
139
+ delegationRegistryAddress = delegationRegistryAddress_;
140
+ _delegationRegistryContract = IDelegationRegistry(
141
+ delegationRegistryAddress_
142
+ );
143
+ emit TokenHolderLib.DelegationRegistryUpdated(
144
+ delegationRegistryAddress_
145
+ );
146
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
147
+ minimumPriceDecayHalfLifeSeconds
182
148
  );
183
- emit DelegationRegistryUpdated(_delegationRegistryAddress);
184
- emit AuctionMinHalfLifeSecondsUpdated(minimumPriceDecayHalfLifeSeconds);
185
149
  }
186
150
 
187
151
  /**
188
- * @notice Manually sets the local maximum invocations of project `_projectId`
189
- * with the provided `_maxInvocations`, checking that `_maxInvocations` is less
190
- * than or equal to the value of project `_project_id`'s maximum invocations that is
152
+ * @notice Manually sets the local maximum invocations of project `projectId`
153
+ * with the provided `maxInvocations`, checking that `maxInvocations` is less
154
+ * than or equal to the value of project `project_id`'s maximum invocations that is
191
155
  * set on the core contract.
192
- * @dev Note that a `_maxInvocations` of 0 can only be set if the current `invocations`
156
+ * @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
193
157
  * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
194
158
  * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
195
- * @param _projectId Project ID to set the maximum invocations for.
196
- * @param _coreContract Core contract address for the given project.
197
- * @param _maxInvocations Maximum invocations to set for the project.
159
+ * @param projectId Project ID to set the maximum invocations for.
160
+ * @param coreContract Core contract address for the given project.
161
+ * @param maxInvocations Maximum invocations to set for the project.
198
162
  */
199
163
  function manuallyLimitProjectMaxInvocations(
200
- uint256 _projectId,
201
- address _coreContract,
202
- uint24 _maxInvocations
164
+ uint256 projectId,
165
+ address coreContract,
166
+ uint24 maxInvocations
203
167
  ) external {
204
168
  AuthLib.onlyArtist({
205
- _projectId: _projectId,
206
- _coreContract: _coreContract,
207
- _sender: msg.sender
169
+ projectId: projectId,
170
+ coreContract: coreContract,
171
+ sender: msg.sender
208
172
  });
209
173
  MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
210
- _projectId: _projectId,
211
- _coreContract: _coreContract,
212
- _maxInvocations: _maxInvocations,
213
- maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
214
- _coreContract
215
- ][_projectId]
174
+ projectId: projectId,
175
+ coreContract: coreContract,
176
+ maxInvocations: maxInvocations
216
177
  });
217
-
218
- emit ProjectMaxInvocationsLimitUpdated(
219
- _projectId,
220
- _coreContract,
221
- _maxInvocations
222
- );
223
178
  }
224
179
 
225
180
  /**
226
- * @notice Allows holders of NFTs at addresses `_ownedNFTAddresses`,
227
- * project IDs `_ownedNFTProjectIds` to mint on project `_projectId`.
228
- * `_ownedNFTAddresses` assumed to be aligned with `_ownedNFTProjectIds`.
229
- * e.g. Allows holders of project `_ownedNFTProjectIds[0]` on token
230
- * contract `_ownedNFTAddresses[0]` to mint `_projectId`.
181
+ * @notice Allows holders of NFTs at addresses `ownedNFTAddresses`,
182
+ * project IDs `ownedNFTProjectIds` to mint on project `projectId`.
183
+ * `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
184
+ * e.g. Allows holders of project `ownedNFTProjectIds[0]` on token
185
+ * contract `ownedNFTAddresses[0]` to mint `projectId`.
231
186
  * WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
232
187
  * due to assumptions about tokenId and projectId relationships.
233
- * @param _projectId Project ID to enable minting on.
234
- * @param _coreContract Core contract address for the given project.
235
- * @param _ownedNFTAddresses NFT core addresses of projects to be
236
- * allowlisted. Indexes must align with `_ownedNFTProjectIds`.
237
- * @param _ownedNFTProjectIds Project IDs on `_ownedNFTAddresses` whose
238
- * holders shall be allowlisted to mint project `_projectId`. Indexes must
239
- * align with `_ownedNFTAddresses`.
188
+ * @param projectId Project ID to enable minting on.
189
+ * @param coreContract Core contract address for the given project.
190
+ * @param ownedNFTAddresses NFT core addresses of projects to be
191
+ * allowlisted. Indexes must align with `ownedNFTProjectIds`.
192
+ * @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
193
+ * holders shall be allowlisted to mint project `projectId`. Indexes must
194
+ * align with `ownedNFTAddresses`.
240
195
  */
241
196
  function allowHoldersOfProjects(
242
- uint256 _projectId,
243
- address _coreContract,
244
- address[] memory _ownedNFTAddresses,
245
- uint256[] memory _ownedNFTProjectIds
197
+ uint256 projectId,
198
+ address coreContract,
199
+ address[] calldata ownedNFTAddresses,
200
+ uint256[] calldata ownedNFTProjectIds
246
201
  ) external {
247
202
  AuthLib.onlyArtist({
248
- _projectId: _projectId,
249
- _coreContract: _coreContract,
250
- _sender: msg.sender
203
+ projectId: projectId,
204
+ coreContract: coreContract,
205
+ sender: msg.sender
251
206
  });
252
207
  TokenHolderLib.allowHoldersOfProjects({
253
- holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
254
- _projectId
255
- ],
256
- _ownedNFTAddresses: _ownedNFTAddresses,
257
- _ownedNFTProjectIds: _ownedNFTProjectIds
208
+ projectId: projectId,
209
+ coreContract: coreContract,
210
+ ownedNFTAddresses: ownedNFTAddresses,
211
+ ownedNFTProjectIds: ownedNFTProjectIds
258
212
  });
259
-
260
- // emit approve event
261
- emit AllowedHoldersOfProjects(
262
- _projectId,
263
- _coreContract,
264
- _ownedNFTAddresses,
265
- _ownedNFTProjectIds
266
- );
267
213
  }
268
214
 
269
215
  /**
270
- * @notice Removes holders of NFTs at addresses `_ownedNFTAddresses`,
271
- * project IDs `_ownedNFTProjectIds` to mint on project `_projectId`. If
216
+ * @notice Removes holders of NFTs at addresses `ownedNFTAddresses`,
217
+ * project IDs `ownedNFTProjectIds` to mint on project `projectId`. If
272
218
  * other projects owned by a holder are still allowed to mint, holder will
273
219
  * maintain ability to purchase.
274
- * `_ownedNFTAddresses` assumed to be aligned with `_ownedNFTProjectIds`.
275
- * e.g. Removes holders of project `_ownedNFTProjectIds[0]` on token
276
- * contract `_ownedNFTAddresses[0]` from mint allowlist of `_projectId`.
277
- * @param _projectId Project ID to enable minting on.
278
- * @param _coreContract Core contract address for the given project.
279
- * @param _ownedNFTAddresses NFT core addresses of projects to be removed
280
- * from allowlist. Indexes must align with `_ownedNFTProjectIds`.
281
- * @param _ownedNFTProjectIds Project IDs on `_ownedNFTAddresses` whose
282
- * holders will be removed from allowlist to mint project `_projectId`.
283
- * Indexes must align with `_ownedNFTAddresses`.
220
+ * `ownedNFTAddresses` assumed to be aligned with `ownedNFTProjectIds`.
221
+ * e.g. Removes holders of project `ownedNFTProjectIds[0]` on token
222
+ * contract `ownedNFTAddresses[0]` from mint allowlist of `projectId`.
223
+ * @param projectId Project ID to enable minting on.
224
+ * @param coreContract Core contract address for the given project.
225
+ * @param ownedNFTAddresses NFT core addresses of projects to be removed
226
+ * from allowlist. Indexes must align with `ownedNFTProjectIds`.
227
+ * @param ownedNFTProjectIds Project IDs on `ownedNFTAddresses` whose
228
+ * holders will be removed from allowlist to mint project `projectId`.
229
+ * Indexes must align with `ownedNFTAddresses`.
284
230
  */
285
231
  function removeHoldersOfProjects(
286
- uint256 _projectId,
287
- address _coreContract,
288
- address[] memory _ownedNFTAddresses,
289
- uint256[] memory _ownedNFTProjectIds
232
+ uint256 projectId,
233
+ address coreContract,
234
+ address[] calldata ownedNFTAddresses,
235
+ uint256[] calldata ownedNFTProjectIds
290
236
  ) external {
291
237
  AuthLib.onlyArtist({
292
- _projectId: _projectId,
293
- _coreContract: _coreContract,
294
- _sender: msg.sender
238
+ projectId: projectId,
239
+ coreContract: coreContract,
240
+ sender: msg.sender
295
241
  });
296
242
  // require same length arrays
297
243
  TokenHolderLib.removeHoldersOfProjects({
298
- holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
299
- _projectId
300
- ],
301
- _ownedNFTAddresses: _ownedNFTAddresses,
302
- _ownedNFTProjectIds: _ownedNFTProjectIds
244
+ projectId: projectId,
245
+ coreContract: coreContract,
246
+ ownedNFTAddresses: ownedNFTAddresses,
247
+ ownedNFTProjectIds: ownedNFTProjectIds
303
248
  });
304
-
305
- // emit removed event
306
- emit RemovedHoldersOfProjects(
307
- _projectId,
308
- _coreContract,
309
- _ownedNFTAddresses,
310
- _ownedNFTProjectIds
311
- );
312
249
  }
313
250
 
314
251
  /**
315
- * @notice Allows holders of NFTs at addresses `_ownedNFTAddressesAdd`,
316
- * project IDs `_ownedNFTProjectIdsAdd` to mint on project `_projectId`.
317
- * Also removes holders of NFTs at addresses `_ownedNFTAddressesRemove`,
318
- * project IDs `_ownedNFTProjectIdsRemove` from minting on project
319
- * `_projectId`.
320
- * `_ownedNFTAddressesAdd` assumed to be aligned with
321
- * `_ownedNFTProjectIdsAdd`.
322
- * e.g. Allows holders of project `_ownedNFTProjectIdsAdd[0]` on token
323
- * contract `_ownedNFTAddressesAdd[0]` to mint `_projectId`.
324
- * `_ownedNFTAddressesRemove` also assumed to be aligned with
325
- * `_ownedNFTProjectIdsRemove`.
252
+ * @notice Allows holders of NFTs at addresses `ownedNFTAddressesAdd`,
253
+ * project IDs `ownedNFTProjectIdsAdd` to mint on project `projectId`.
254
+ * Also removes holders of NFTs at addresses `ownedNFTAddressesRemove`,
255
+ * project IDs `ownedNFTProjectIdsRemove` from minting on project
256
+ * `projectId`.
257
+ * `ownedNFTAddressesAdd` assumed to be aligned with
258
+ * `ownedNFTProjectIdsAdd`.
259
+ * e.g. Allows holders of project `ownedNFTProjectIdsAdd[0]` on token
260
+ * contract `ownedNFTAddressesAdd[0]` to mint `projectId`.
261
+ * `ownedNFTAddressesRemove` also assumed to be aligned with
262
+ * `ownedNFTProjectIdsRemove`.
326
263
  * WARNING: Only Art Blocks Core contracts are compatible with holder allowlisting,
327
264
  * due to assumptions about tokenId and projectId relationships.
328
- * @param _projectId Project ID to enable minting on.
329
- * @param _coreContract Core contract address for the given project.
330
- * @param _ownedNFTAddressesAdd NFT core addresses of projects to be
331
- * allowlisted. Indexes must align with `_ownedNFTProjectIdsAdd`.
332
- * @param _ownedNFTProjectIdsAdd Project IDs on `_ownedNFTAddressesAdd`
333
- * whose holders shall be allowlisted to mint project `_projectId`. Indexes
334
- * must align with `_ownedNFTAddressesAdd`.
335
- * @param _ownedNFTAddressesRemove NFT core addresses of projects to be
265
+ * @param projectId Project ID to enable minting on.
266
+ * @param coreContract Core contract address for the given project.
267
+ * @param ownedNFTAddressesAdd NFT core addresses of projects to be
268
+ * allowlisted. Indexes must align with `ownedNFTProjectIdsAdd`.
269
+ * @param ownedNFTProjectIdsAdd Project IDs on `ownedNFTAddressesAdd`
270
+ * whose holders shall be allowlisted to mint project `projectId`. Indexes
271
+ * must align with `ownedNFTAddressesAdd`.
272
+ * @param ownedNFTAddressesRemove NFT core addresses of projects to be
336
273
  * removed from allowlist. Indexes must align with
337
- * `_ownedNFTProjectIdsRemove`.
338
- * @param _ownedNFTProjectIdsRemove Project IDs on
339
- * `_ownedNFTAddressesRemove` whose holders will be removed from allowlist
340
- * to mint project `_projectId`. Indexes must align with
341
- * `_ownedNFTAddressesRemove`.
274
+ * `ownedNFTProjectIdsRemove`.
275
+ * @param ownedNFTProjectIdsRemove Project IDs on
276
+ * `ownedNFTAddressesRemove` whose holders will be removed from allowlist
277
+ * to mint project `projectId`. Indexes must align with
278
+ * `ownedNFTAddressesRemove`.
342
279
  * @dev if a project is included in both add and remove arrays, it will be
343
280
  * removed.
344
281
  */
345
282
  function allowAndRemoveHoldersOfProjects(
346
- uint256 _projectId,
347
- address _coreContract,
348
- address[] memory _ownedNFTAddressesAdd,
349
- uint256[] memory _ownedNFTProjectIdsAdd,
350
- address[] memory _ownedNFTAddressesRemove,
351
- uint256[] memory _ownedNFTProjectIdsRemove
283
+ uint256 projectId,
284
+ address coreContract,
285
+ address[] calldata ownedNFTAddressesAdd,
286
+ uint256[] calldata ownedNFTProjectIdsAdd,
287
+ address[] calldata ownedNFTAddressesRemove,
288
+ uint256[] calldata ownedNFTProjectIdsRemove
352
289
  ) external {
353
290
  AuthLib.onlyArtist({
354
- _projectId: _projectId,
355
- _coreContract: _coreContract,
356
- _sender: msg.sender
291
+ projectId: projectId,
292
+ coreContract: coreContract,
293
+ sender: msg.sender
357
294
  });
358
295
  TokenHolderLib.allowAndRemoveHoldersOfProjects({
359
- holderProjectConfig: _allowedProjectHoldersMapping[_coreContract][
360
- _projectId
361
- ],
362
- _ownedNFTAddressesAdd: _ownedNFTAddressesAdd,
363
- _ownedNFTProjectIdsAdd: _ownedNFTProjectIdsAdd,
364
- _ownedNFTAddressesRemove: _ownedNFTAddressesRemove,
365
- _ownedNFTProjectIdsRemove: _ownedNFTProjectIdsRemove
296
+ projectId: projectId,
297
+ coreContract: coreContract,
298
+ ownedNFTAddressesAdd: ownedNFTAddressesAdd,
299
+ ownedNFTProjectIdsAdd: ownedNFTProjectIdsAdd,
300
+ ownedNFTAddressesRemove: ownedNFTAddressesRemove,
301
+ ownedNFTProjectIdsRemove: ownedNFTProjectIdsRemove
366
302
  });
367
-
368
- // emit events
369
- emit AllowedHoldersOfProjects(
370
- _projectId,
371
- _coreContract,
372
- _ownedNFTAddressesAdd,
373
- _ownedNFTProjectIdsAdd
374
- );
375
- emit RemovedHoldersOfProjects(
376
- _projectId,
377
- _coreContract,
378
- _ownedNFTAddressesRemove,
379
- _ownedNFTProjectIdsRemove
380
- );
381
303
  }
382
304
 
383
305
  /**
384
- * @notice Sets auction details for project `_projectId`.
306
+ * @notice Sets auction details for project `projectId`.
385
307
  * Requires one of the following:
386
308
  * - The auction is unconfigured
387
309
  * - The auction has not yet started
@@ -390,214 +312,207 @@ contract MinterDAExpHolderV5 is
390
312
  * max invocations effectively grants the artist the ability to set a new
391
313
  * auction at any point, since minter-local max invocations can be set by
392
314
  * the artist.
393
- * @param _projectId Project ID to set auction details for.
394
- * @param _coreContract Core contract address for the given project.
395
- * @param _auctionTimestampStart Timestamp at which to start the auction.
396
- * @param _priceDecayHalfLifeSeconds The half life with which to decay the
315
+ * @param projectId Project ID to set auction details for.
316
+ * @param coreContract Core contract address for the given project.
317
+ * @param auctionTimestampStart Timestamp at which to start the auction.
318
+ * @param priceDecayHalfLifeSeconds The half life with which to decay the
397
319
  * price (in seconds).
398
- * @param _startPrice Price at which to start the auction, in Wei.
399
- * @param _basePrice Resting price of the auction, in Wei.
320
+ * @param startPrice Price at which to start the auction, in Wei.
321
+ * @param basePrice Resting price of the auction, in Wei.
400
322
  * @dev Note that it is intentionally supported here that the configured
401
323
  * price may be explicitly set to `0`.
402
324
  */
403
325
  function setAuctionDetails(
404
- uint256 _projectId,
405
- address _coreContract,
406
- uint40 _auctionTimestampStart,
407
- uint40 _priceDecayHalfLifeSeconds,
408
- uint256 _startPrice,
409
- uint256 _basePrice
326
+ uint256 projectId,
327
+ address coreContract,
328
+ uint40 auctionTimestampStart,
329
+ uint40 priceDecayHalfLifeSeconds,
330
+ uint256 startPrice,
331
+ uint256 basePrice
410
332
  ) external {
411
333
  AuthLib.onlyArtist({
412
- _projectId: _projectId,
413
- _coreContract: _coreContract,
414
- _sender: msg.sender
334
+ projectId: projectId,
335
+ coreContract: coreContract,
336
+ sender: msg.sender
415
337
  });
416
338
  // CHECKS
417
- DAExpLib.DAProjectConfig
418
- storage _auctionProjectConfig = _auctionProjectConfigMapping[
419
- _coreContract
420
- ][_projectId];
421
- MaxInvocationsLib.MaxInvocationsProjectConfig
422
- storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
423
- _coreContract
424
- ][_projectId];
425
-
426
339
  require(
427
- (_priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
340
+ (priceDecayHalfLifeSeconds >= minimumPriceDecayHalfLifeSeconds),
428
341
  "Price decay half life must be greater than min allowable value"
429
342
  );
430
343
 
431
344
  // EFFECTS
432
345
  bool maxHasBeenInvoked = MaxInvocationsLib.getMaxHasBeenInvoked(
433
- _maxInvocationsProjectConfig
346
+ projectId,
347
+ coreContract
434
348
  );
435
349
  DAExpLib.setAuctionDetailsExp({
436
- _DAProjectConfig: _auctionProjectConfig,
437
- _auctionTimestampStart: _auctionTimestampStart,
438
- _priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
439
- _startPrice: _startPrice.toUint88(),
440
- _basePrice: _basePrice.toUint88(),
441
- _allowReconfigureAfterStart: maxHasBeenInvoked
442
- });
443
-
444
- emit SetAuctionDetailsExp({
445
- _projectId: _projectId,
446
- _coreContract: _coreContract,
447
- _auctionTimestampStart: _auctionTimestampStart,
448
- _priceDecayHalfLifeSeconds: _priceDecayHalfLifeSeconds,
449
- _startPrice: _startPrice,
450
- _basePrice: _basePrice
350
+ projectId: projectId,
351
+ coreContract: coreContract,
352
+ auctionTimestampStart: auctionTimestampStart,
353
+ priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
354
+ startPrice: startPrice.toUint88(),
355
+ basePrice: basePrice.toUint88(),
356
+ allowReconfigureAfterStart: maxHasBeenInvoked
451
357
  });
452
358
 
453
359
  // sync local max invocations if not initially populated
454
360
  // @dev if local max invocations and maxHasBeenInvoked are both
455
361
  // initial values, we know they have not been populated.
456
362
  if (
457
- MaxInvocationsLib.maxInvocationsIsUnconfigured(
458
- _maxInvocationsProjectConfig
459
- )
363
+ MaxInvocationsLib.maxInvocationsIsUnconfigured({
364
+ projectId: projectId,
365
+ coreContract: coreContract
366
+ })
460
367
  ) {
461
- syncProjectMaxInvocationsToCore(_projectId, _coreContract);
368
+ syncProjectMaxInvocationsToCore({
369
+ projectId: projectId,
370
+ coreContract: coreContract
371
+ });
462
372
  }
463
373
  }
464
374
 
465
375
  /**
466
376
  * @notice Sets the minimum and maximum values that are settable for
467
- * `_priceDecayHalfLifeSeconds` across all projects.
468
- * @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
377
+ * `priceDecayHalfLifeSeconds` across all projects.
378
+ * @param minimumPriceDecayHalfLifeSeconds_ Minimum price decay half life
469
379
  * (in seconds).
470
380
  */
471
381
  function setMinimumPriceDecayHalfLifeSeconds(
472
- uint256 _minimumPriceDecayHalfLifeSeconds
382
+ uint256 minimumPriceDecayHalfLifeSeconds_
473
383
  ) external {
474
384
  AuthLib.onlyMinterFilterAdminACL({
475
- _minterFilterAddress: minterFilterAddress,
476
- _sender: msg.sender,
477
- _contract: address(this),
478
- _selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
385
+ minterFilterAddress: minterFilterAddress,
386
+ sender: msg.sender,
387
+ contract_: address(this),
388
+ selector: this.setMinimumPriceDecayHalfLifeSeconds.selector
479
389
  });
480
390
  require(
481
- _minimumPriceDecayHalfLifeSeconds > 0,
391
+ minimumPriceDecayHalfLifeSeconds_ > 0,
482
392
  "Half life of zero not allowed"
483
393
  );
484
- minimumPriceDecayHalfLifeSeconds = _minimumPriceDecayHalfLifeSeconds;
394
+ minimumPriceDecayHalfLifeSeconds = minimumPriceDecayHalfLifeSeconds_;
485
395
 
486
- emit AuctionMinHalfLifeSecondsUpdated(
487
- _minimumPriceDecayHalfLifeSeconds
396
+ emit DAExpLib.AuctionMinHalfLifeSecondsUpdated(
397
+ minimumPriceDecayHalfLifeSeconds_
488
398
  );
489
399
  }
490
400
 
491
401
  /**
492
- * @notice Resets auction details for project `_projectId`, zero-ing out all
402
+ * @notice Resets auction details for project `projectId`, zero-ing out all
493
403
  * relevant auction fields. Not intended to be used in normal auction
494
404
  * operation, but rather only in case of the need to halt an auction.
495
- * @param _projectId Project ID to set auction details for.
496
- * @param _coreContract Core contract address for the given project.
405
+ * @param projectId Project ID to set auction details for.
406
+ * @param coreContract Core contract address for the given project.
497
407
  */
498
408
  function resetAuctionDetails(
499
- uint256 _projectId,
500
- address _coreContract
409
+ uint256 projectId,
410
+ address coreContract
501
411
  ) external {
502
412
  AuthLib.onlyCoreAdminACL({
503
- _coreContract: _coreContract,
504
- _sender: msg.sender,
505
- _contract: address(this),
506
- _selector: this.resetAuctionDetails.selector
413
+ coreContract: coreContract,
414
+ sender: msg.sender,
415
+ contract_: address(this),
416
+ selector: this.resetAuctionDetails.selector
507
417
  });
508
418
 
509
- delete _auctionProjectConfigMapping[_coreContract][_projectId];
510
-
511
- emit ResetAuctionDetails(_projectId, _coreContract);
419
+ DAExpLib.resetAuctionDetails({
420
+ projectId: projectId,
421
+ coreContract: coreContract
422
+ });
512
423
  }
513
424
 
514
425
  /**
515
- * @notice Purchases a token from project `_projectId`.
426
+ * @notice Purchases a token from project `projectId`.
516
427
  * Note: Collectors should not send excessive value with their purchase
517
428
  * transaction, because the artist has the ability to change the auction
518
429
  * details at any time, including the price.
519
- * @param _projectId Project ID to mint a token on.
520
- * @param _coreContract Core contract address for the given project.
521
- * @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
430
+ * @param projectId Project ID to mint a token on.
431
+ * @param coreContract Core contract address for the given project.
432
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
522
433
  * msg.sender being used to claim right to purchase.
523
- * @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
434
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
524
435
  * to claim right to purchase.
525
436
  * @return tokenId Token ID of minted token
526
437
  */
527
438
  function purchase(
528
- uint256 _projectId,
529
- address _coreContract,
530
- address _ownedNFTAddress,
531
- uint256 _ownedNFTTokenId
439
+ uint256 projectId,
440
+ address coreContract,
441
+ address ownedNFTAddress,
442
+ uint256 ownedNFTTokenId
532
443
  ) external payable returns (uint256 tokenId) {
533
444
  tokenId = purchaseTo({
534
- _to: msg.sender,
535
- _projectId: _projectId,
536
- _coreContract: _coreContract,
537
- _ownedNFTAddress: _ownedNFTAddress,
538
- _ownedNFTTokenId: _ownedNFTTokenId,
539
- _vault: address(0)
445
+ to: msg.sender,
446
+ projectId: projectId,
447
+ coreContract: coreContract,
448
+ ownedNFTAddress: ownedNFTAddress,
449
+ ownedNFTTokenId: ownedNFTTokenId,
450
+ vault: address(0)
540
451
  });
541
452
 
542
453
  return tokenId;
543
454
  }
544
455
 
545
456
  /**
546
- * @notice Purchases a token from project `_projectId` and sets
547
- * the token's owner to `_to`.
457
+ * @notice Purchases a token from project `projectId` and sets
458
+ * the token's owner to `to`.
548
459
  * Note: Collectors should not send excessive value with their purchase
549
460
  * transaction, because the artist has the ability to change the auction
550
461
  * details at any time, including the price.
551
- * @param _to Address to be the new token's owner.
552
- * @param _projectId Project ID to mint a token on.
553
- * @param _coreContract Core contract address for the given project.
554
- * @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
462
+ * @param to Address to be the new token's owner.
463
+ * @param projectId Project ID to mint a token on.
464
+ * @param coreContract Core contract address for the given project.
465
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
555
466
  * msg.sender being used to claim right to purchase.
556
- * @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
467
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
557
468
  * to claim right to purchase.
558
469
  * @return tokenId Token ID of minted token
559
470
  */
560
471
  function purchaseTo(
561
- address _to,
562
- uint256 _projectId,
563
- address _coreContract,
564
- address _ownedNFTAddress,
565
- uint256 _ownedNFTTokenId
472
+ address to,
473
+ uint256 projectId,
474
+ address coreContract,
475
+ address ownedNFTAddress,
476
+ uint256 ownedNFTTokenId
566
477
  ) external payable returns (uint256 tokenId) {
567
478
  return
568
479
  purchaseTo({
569
- _to: _to,
570
- _projectId: _projectId,
571
- _coreContract: _coreContract,
572
- _ownedNFTAddress: _ownedNFTAddress,
573
- _ownedNFTTokenId: _ownedNFTTokenId,
574
- _vault: address(0)
480
+ to: to,
481
+ projectId: projectId,
482
+ coreContract: coreContract,
483
+ ownedNFTAddress: ownedNFTAddress,
484
+ ownedNFTTokenId: ownedNFTTokenId,
485
+ vault: address(0)
575
486
  });
576
487
  }
577
488
 
578
489
  // public getter functions
579
490
  /**
580
491
  * @notice Gets the maximum invocations project configuration.
581
- * @param _projectId The ID of the project whose data needs to be fetched.
582
- * @param _coreContract The address of the core contract.
492
+ * @param projectId The ID of the project whose data needs to be fetched.
493
+ * @param coreContract The address of the core contract.
583
494
  * @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
584
495
  * configuration data.
585
496
  */
586
497
  function maxInvocationsProjectConfig(
587
- uint256 _projectId,
588
- address _coreContract
498
+ uint256 projectId,
499
+ address coreContract
589
500
  )
590
501
  external
591
502
  view
592
503
  returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
593
504
  {
594
- return _maxInvocationsProjectConfigMapping[_coreContract][_projectId];
505
+ return
506
+ MaxInvocationsLib.getMaxInvocationsProjectConfig({
507
+ projectId: projectId,
508
+ coreContract: coreContract
509
+ });
595
510
  }
596
511
 
597
512
  /**
598
513
  * @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.
514
+ * @param projectId The unique identifier for the project.
515
+ * @param coreContract The address of the core contract for the project.
601
516
  * @return timestampStart The start timestamp for the auction.
602
517
  * @return priceDecayHalfLifeSeconds The half-life for the price decay
603
518
  * during the auction, in seconds.
@@ -605,8 +520,8 @@ contract MinterDAExpHolderV5 is
605
520
  * @return basePrice The base price of the auction.
606
521
  */
607
522
  function projectAuctionParameters(
608
- uint256 _projectId,
609
- address _coreContract
523
+ uint256 projectId,
524
+ address coreContract
610
525
  )
611
526
  external
612
527
  view
@@ -617,38 +532,38 @@ contract MinterDAExpHolderV5 is
617
532
  uint256 basePrice
618
533
  )
619
534
  {
620
- DAExpLib.DAProjectConfig
621
- storage _auctionProjectConfig = _auctionProjectConfigMapping[
622
- _coreContract
623
- ][_projectId];
624
- timestampStart = _auctionProjectConfig.timestampStart;
625
- priceDecayHalfLifeSeconds = _auctionProjectConfig
535
+ DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
536
+ .getDAProjectConfig({
537
+ projectId: projectId,
538
+ coreContract: coreContract
539
+ });
540
+ timestampStart = auctionProjectConfig.timestampStart;
541
+ priceDecayHalfLifeSeconds = auctionProjectConfig
626
542
  .priceDecayHalfLifeSeconds;
627
- startPrice = _auctionProjectConfig.startPrice;
628
- basePrice = _auctionProjectConfig.basePrice;
543
+ startPrice = auctionProjectConfig.startPrice;
544
+ basePrice = auctionProjectConfig.basePrice;
629
545
  }
630
546
 
631
547
  /**
632
- * @notice Checks if the specified `_coreContract` is a valid engine contract.
633
- * @dev This function retrieves the cached value of `_coreContract` from
548
+ * @notice Checks if the specified `coreContract` is a valid engine contract.
549
+ * @dev This function retrieves the cached value of `coreContract` from
634
550
  * 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`
551
+ * returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
552
+ * function from the `SplitFundsLib` library to check if `coreContract`
637
553
  * is a valid engine contract.
638
- * @dev This function will revert if the provided `_coreContract` is not
554
+ * @dev This function will revert if the provided `coreContract` is not
639
555
  * 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.
556
+ * @param coreContract The address of the contract to check.
557
+ * @return bool indicating if `coreContract` is a valid engine contract.
642
558
  */
643
- function isEngineView(address _coreContract) external view returns (bool) {
644
- SplitFundsLib.IsEngineCache storage isEngineCache = _isEngineCaches[
645
- _coreContract
646
- ];
559
+ function isEngineView(address coreContract) external view returns (bool) {
560
+ SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
561
+ .getIsEngineCacheConfig(coreContract);
647
562
  if (isEngineCache.isCached) {
648
563
  return isEngineCache.isEngine;
649
564
  } else {
650
- // @dev this calls the non-modifying variant of getV3CoreIsEngine
651
- return SplitFundsLib.getV3CoreIsEngineView(_coreContract);
565
+ // @dev this calls the non-state-modifying variant of isEngine
566
+ return SplitFundsLib.getV3CoreIsEngineView(coreContract);
652
567
  }
653
568
  }
654
569
 
@@ -663,17 +578,18 @@ contract MinterDAExpHolderV5 is
663
578
  * possible because the V3 core contract only allows maximum invocations
664
579
  * to be reduced, not increased. Based on this rationale, we intentionally
665
580
  * 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.
581
+ * @param projectId is an existing project ID.
582
+ * @param coreContract is an existing core contract address.
668
583
  */
669
584
  function projectMaxHasBeenInvoked(
670
- uint256 _projectId,
671
- address _coreContract
585
+ uint256 projectId,
586
+ address coreContract
672
587
  ) external view returns (bool) {
673
588
  return
674
- MaxInvocationsLib.getMaxHasBeenInvoked(
675
- _maxInvocationsProjectConfigMapping[_coreContract][_projectId]
676
- );
589
+ MaxInvocationsLib.getMaxHasBeenInvoked({
590
+ projectId: projectId,
591
+ coreContract: coreContract
592
+ });
677
593
  }
678
594
 
679
595
  /**
@@ -692,26 +608,27 @@ contract MinterDAExpHolderV5 is
692
608
  * increased. When this happens, the minter will enable minting, allowing
693
609
  * the core contract to enforce the max invocations check. Based on this
694
610
  * 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.
611
+ * to whether or not the input `projectId` is an existing project ID.
612
+ * @param projectId is an existing project ID.
613
+ * @param coreContract is an existing core contract address.
698
614
  */
699
615
  function projectMaxInvocations(
700
- uint256 _projectId,
701
- address _coreContract
616
+ uint256 projectId,
617
+ address coreContract
702
618
  ) external view returns (uint256) {
703
619
  return
704
- MaxInvocationsLib.getMaxInvocations(
705
- _maxInvocationsProjectConfigMapping[_coreContract][_projectId]
706
- );
620
+ MaxInvocationsLib.getMaxInvocations({
621
+ projectId: projectId,
622
+ coreContract: coreContract
623
+ });
707
624
  }
708
625
 
709
626
  /**
710
627
  * @notice Gets if price of token is configured, price of minting a
711
- * token on project `_projectId`, and currency symbol and address to be
628
+ * token on project `projectId`, and currency symbol and address to be
712
629
  * used as payment. Supersedes any core contract price information.
713
- * @param _projectId Project ID to get price information for
714
- * @param _coreContract Contract address of the core contract
630
+ * @param projectId Project ID to get price information for
631
+ * @param coreContract Contract address of the core contract
715
632
  * @return isConfigured true only if token price has been configured on
716
633
  * this minter
717
634
  * @return tokenPriceInWei current price of token on this minter - invalid
@@ -722,8 +639,8 @@ contract MinterDAExpHolderV5 is
722
639
  * this minter. This minter always returns null address, reserved for ether
723
640
  */
724
641
  function getPriceInfo(
725
- uint256 _projectId,
726
- address _coreContract
642
+ uint256 projectId,
643
+ address coreContract
727
644
  )
728
645
  external
729
646
  view
@@ -734,10 +651,11 @@ contract MinterDAExpHolderV5 is
734
651
  address currencyAddress
735
652
  )
736
653
  {
737
- DAExpLib.DAProjectConfig
738
- storage auctionProjectConfig = _auctionProjectConfigMapping[
739
- _coreContract
740
- ][_projectId];
654
+ DAExpLib.DAProjectConfig storage auctionProjectConfig = DAExpLib
655
+ .getDAProjectConfig({
656
+ projectId: projectId,
657
+ coreContract: coreContract
658
+ });
741
659
  isConfigured = (auctionProjectConfig.startPrice > 0);
742
660
  if (!isConfigured) {
743
661
  // In the case of unconfigured auction, return price of zero when
@@ -749,7 +667,10 @@ contract MinterDAExpHolderV5 is
749
667
  // before auction starts.
750
668
  tokenPriceInWei = auctionProjectConfig.startPrice;
751
669
  } else {
752
- tokenPriceInWei = DAExpLib.getPriceExp(auctionProjectConfig);
670
+ tokenPriceInWei = DAExpLib.getPriceExp({
671
+ projectId: projectId,
672
+ coreContract: coreContract
673
+ });
753
674
  }
754
675
  currencySymbol = "ETH";
755
676
  currencyAddress = address(0);
@@ -759,141 +680,126 @@ contract MinterDAExpHolderV5 is
759
680
  * @notice Checks if a specific NFT owner is allowed in a given project.
760
681
  * @dev This function retrieves the allowance status of an NFT owner
761
682
  * within a specific project from the allowedProjectHoldersMapping.
762
- * @param _projectId The ID of the project to check.
763
- * @param _coreContract Core contract address for the given project.
764
- * @param _ownedNFTAddress The address of the owned NFT contract.
765
- * @param _ownedNFTProjectId The ID of the owned NFT project.
683
+ * @param projectId The ID of the project to check.
684
+ * @param coreContract Core contract address for the given project.
685
+ * @param ownedNFTAddress The address of the owned NFT contract.
686
+ * @param ownedNFTProjectId The ID of the owned NFT project.
766
687
  * @return bool True if the NFT owner is allowed in the given project, False otherwise.
767
688
  */
768
689
  function allowedProjectHolders(
769
- uint256 _projectId,
770
- address _coreContract,
771
- address _ownedNFTAddress,
772
- uint256 _ownedNFTProjectId
690
+ uint256 projectId,
691
+ address coreContract,
692
+ address ownedNFTAddress,
693
+ uint256 ownedNFTProjectId
773
694
  ) external view returns (bool) {
774
695
  return
775
- _allowedProjectHoldersMapping[_coreContract][_projectId]
776
- .allowedProjectHolders[_ownedNFTAddress][_ownedNFTProjectId];
696
+ TokenHolderLib
697
+ .getHolderProjectConfig({
698
+ projectId: projectId,
699
+ coreContract: coreContract
700
+ })
701
+ .allowedProjectHolders[ownedNFTAddress][ownedNFTProjectId];
777
702
  }
778
703
 
779
704
  /**
780
- * @notice Returns if token is an allowlisted NFT for project `_projectId`.
781
- * @param _projectId Project ID to be checked.
782
- * @param _coreContract Core contract address for the given project.
783
- * @param _ownedNFTAddress ERC-721 NFT token address to be checked.
784
- * @param _ownedNFTTokenId ERC-721 NFT token ID to be checked.
705
+ * @notice Returns if token is an allowlisted NFT for project `projectId`.
706
+ * @param projectId Project ID to be checked.
707
+ * @param coreContract Core contract address for the given project.
708
+ * @param ownedNFTAddress ERC-721 NFT token address to be checked.
709
+ * @param ownedNFTTokenId ERC-721 NFT token ID to be checked.
785
710
  * @return bool Token is allowlisted
786
711
  * @dev does not check if token has been used to purchase
787
712
  * @dev assumes project ID can be derived from tokenId / 1_000_000
788
713
  */
789
714
  function isAllowlistedNFT(
790
- uint256 _projectId,
791
- address _coreContract,
792
- address _ownedNFTAddress,
793
- uint256 _ownedNFTTokenId
715
+ uint256 projectId,
716
+ address coreContract,
717
+ address ownedNFTAddress,
718
+ uint256 ownedNFTTokenId
794
719
  ) external view returns (bool) {
795
720
  return
796
721
  TokenHolderLib.isAllowlistedNFT({
797
- holderProjectConfig: _allowedProjectHoldersMapping[
798
- _coreContract
799
- ][_projectId],
800
- _ownedNFTAddress: _ownedNFTAddress,
801
- _ownedNFTTokenId: _ownedNFTTokenId
722
+ projectId: projectId,
723
+ coreContract: coreContract,
724
+ ownedNFTAddress: ownedNFTAddress,
725
+ ownedNFTTokenId: ownedNFTTokenId
802
726
  });
803
727
  }
804
728
 
805
729
  /**
806
- * @notice Syncs local maximum invocations of project `_projectId` based on
730
+ * @notice Syncs local maximum invocations of project `projectId` based on
807
731
  * the value currently defined in the core contract.
808
- * @param _projectId Project ID to set the maximum invocations for.
809
- * @param _coreContract Core contract address for the given project.
732
+ * @param projectId Project ID to set the maximum invocations for.
733
+ * @param coreContract Core contract address for the given project.
810
734
  * @dev this enables gas reduction after maxInvocations have been reached -
811
735
  * core contracts shall still enforce a maxInvocation check during mint.
812
736
  */
813
737
  function syncProjectMaxInvocationsToCore(
814
- uint256 _projectId,
815
- address _coreContract
738
+ uint256 projectId,
739
+ address coreContract
816
740
  ) public {
817
741
  AuthLib.onlyArtist({
818
- _projectId: _projectId,
819
- _coreContract: _coreContract,
820
- _sender: msg.sender
742
+ projectId: projectId,
743
+ coreContract: coreContract,
744
+ sender: msg.sender
821
745
  });
822
746
 
823
- uint256 maxInvocations = MaxInvocationsLib
824
- .syncProjectMaxInvocationsToCore({
825
- _projectId: _projectId,
826
- _coreContract: _coreContract,
827
- maxInvocationsProjectConfig: _maxInvocationsProjectConfigMapping[
828
- _coreContract
829
- ][_projectId]
830
- });
831
- emit ProjectMaxInvocationsLimitUpdated(
832
- _projectId,
833
- _coreContract,
834
- maxInvocations
835
- );
747
+ MaxInvocationsLib.syncProjectMaxInvocationsToCore({
748
+ projectId: projectId,
749
+ coreContract: coreContract
750
+ });
836
751
  }
837
752
 
838
753
  /**
839
- * @notice Purchases a token from project `_projectId` and sets
840
- * the token's owner to `_to`.
754
+ * @notice Purchases a token from project `projectId` and sets
755
+ * the token's owner to `to`.
841
756
  * Note: Collectors should not send excessive value with their purchase
842
757
  * transaction, because the artist has the ability to change the auction
843
758
  * details at any time, including the price.
844
- * @param _to Address to be the new token's owner.
845
- * @param _projectId Project ID to mint a token on.
846
- * @param _coreContract Core contract address for the given project.
847
- * @param _ownedNFTAddress ERC-721 NFT holding the project token owned by
759
+ * @param to Address to be the new token's owner.
760
+ * @param projectId Project ID to mint a token on.
761
+ * @param coreContract Core contract address for the given project.
762
+ * @param ownedNFTAddress ERC-721 NFT holding the project token owned by
848
763
  * msg.sender being used to claim right to purchase.
849
- * @param _ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
764
+ * @param ownedNFTTokenId ERC-721 NFT token ID owned by msg.sender being used
850
765
  * to claim right to purchase.
851
766
  * @return tokenId Token ID of minted token
852
767
  */
853
768
  function purchaseTo(
854
- address _to,
855
- uint256 _projectId,
856
- address _coreContract,
857
- address _ownedNFTAddress,
858
- uint256 _ownedNFTTokenId,
859
- address _vault
769
+ address to,
770
+ uint256 projectId,
771
+ address coreContract,
772
+ address ownedNFTAddress,
773
+ uint256 ownedNFTTokenId,
774
+ address vault
860
775
  ) public payable nonReentrant returns (uint256 tokenId) {
861
776
  // CHECKS
862
- MaxInvocationsLib.MaxInvocationsProjectConfig
863
- storage _maxInvocationsProjectConfig = _maxInvocationsProjectConfigMapping[
864
- _coreContract
865
- ][_projectId];
866
-
867
- DAExpLib.DAProjectConfig
868
- storage _auctionProjectConfig = _auctionProjectConfigMapping[
869
- _coreContract
870
- ][_projectId];
871
-
777
+ // pre-mint MaxInvocationsLib checks
872
778
  // Note that `maxHasBeenInvoked` is only checked here to reduce gas
873
779
  // consumption after a project has been fully minted.
874
- // `_maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
780
+ // `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
875
781
  // gas consumption, but if not in sync with the core contract's value,
876
782
  // the core contract also enforces its own max invocation check during
877
783
  // minting.
878
- require(
879
- !_maxInvocationsProjectConfig.maxHasBeenInvoked,
880
- "Max invocations reached"
881
- );
784
+ MaxInvocationsLib.preMintChecks({
785
+ projectId: projectId,
786
+ coreContract: coreContract
787
+ });
882
788
 
883
789
  // getPriceExp reverts if auction is unconfigured or has not started
884
- uint256 pricePerTokenInWei = DAExpLib.getPriceExp(
885
- _auctionProjectConfig
886
- );
790
+ uint256 pricePerTokenInWei = DAExpLib.getPriceExp({
791
+ projectId: projectId,
792
+ coreContract: coreContract
793
+ });
887
794
  require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
888
795
 
889
796
  // require token used to claim to be in set of allowlisted NFTs
890
797
  require(
891
798
  TokenHolderLib.isAllowlistedNFT({
892
- holderProjectConfig: _allowedProjectHoldersMapping[
893
- _coreContract
894
- ][_projectId],
895
- _ownedNFTAddress: _ownedNFTAddress,
896
- _ownedNFTTokenId: _ownedNFTTokenId
799
+ projectId: projectId,
800
+ coreContract: coreContract,
801
+ ownedNFTAddress: ownedNFTAddress,
802
+ ownedNFTTokenId: ownedNFTTokenId
897
803
  }),
898
804
  "Only allowlisted NFTs"
899
805
  );
@@ -901,43 +807,43 @@ contract MinterDAExpHolderV5 is
901
807
  // NOTE: delegate-vault handling **begins here**.
902
808
 
903
809
  // handle that the vault may be either the `msg.sender` in the case
904
- // that there is not a true vault, or may be `_vault` if one is
810
+ // that there is not a true vault, or may be `vault` if one is
905
811
  // provided explicitly (and it is valid).
906
- address vault = msg.sender;
907
- if (_vault != address(0)) {
812
+ address vault_ = msg.sender;
813
+ if (vault != address(0)) {
908
814
  // If a vault is provided, it must be valid, otherwise throw rather
909
815
  // than optimistically-minting with original `msg.sender`.
910
816
  // Note, we do not check `checkDelegateForAll` or `checkDelegateForContract` as well,
911
817
  // as they are known to be implicitly checked by calling `checkDelegateForToken`.
912
- bool isValidVault = delegationRegistryContract
818
+ bool isValidVault = _delegationRegistryContract
913
819
  .checkDelegateForToken({
914
820
  delegate: msg.sender,
915
- vault: _vault,
916
- contract_: _coreContract,
917
- tokenId: _ownedNFTTokenId
821
+ vault: vault,
822
+ contract_: coreContract,
823
+ tokenId: ownedNFTTokenId
918
824
  });
919
825
 
920
826
  require(isValidVault, "Invalid delegate-vault pairing");
921
- vault = _vault;
827
+ vault_ = vault;
922
828
  }
923
829
 
924
830
  // EFFECTS
925
- tokenId = minterFilter.mint_joo({
926
- _to: _to,
927
- _projectId: _projectId,
928
- _coreContract: _coreContract,
929
- _sender: vault
831
+ tokenId = _minterFilter.mint_joo({
832
+ to: to,
833
+ projectId: projectId,
834
+ coreContract: coreContract,
835
+ sender: vault_
930
836
  });
931
837
 
932
838
  // NOTE: delegate-vault handling **ends here**.
933
839
 
934
- MaxInvocationsLib.validatePurchaseEffectsInvocations(
935
- tokenId,
936
- _maxInvocationsProjectConfig
937
- );
840
+ MaxInvocationsLib.validatePurchaseEffectsInvocations({
841
+ tokenId: tokenId,
842
+ coreContract: coreContract
843
+ });
938
844
 
939
845
  // INTERACTIONS
940
- // require vault to own NFT used to redeem
846
+ // require vault_ to own NFT used to redeem
941
847
  /**
942
848
  * @dev Considered an interaction because calling ownerOf on an NFT
943
849
  * contract. Plan is to only integrate with AB/PBAB NFTs on the minter, but
@@ -945,20 +851,14 @@ contract MinterDAExpHolderV5 is
945
851
  * function is non-reentrant, so this is extra cautious.
946
852
  */
947
853
  TokenHolderLib.validateNFTOwnership({
948
- _ownedNFTAddress: _ownedNFTAddress,
949
- _ownedNFTTokenId: _ownedNFTTokenId,
950
- _targetOwner: vault
854
+ ownedNFTAddress: ownedNFTAddress,
855
+ ownedNFTTokenId: ownedNFTTokenId,
856
+ targetOwner: vault_
951
857
  });
952
-
953
- bool isEngine = SplitFundsLib.isEngine(
954
- _coreContract,
955
- _isEngineCaches[_coreContract]
956
- );
957
- SplitFundsLib.splitFundsETH({
958
- _projectId: _projectId,
959
- _pricePerTokenInWei: pricePerTokenInWei,
960
- _coreContract: _coreContract,
961
- _isEngine: isEngine
858
+ SplitFundsLib.splitFundsETHRefundSender({
859
+ projectId: projectId,
860
+ pricePerTokenInWei: pricePerTokenInWei,
861
+ coreContract: coreContract
962
862
  });
963
863
 
964
864
  return tokenId;