@ballkidz/defifa 0.0.34 → 0.0.35
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/CHANGELOG.md +8 -0
- package/foundry.toml +1 -0
- package/package.json +4 -4
- package/src/DefifaDeployer.sol +5 -0
- package/src/DefifaHook.sol +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.35 — Bump v6 deps to nana-core-v6 0.0.53 cohort
|
|
4
|
+
|
|
5
|
+
- `@bananapus/core-v6`: `^0.0.48 → ^0.0.53` ([PR #145](https://github.com/Bananapus/nana-core-v6/pull/145)).
|
|
6
|
+
- `@bananapus/721-hook-v6`: `^0.0.46 → ^0.0.50`.
|
|
7
|
+
- `@bananapus/permission-ids-v6`: `^0.0.22 → ^0.0.25`.
|
|
8
|
+
- All `JBRulesetMetadata` literals (src + test) patched to include `pauseCrossProjectFeeFreeInflows: false`.
|
|
9
|
+
|
|
3
10
|
## Scope
|
|
4
11
|
|
|
5
12
|
This repo was not part of the deployed v5 ecosystem that the top-level changelog measures, so it is excluded from the ecosystem delta.
|
|
@@ -23,6 +30,7 @@ This file instead describes the current v6 repo at a high level and the broad mi
|
|
|
23
30
|
## Local review remediations
|
|
24
31
|
|
|
25
32
|
- Reserve-minted NFTs are now excluded from refund calculations during MINT, REFUND, and NO_CONTEST phases. A public `isReserveMint` mapping tracks which tokens were created via tier reserve frequency rather than paid for. `beforeCashOutRecordedWith` subtracts their tier price from `cumulativeMintPrice`, preventing reserve beneficiaries from withdrawing funds they never contributed.
|
|
33
|
+
- Reserve minting now caps `count` by `adjustedPendingReservesFor(tierId)` inside `DefifaHook.mintReservesFor`. Without the cap, a caller could request more reserves than the refund-adjusted pending balance, inflating `totalMintCost` from already-refunded mints and breaking the supply-vs-pending-reserves invariant that fee-token claims rely on.
|
|
26
34
|
- One-tier games now revert at launch with `DefifaDeployer_InvalidGameConfiguration` if `scorecardTimeout == 0`. A one-tier game cannot reach quorum (the BWA multiplier reduces the sole tier's power to zero), so a zero timeout would leave funds permanently locked with no exit path. Enforcement moves this from a launcher-side responsibility (previously documented in `RISKS.md §8.6`) to a contract-level guarantee.
|
|
27
35
|
- `DefifaHook.mintReservesFor` now reverts with `DefifaHook_ReservedTokenMintingBlockedInNoContest` while the game is in `NO_CONTEST`. Reserve mints inflate `totalMintCost` so reserved recipients can claim fee tokens; without the block, a game that failed `minParticipation` could be revived back to SCORING via free notional face value before `triggerNoContestFor` latches the failure.
|
|
28
36
|
|
package/foundry.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ballkidz/defifa",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "25.9.0"
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"remappings.txt"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@bananapus/721-hook-v6": "^0.0.
|
|
34
|
+
"@bananapus/721-hook-v6": "^0.0.50",
|
|
35
35
|
"@bananapus/address-registry-v6": "^0.0.25",
|
|
36
|
-
"@bananapus/core-v6": "^0.0.
|
|
37
|
-
"@bananapus/permission-ids-v6": "^0.0.
|
|
36
|
+
"@bananapus/core-v6": "^0.0.53",
|
|
37
|
+
"@bananapus/permission-ids-v6": "^0.0.25",
|
|
38
38
|
"@openzeppelin/contracts": "5.6.1",
|
|
39
39
|
"@prb/math": "4.1.1",
|
|
40
40
|
"scripty.sol": "2.1.1"
|
package/src/DefifaDeployer.sol
CHANGED
|
@@ -687,6 +687,7 @@ contract DefifaDeployer is IDefifaDeployer, IDefifaGamePhaseReporter, IDefifaGam
|
|
|
687
687
|
ownerMustSendPayouts: true,
|
|
688
688
|
holdFees: false,
|
|
689
689
|
scopeCashOutsToLocalBalances: true,
|
|
690
|
+
pauseCrossProjectFeeFreeInflows: false,
|
|
690
691
|
useDataHookForPay: true,
|
|
691
692
|
useDataHookForCashOut: true,
|
|
692
693
|
dataHook: metadata.dataHook,
|
|
@@ -850,6 +851,7 @@ contract DefifaDeployer is IDefifaDeployer, IDefifaGamePhaseReporter, IDefifaGam
|
|
|
850
851
|
ownerMustSendPayouts: false,
|
|
851
852
|
holdFees: false,
|
|
852
853
|
scopeCashOutsToLocalBalances: true,
|
|
854
|
+
pauseCrossProjectFeeFreeInflows: false,
|
|
853
855
|
useDataHookForPay: true,
|
|
854
856
|
useDataHookForCashOut: true,
|
|
855
857
|
dataHook: dataHook,
|
|
@@ -893,6 +895,7 @@ contract DefifaDeployer is IDefifaDeployer, IDefifaGamePhaseReporter, IDefifaGam
|
|
|
893
895
|
ownerMustSendPayouts: false,
|
|
894
896
|
holdFees: false,
|
|
895
897
|
scopeCashOutsToLocalBalances: true,
|
|
898
|
+
pauseCrossProjectFeeFreeInflows: false,
|
|
896
899
|
useDataHookForPay: true,
|
|
897
900
|
useDataHookForCashOut: true,
|
|
898
901
|
dataHook: dataHook,
|
|
@@ -953,6 +956,7 @@ contract DefifaDeployer is IDefifaDeployer, IDefifaGamePhaseReporter, IDefifaGam
|
|
|
953
956
|
ownerMustSendPayouts: true,
|
|
954
957
|
holdFees: false,
|
|
955
958
|
scopeCashOutsToLocalBalances: true,
|
|
959
|
+
pauseCrossProjectFeeFreeInflows: false,
|
|
956
960
|
useDataHookForPay: true,
|
|
957
961
|
useDataHookForCashOut: true,
|
|
958
962
|
dataHook: dataHook,
|
|
@@ -1008,6 +1012,7 @@ contract DefifaDeployer is IDefifaDeployer, IDefifaGamePhaseReporter, IDefifaGam
|
|
|
1008
1012
|
ownerMustSendPayouts: false,
|
|
1009
1013
|
holdFees: false,
|
|
1010
1014
|
scopeCashOutsToLocalBalances: true,
|
|
1015
|
+
pauseCrossProjectFeeFreeInflows: false,
|
|
1011
1016
|
useDataHookForPay: true,
|
|
1012
1017
|
useDataHookForCashOut: true,
|
|
1013
1018
|
dataHook: metadata.dataHook,
|
package/src/DefifaHook.sol
CHANGED
|
@@ -596,6 +596,11 @@ contract DefifaHook is JB721Hook, Ownable, IDefifaHook {
|
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
|
|
599
|
+
// Cap count by the refund-adjusted pending reserves to prevent inflating totalMintCost
|
|
600
|
+
// from already-refunded mints whose reserve liability no longer exists.
|
|
601
|
+
uint256 adjusted = adjustedPendingReservesFor(tierId);
|
|
602
|
+
if (count > adjusted) count = adjusted;
|
|
603
|
+
|
|
599
604
|
// Record the minted reserves for the tier.
|
|
600
605
|
uint256[] memory tokenIds = hookStore.recordMintReservesFor({tierId: tierId, count: count});
|
|
601
606
|
|