@bananapus/721-hook-v6 0.0.27 → 0.0.29

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": "@bananapus/721-hook-v6",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1084,8 +1084,9 @@ contract JB721TiersHookStore is IJB721TiersHookStore {
1084
1084
  // Initialize a `JBBitmapWord` for checking whether tiers have been removed.
1085
1085
  JBBitmapWord memory bitmapWord;
1086
1086
 
1087
- // Track total cost of tiers that can't be bought with credits (order-independent check).
1088
- uint256 restrictedCost;
1087
+ // Track total cost of tiers that can't be bought with credits.
1088
+ // Uses a local variable to reduce stack pressure for via_ir consumers.
1089
+ uint256 totalRestrictedCost;
1089
1090
 
1090
1091
  for (uint256 i; i < numberOfTiers; i++) {
1091
1092
  // Set the tier ID being iterated on.
@@ -1122,7 +1123,7 @@ contract JB721TiersHookStore is IJB721TiersHookStore {
1122
1123
  }
1123
1124
 
1124
1125
  // Accumulate cost of credit-restricted tiers.
1125
- if (cantBuyWithCredits) restrictedCost += price;
1126
+ if (cantBuyWithCredits) totalRestrictedCost += price;
1126
1127
 
1127
1128
  // Make sure the `amount` is greater than or equal to the tier's price.
1128
1129
  if (price > leftoverAmount) revert JB721TiersHookStore_PriceExceedsAmount(price, leftoverAmount);
@@ -1148,6 +1149,9 @@ contract JB721TiersHookStore is IJB721TiersHookStore {
1148
1149
  revert JB721TiersHookStore_InsufficientSupplyRemaining(tierId);
1149
1150
  }
1150
1151
  }
1152
+
1153
+ // Assign local to return variable.
1154
+ restrictedCost = totalRestrictedCost;
1151
1155
  }
1152
1156
 
1153
1157
  /// @notice Record reserve 721 minting for the provided tier ID on the provided 721 contract.