@ballkidz/defifa 0.0.6 → 0.0.8
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.
- package/ADMINISTRATION.md +3 -3
- package/AUDIT_INSTRUCTIONS.md +422 -0
- package/CRYPTO_ECON.md +5 -5
- package/RISKS.md +38 -335
- package/SKILLS.md +1 -1
- package/STYLE_GUIDE.md +14 -1
- package/USER_JOURNEYS.md +691 -0
- package/package.json +7 -5
- package/script/Deploy.s.sol +26 -13
- package/script/helpers/DefifaDeploymentLib.sol +30 -14
- package/src/DefifaDeployer.sol +225 -187
- package/src/DefifaGovernor.sol +291 -281
- package/src/DefifaHook.sol +81 -42
- package/src/DefifaProjectOwner.sol +27 -4
- package/src/DefifaTokenUriResolver.sol +137 -134
- package/src/enums/DefifaGamePhase.sol +1 -1
- package/src/enums/DefifaScorecardState.sol +1 -1
- package/src/interfaces/IDefifaDeployer.sol +52 -50
- package/src/interfaces/IDefifaGamePhaseReporter.sol +2 -2
- package/src/interfaces/IDefifaGamePotReporter.sol +1 -1
- package/src/interfaces/IDefifaGovernor.sol +53 -54
- package/src/interfaces/IDefifaHook.sol +104 -103
- package/src/interfaces/IDefifaTokenUriResolver.sol +2 -2
- package/src/libraries/DefifaFontImporter.sol +11 -9
- package/src/libraries/DefifaHookLib.sol +68 -53
- package/src/structs/DefifaAttestations.sol +1 -1
- package/src/structs/DefifaDelegation.sol +1 -1
- package/src/structs/DefifaLaunchProjectData.sol +4 -4
- package/src/structs/DefifaOpsData.sol +1 -1
- package/src/structs/DefifaScorecard.sol +1 -1
- package/src/structs/DefifaTierCashOutWeight.sol +1 -1
- package/src/structs/DefifaTierParams.sol +2 -1
- package/test/DefifaAdversarialQuorum.t.sol +602 -0
- package/test/DefifaAuditLowGuards.t.sol +304 -0
- package/test/DefifaFeeAccounting.t.sol +37 -16
- package/test/DefifaGovernor.t.sol +37 -11
- package/test/DefifaHookRegressions.t.sol +14 -12
- package/test/DefifaMintCostInvariant.t.sol +31 -12
- package/test/DefifaNoContest.t.sol +33 -13
- package/test/DefifaSecurity.t.sol +45 -25
- package/test/DefifaUSDC.t.sol +44 -34
- package/test/Fork.t.sol +42 -40
- package/test/SVG.t.sol +2 -2
- package/test/TestAuditGaps.sol +982 -0
- package/test/TestQALastMile.t.sol +511 -0
- package/test/regression/FulfillmentBlocksRatification.t.sol +36 -30
- package/test/regression/GracePeriodBypass.t.sol +15 -10
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import {mulDiv} from "@prb/math/src/Common.sol";
|
|
5
|
-
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
6
|
-
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
7
4
|
import {IJB721TiersHookStore} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHookStore.sol";
|
|
8
5
|
import {JB721Tier} from "@bananapus/721-hook-v6/src/structs/JB721Tier.sol";
|
|
9
|
-
import {
|
|
6
|
+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
7
|
+
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
8
|
+
import {mulDiv} from "@prb/math/src/Common.sol";
|
|
9
|
+
|
|
10
10
|
import {DefifaGamePhase} from "../enums/DefifaGamePhase.sol";
|
|
11
|
+
import {DefifaTierCashOutWeight} from "../structs/DefifaTierCashOutWeight.sol";
|
|
11
12
|
|
|
12
|
-
/// @title DefifaHookLib
|
|
13
13
|
/// @notice Pure/view helper functions extracted from DefifaHook to reduce contract bytecode size.
|
|
14
14
|
/// @dev Public library functions are deployed separately and called via delegatecall, so their bytecode does not count
|
|
15
15
|
/// toward the calling contract's EIP-170 size limit.
|
|
@@ -29,12 +29,12 @@ library DefifaHookLib {
|
|
|
29
29
|
|
|
30
30
|
/// @notice Validates tier cash out weights and returns the weight array to store.
|
|
31
31
|
/// @param tierWeights The tier weights to validate and set.
|
|
32
|
-
/// @param
|
|
32
|
+
/// @param hookStore The 721 tiers hook store.
|
|
33
33
|
/// @param hook The hook address.
|
|
34
34
|
/// @return weights The 128-element array of validated weights.
|
|
35
35
|
function validateAndBuildWeights(
|
|
36
36
|
DefifaTierCashOutWeight[] memory tierWeights,
|
|
37
|
-
IJB721TiersHookStore
|
|
37
|
+
IJB721TiersHookStore hookStore,
|
|
38
38
|
address hook
|
|
39
39
|
)
|
|
40
40
|
public
|
|
@@ -42,7 +42,7 @@ library DefifaHookLib {
|
|
|
42
42
|
returns (uint256[128] memory weights)
|
|
43
43
|
{
|
|
44
44
|
// Keep a reference to the max tier ID.
|
|
45
|
-
uint256 _maxTierId =
|
|
45
|
+
uint256 _maxTierId = hookStore.maxTierIdOf(hook);
|
|
46
46
|
|
|
47
47
|
// Keep a reference to the cumulative amounts.
|
|
48
48
|
uint256 _cumulativeCashOutWeight;
|
|
@@ -62,7 +62,7 @@ library DefifaHookLib {
|
|
|
62
62
|
_lastTierId = tierWeights[_i].id;
|
|
63
63
|
|
|
64
64
|
// Get the tier.
|
|
65
|
-
_tier =
|
|
65
|
+
_tier = hookStore.tierOf({hook: hook, id: tierWeights[_i].id, includeResolvedUri: false});
|
|
66
66
|
|
|
67
67
|
// Can't set a cashOut weight for tiers not in category 0.
|
|
68
68
|
if (_tier.category != 0) revert DefifaHook_InvalidTierId();
|
|
@@ -87,14 +87,14 @@ library DefifaHookLib {
|
|
|
87
87
|
|
|
88
88
|
/// @notice Compute the cash out weight for a single token.
|
|
89
89
|
/// @param tokenId The token ID.
|
|
90
|
-
/// @param
|
|
90
|
+
/// @param hookStore The 721 tiers hook store.
|
|
91
91
|
/// @param hook The hook address.
|
|
92
92
|
/// @param tierCashOutWeights The tier cash out weights array.
|
|
93
93
|
/// @param tokensRedeemedFrom The mapping of tokens redeemed per tier (passed as a function that returns the value).
|
|
94
94
|
/// @return The cash out weight.
|
|
95
95
|
function computeCashOutWeight(
|
|
96
96
|
uint256 tokenId,
|
|
97
|
-
IJB721TiersHookStore
|
|
97
|
+
IJB721TiersHookStore hookStore,
|
|
98
98
|
address hook,
|
|
99
99
|
uint256[128] storage tierCashOutWeights,
|
|
100
100
|
mapping(uint256 => uint256) storage tokensRedeemedFrom
|
|
@@ -104,10 +104,10 @@ library DefifaHookLib {
|
|
|
104
104
|
returns (uint256)
|
|
105
105
|
{
|
|
106
106
|
// Keep a reference to the token's tier ID.
|
|
107
|
-
uint256 _tierId =
|
|
107
|
+
uint256 _tierId = hookStore.tierIdOfToken(tokenId);
|
|
108
108
|
|
|
109
109
|
// Keep a reference to the tier.
|
|
110
|
-
JB721Tier memory _tier =
|
|
110
|
+
JB721Tier memory _tier = hookStore.tierOf({hook: hook, id: _tierId, includeResolvedUri: false});
|
|
111
111
|
|
|
112
112
|
// Get the tier's weight.
|
|
113
113
|
uint256 _weight = tierCashOutWeights[_tierId - 1];
|
|
@@ -116,7 +116,7 @@ library DefifaHookLib {
|
|
|
116
116
|
if (_weight == 0) return 0;
|
|
117
117
|
|
|
118
118
|
// Get the amount of tokens that have already been burned.
|
|
119
|
-
uint256 _burnedTokens =
|
|
119
|
+
uint256 _burnedTokens = hookStore.numberOfBurnedFor({hook: hook, tierId: _tierId});
|
|
120
120
|
|
|
121
121
|
// If no tiers were minted, nothing to redeem.
|
|
122
122
|
if (_tier.initialSupply - (_tier.remainingSupply + _burnedTokens) == 0) return 0;
|
|
@@ -126,19 +126,22 @@ library DefifaHookLib {
|
|
|
126
126
|
_tier.initialSupply - _tier.remainingSupply - (_burnedTokens - tokensRedeemedFrom[_tierId]);
|
|
127
127
|
|
|
128
128
|
// Calculate the percentage of the tier cashOut amount a single token counts for.
|
|
129
|
+
// Integer division rounding in cashOutWeight is unavoidable in Solidity. Rounding direction
|
|
130
|
+
// (down) is consistent and conservative — it slightly favors the project over individual cash-out recipients.
|
|
131
|
+
// The maximum error per operation is 1 wei per division.
|
|
129
132
|
return _weight / _totalTokensForCashoutInTier;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
/// @notice Compute the cumulative cash out weight for multiple tokens.
|
|
133
136
|
/// @param tokenIds The token IDs.
|
|
134
|
-
/// @param
|
|
137
|
+
/// @param hookStore The 721 tiers hook store.
|
|
135
138
|
/// @param hook The hook address.
|
|
136
139
|
/// @param tierCashOutWeights The tier cash out weights array.
|
|
137
140
|
/// @param tokensRedeemedFrom The mapping of tokens redeemed per tier.
|
|
138
141
|
/// @return cumulativeWeight The cumulative weight.
|
|
139
142
|
function computeCashOutWeightBatch(
|
|
140
143
|
uint256[] memory tokenIds,
|
|
141
|
-
IJB721TiersHookStore
|
|
144
|
+
IJB721TiersHookStore hookStore,
|
|
142
145
|
address hook,
|
|
143
146
|
uint256[128] storage tierCashOutWeights,
|
|
144
147
|
mapping(uint256 => uint256) storage tokensRedeemedFrom
|
|
@@ -151,7 +154,7 @@ library DefifaHookLib {
|
|
|
151
154
|
for (uint256 _i; _i < _tokenCount;) {
|
|
152
155
|
cumulativeWeight += computeCashOutWeight({
|
|
153
156
|
tokenId: tokenIds[_i],
|
|
154
|
-
|
|
157
|
+
hookStore: hookStore,
|
|
155
158
|
hook: hook,
|
|
156
159
|
tierCashOutWeights: tierCashOutWeights,
|
|
157
160
|
tokensRedeemedFrom: tokensRedeemedFrom
|
|
@@ -164,7 +167,7 @@ library DefifaHookLib {
|
|
|
164
167
|
|
|
165
168
|
/// @notice Compute the claimable token amounts for a set of token IDs.
|
|
166
169
|
/// @param tokenIds The token IDs.
|
|
167
|
-
/// @param
|
|
170
|
+
/// @param hookStore The 721 tiers hook store.
|
|
168
171
|
/// @param hook The hook address.
|
|
169
172
|
/// @param totalMintCost The cumulative mint cost.
|
|
170
173
|
/// @param defifaBalance The current $DEFIFA balance.
|
|
@@ -173,7 +176,7 @@ library DefifaHookLib {
|
|
|
173
176
|
/// @return baseProtocolTokenAmount The claimable $BASE_PROTOCOL amount.
|
|
174
177
|
function computeTokensClaim(
|
|
175
178
|
uint256[] memory tokenIds,
|
|
176
|
-
IJB721TiersHookStore
|
|
179
|
+
IJB721TiersHookStore hookStore,
|
|
177
180
|
address hook,
|
|
178
181
|
uint256 totalMintCost,
|
|
179
182
|
uint256 defifaBalance,
|
|
@@ -192,23 +195,25 @@ library DefifaHookLib {
|
|
|
192
195
|
// Calculate the amount paid to mint the tokens that are being burned.
|
|
193
196
|
uint256 _cumulativeMintPrice;
|
|
194
197
|
for (uint256 _i; _i < _numberOfTokens; _i++) {
|
|
195
|
-
_cumulativeMintPrice +=
|
|
198
|
+
_cumulativeMintPrice += hookStore.tierOfTokenId({
|
|
199
|
+
hook: hook, tokenId: tokenIds[_i], includeResolvedUri: false
|
|
200
|
+
})
|
|
196
201
|
.price;
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
// Calculate the user's claimable amount proportional to what they paid.
|
|
200
|
-
defifaTokenAmount = defifaBalance
|
|
201
|
-
baseProtocolTokenAmount = baseProtocolBalance
|
|
205
|
+
defifaTokenAmount = mulDiv({x: defifaBalance, y: _cumulativeMintPrice, denominator: totalMintCost});
|
|
206
|
+
baseProtocolTokenAmount = mulDiv({x: baseProtocolBalance, y: _cumulativeMintPrice, denominator: totalMintCost});
|
|
202
207
|
}
|
|
203
208
|
|
|
204
209
|
/// @notice Compute the cumulative mint price for a set of token IDs.
|
|
205
210
|
/// @param tokenIds The token IDs.
|
|
206
|
-
/// @param
|
|
211
|
+
/// @param hookStore The 721 tiers hook store.
|
|
207
212
|
/// @param hook The hook address.
|
|
208
213
|
/// @return cumulativeMintPrice The total mint price.
|
|
209
214
|
function computeCumulativeMintPrice(
|
|
210
215
|
uint256[] memory tokenIds,
|
|
211
|
-
IJB721TiersHookStore
|
|
216
|
+
IJB721TiersHookStore hookStore,
|
|
212
217
|
address hook
|
|
213
218
|
)
|
|
214
219
|
public
|
|
@@ -217,7 +222,9 @@ library DefifaHookLib {
|
|
|
217
222
|
{
|
|
218
223
|
uint256 _numberOfTokenIds = tokenIds.length;
|
|
219
224
|
for (uint256 _i; _i < _numberOfTokenIds; _i++) {
|
|
220
|
-
cumulativeMintPrice +=
|
|
225
|
+
cumulativeMintPrice += hookStore.tierOfTokenId({
|
|
226
|
+
hook: hook, tokenId: tokenIds[_i], includeResolvedUri: false
|
|
227
|
+
})
|
|
221
228
|
.price;
|
|
222
229
|
}
|
|
223
230
|
}
|
|
@@ -226,14 +233,14 @@ library DefifaHookLib {
|
|
|
226
233
|
/// @param gamePhase The current game phase.
|
|
227
234
|
/// @param cumulativeMintPrice The cumulative mint price of the tokens being cashed out.
|
|
228
235
|
/// @param surplusValue The surplus value from the context.
|
|
229
|
-
/// @param
|
|
236
|
+
/// @param totalAmountRedeemed The amount already redeemed.
|
|
230
237
|
/// @param cumulativeCashOutWeight The cumulative cash out weight of the tokens.
|
|
231
238
|
/// @return cashOutCount The computed cash out count.
|
|
232
239
|
function computeCashOutCount(
|
|
233
240
|
DefifaGamePhase gamePhase,
|
|
234
241
|
uint256 cumulativeMintPrice,
|
|
235
242
|
uint256 surplusValue,
|
|
236
|
-
uint256
|
|
243
|
+
uint256 totalAmountRedeemed,
|
|
237
244
|
uint256 cumulativeCashOutWeight
|
|
238
245
|
)
|
|
239
246
|
public
|
|
@@ -248,17 +255,19 @@ library DefifaHookLib {
|
|
|
248
255
|
cashOutCount = cumulativeMintPrice;
|
|
249
256
|
} else {
|
|
250
257
|
// If the game is in its scoring or complete phase, reclaim amount is based on the tier weights.
|
|
251
|
-
cashOutCount = mulDiv(
|
|
258
|
+
cashOutCount = mulDiv({
|
|
259
|
+
x: surplusValue + totalAmountRedeemed, y: cumulativeCashOutWeight, denominator: TOTAL_CASHOUT_WEIGHT
|
|
260
|
+
});
|
|
252
261
|
}
|
|
253
262
|
}
|
|
254
263
|
|
|
255
264
|
/// @notice Compute the current supply of a tier (minted - burned).
|
|
256
|
-
/// @param
|
|
265
|
+
/// @param hookStore The 721 tiers hook store.
|
|
257
266
|
/// @param hook The hook address.
|
|
258
267
|
/// @param tierId The ID of the tier.
|
|
259
268
|
/// @return The current supply.
|
|
260
269
|
function computeCurrentSupply(
|
|
261
|
-
IJB721TiersHookStore
|
|
270
|
+
IJB721TiersHookStore hookStore,
|
|
262
271
|
address hook,
|
|
263
272
|
uint256 tierId
|
|
264
273
|
)
|
|
@@ -266,28 +275,28 @@ library DefifaHookLib {
|
|
|
266
275
|
view
|
|
267
276
|
returns (uint256)
|
|
268
277
|
{
|
|
269
|
-
JB721Tier memory _tier =
|
|
270
|
-
return _tier.initialSupply - (_tier.remainingSupply +
|
|
278
|
+
JB721Tier memory _tier = hookStore.tierOf({hook: hook, id: tierId, includeResolvedUri: false});
|
|
279
|
+
return _tier.initialSupply - (_tier.remainingSupply + hookStore.numberOfBurnedFor({hook: hook, tierId: tierId}));
|
|
271
280
|
}
|
|
272
281
|
|
|
273
282
|
/// @notice Computes the attestation units for tiers during payment processing.
|
|
274
283
|
/// @dev Returns parallel arrays: tier IDs, cumulative attestation units per tier, and whether to switch delegate.
|
|
275
|
-
/// @param
|
|
276
|
-
/// @param
|
|
284
|
+
/// @param tierIdsToMint The tier IDs being minted (must be in ascending order).
|
|
285
|
+
/// @param hookStore The 721 tiers hook store.
|
|
277
286
|
/// @param hook The hook address.
|
|
278
287
|
/// @return tierIds The unique tier IDs.
|
|
279
288
|
/// @return attestationAmounts The cumulative attestation units for each unique tier.
|
|
280
289
|
/// @return count The number of unique tiers.
|
|
281
290
|
function computeAttestationUnits(
|
|
282
|
-
uint16[] memory
|
|
283
|
-
IJB721TiersHookStore
|
|
291
|
+
uint16[] memory tierIdsToMint,
|
|
292
|
+
IJB721TiersHookStore hookStore,
|
|
284
293
|
address hook
|
|
285
294
|
)
|
|
286
295
|
public
|
|
287
296
|
view
|
|
288
297
|
returns (uint256[] memory tierIds, uint256[] memory attestationAmounts, uint256 count)
|
|
289
298
|
{
|
|
290
|
-
uint256 _numberOfTiers =
|
|
299
|
+
uint256 _numberOfTiers = tierIdsToMint.length;
|
|
291
300
|
tierIds = new uint256[](_numberOfTiers);
|
|
292
301
|
attestationAmounts = new uint256[](_numberOfTiers);
|
|
293
302
|
|
|
@@ -298,17 +307,17 @@ library DefifaHookLib {
|
|
|
298
307
|
uint256 _accumulated;
|
|
299
308
|
|
|
300
309
|
for (uint256 _i; _i < _numberOfTiers;) {
|
|
301
|
-
if (_currentTierId !=
|
|
310
|
+
if (_currentTierId != tierIdsToMint[_i]) {
|
|
302
311
|
// Flush accumulated units for previous tier.
|
|
303
312
|
if (_currentTierId != 0) {
|
|
304
313
|
tierIds[count] = _currentTierId;
|
|
305
314
|
attestationAmounts[count] = _accumulated;
|
|
306
315
|
count++;
|
|
307
316
|
}
|
|
308
|
-
if (
|
|
309
|
-
_currentTierId =
|
|
317
|
+
if (tierIdsToMint[_i] < _currentTierId) revert DefifaHook_BadTierOrder();
|
|
318
|
+
_currentTierId = tierIdsToMint[_i];
|
|
310
319
|
_attestationUnits =
|
|
311
|
-
|
|
320
|
+
hookStore.tierOf({hook: hook, id: _currentTierId, includeResolvedUri: false}).votingUnits;
|
|
312
321
|
_accumulated = _attestationUnits;
|
|
313
322
|
} else {
|
|
314
323
|
_accumulated += _attestationUnits;
|
|
@@ -327,31 +336,37 @@ library DefifaHookLib {
|
|
|
327
336
|
|
|
328
337
|
/// @notice Claims the defifa and base protocol tokens for a beneficiary.
|
|
329
338
|
/// @dev Executes via delegatecall, so `address(this)` is the calling contract. Transfers are from the hook's
|
|
330
|
-
/// balance.
|
|
339
|
+
/// balance.
|
|
340
|
+
/// @param beneficiary The address to claim tokens for.
|
|
331
341
|
/// @param shareToBeneficiary The share relative to the `outOfTotal` to send the user.
|
|
332
342
|
/// @param outOfTotal The total share that the `shareToBeneficiary` is relative to.
|
|
333
|
-
/// @param
|
|
334
|
-
/// @param
|
|
343
|
+
/// @param defifaToken The $DEFIFA token.
|
|
344
|
+
/// @param baseProtocolToken The $BASE_PROTOCOL token.
|
|
335
345
|
/// @return beneficiaryReceivedTokens A flag indicating if the beneficiary received any tokens.
|
|
336
346
|
function claimTokensFor(
|
|
337
|
-
address
|
|
347
|
+
address beneficiary,
|
|
338
348
|
uint256 shareToBeneficiary,
|
|
339
349
|
uint256 outOfTotal,
|
|
340
|
-
IERC20
|
|
341
|
-
IERC20
|
|
350
|
+
IERC20 defifaToken,
|
|
351
|
+
IERC20 baseProtocolToken
|
|
342
352
|
)
|
|
343
353
|
public
|
|
344
354
|
returns (bool beneficiaryReceivedTokens)
|
|
345
355
|
{
|
|
346
356
|
// Calculate the share of $DEFIFA and $BASE_PROTOCOL tokens to send.
|
|
347
|
-
|
|
348
|
-
|
|
357
|
+
// Rounding in fee token claims slightly favors later claimants because earlier claims round
|
|
358
|
+
// down, leaving fractionally more for subsequent claimants. The error is bounded by 1 wei per claim and is
|
|
359
|
+
// economically insignificant.
|
|
360
|
+
uint256 baseProtocolAmount =
|
|
361
|
+
mulDiv({x: baseProtocolToken.balanceOf(address(this)), y: shareToBeneficiary, denominator: outOfTotal});
|
|
362
|
+
uint256 defifaAmount =
|
|
363
|
+
mulDiv({x: defifaToken.balanceOf(address(this)), y: shareToBeneficiary, denominator: outOfTotal});
|
|
349
364
|
|
|
350
365
|
// If there is an amount we should send, send it.
|
|
351
|
-
if (defifaAmount != 0)
|
|
352
|
-
if (baseProtocolAmount != 0)
|
|
366
|
+
if (defifaAmount != 0) defifaToken.safeTransfer({to: beneficiary, value: defifaAmount});
|
|
367
|
+
if (baseProtocolAmount != 0) baseProtocolToken.safeTransfer({to: beneficiary, value: baseProtocolAmount});
|
|
353
368
|
|
|
354
|
-
emit ClaimedTokens(
|
|
369
|
+
emit ClaimedTokens(beneficiary, defifaAmount, baseProtocolAmount, msg.sender);
|
|
355
370
|
|
|
356
371
|
return (defifaAmount != 0 || baseProtocolAmount != 0);
|
|
357
372
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import {DefifaTierParams} from "./DefifaTierParams.sol";
|
|
5
|
-
|
|
6
|
-
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
7
4
|
import {IJB721TiersHookStore} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHookStore.sol";
|
|
8
5
|
import {IJB721TokenUriResolver} from "@bananapus/721-hook-v6/src/interfaces/IJB721TokenUriResolver.sol";
|
|
9
6
|
import {IJBTerminal} from "@bananapus/core-v6/src/interfaces/IJBTerminal.sol";
|
|
7
|
+
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
10
8
|
import {JBSplit} from "@bananapus/core-v6/src/structs/JBSplit.sol";
|
|
11
9
|
|
|
10
|
+
import {DefifaTierParams} from "./DefifaTierParams.sol";
|
|
11
|
+
|
|
12
12
|
/// @custom:member name The name of the game being created.
|
|
13
13
|
/// @custom:member projectUri Metadata to associate with the project.
|
|
14
14
|
/// @custom:member contractUri The URI to associate with the 721.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
/// @custom:member attestationsBegin The block at which attestations to the scorecard become allowed.
|
|
5
5
|
/// @custom:member gracePeriodEnds The block at which the scorecard can become ratified.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
/// @custom:member name The name of the tier.
|
|
5
5
|
/// @custom:member reservedRate The number of minted tokens needed in the tier to allow for minting another reserved
|
|
@@ -11,6 +11,7 @@ struct DefifaTierParams {
|
|
|
11
11
|
string name;
|
|
12
12
|
uint16 reservedRate;
|
|
13
13
|
address reservedTokenBeneficiary;
|
|
14
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
14
15
|
bytes32 encodedIPFSUri;
|
|
15
16
|
bool shouldUseReservedTokenBeneficiaryAsDefault;
|
|
16
17
|
}
|