@ballkidz/defifa 0.0.21 → 0.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ballkidz/defifa",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=20.0.0"
@@ -13,13 +13,13 @@
13
13
  "url": "https://github.com/BallKidz/defifa-collection-deployer"
14
14
  },
15
15
  "dependencies": {
16
- "@bananapus/721-hook-v6": "^0.0.32",
17
- "@bananapus/core-v6": "^0.0.32",
18
- "@bananapus/permission-ids-v6": "^0.0.15",
19
- "@croptop/core-v6": "^0.0.31",
16
+ "@bananapus/721-hook-v6": "^0.0.35",
17
+ "@bananapus/core-v6": "^0.0.34",
18
+ "@bananapus/permission-ids-v6": "^0.0.17",
19
+ "@croptop/core-v6": "^0.0.33",
20
20
  "@openzeppelin/contracts": "^5.6.1",
21
21
  "@prb/math": "^4.1.1",
22
- "@rev-net/core-v6": "^0.0.29",
22
+ "@rev-net/core-v6": "^0.0.32",
23
23
  "scripty.sol": "^2.1.1"
24
24
  },
25
25
  "devDependencies": {
@@ -249,6 +249,7 @@ contract DefifaHook is JB721Hook, Ownable, IDefifaHook {
249
249
  /// @return cashOutTaxRate The cash out tax rate influencing the reclaim amount.
250
250
  /// @return cashOutCount The amount of tokens that should be considered cashed out.
251
251
  /// @return totalSupply The total amount of tokens that are considered to be existing.
252
+ /// @return effectiveSurplusValue The effective surplus value to use for the cash out.
252
253
  /// @return hookSpecifications The amount and data to send to cash out hooks (this contract) instead of returning to
253
254
  /// the beneficiary.
254
255
  function beforeCashOutRecordedWith(JBBeforeCashOutRecordedContext calldata context)
@@ -260,6 +261,7 @@ contract DefifaHook is JB721Hook, Ownable, IDefifaHook {
260
261
  uint256 cashOutTaxRate,
261
262
  uint256 cashOutCount,
262
263
  uint256 totalSupply,
264
+ uint256 effectiveSurplusValue,
263
265
  JBCashOutHookSpecification[] memory hookSpecifications
264
266
  )
265
267
  {
@@ -304,6 +306,9 @@ contract DefifaHook is JB721Hook, Ownable, IDefifaHook {
304
306
  // Use the surplus as the total supply.
305
307
  totalSupply = context.surplus.value;
306
308
 
309
+ // Use the surplus as the effective surplus value.
310
+ effectiveSurplusValue = context.surplus.value;
311
+
307
312
  // Use the cash out tax rate from the context.
308
313
  cashOutTaxRate = context.cashOutTaxRate;
309
314
  }