@bananapus/721-hook-v6 0.0.19 → 0.0.21

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 (55) hide show
  1. package/ADMINISTRATION.md +39 -29
  2. package/ARCHITECTURE.md +48 -5
  3. package/AUDIT_INSTRUCTIONS.md +85 -12
  4. package/CHANGE_LOG.md +15 -1
  5. package/README.md +211 -210
  6. package/RISKS.md +18 -1
  7. package/SKILLS.md +107 -37
  8. package/STYLE_GUIDE.md +2 -2
  9. package/USER_JOURNEYS.md +44 -19
  10. package/foundry.toml +1 -1
  11. package/package.json +5 -5
  12. package/script/Deploy.s.sol +1 -1
  13. package/script/helpers/Hook721DeploymentLib.sol +1 -1
  14. package/src/JB721TiersHook.sol +1 -1
  15. package/src/JB721TiersHookDeployer.sol +1 -1
  16. package/src/JB721TiersHookProjectDeployer.sol +1 -1
  17. package/src/JB721TiersHookStore.sol +12 -1
  18. package/src/abstract/ERC721.sol +1 -1
  19. package/src/abstract/JB721Hook.sol +3 -3
  20. package/src/libraries/JB721TiersHookLib.sol +17 -3
  21. package/test/721HookAttacks.t.sol +1 -1
  22. package/test/E2E/Pay_Mint_Redeem_E2E.t.sol +1 -1
  23. package/test/Fork.t.sol +1 -1
  24. package/test/TestAuditGaps.sol +1 -1
  25. package/test/TestSafeTransferReentrancy.t.sol +1 -1
  26. package/test/TestVotingUnitsLifecycle.t.sol +1 -1
  27. package/test/audit/AuditRegressions.t.sol +83 -0
  28. package/test/audit/CodexNemesis_CrossCurrencySplitNoPrices.t.sol +122 -0
  29. package/test/audit/USDTVoidReturnCompat.t.sol +301 -0
  30. package/test/fork/ERC20CashOutFork.t.sol +1 -1
  31. package/test/fork/ERC20TierSplitFork.t.sol +1 -1
  32. package/test/fork/IssueTokensForSplitsFork.t.sol +1 -1
  33. package/test/invariants/TierLifecycleInvariant.t.sol +1 -1
  34. package/test/invariants/TieredHookStoreInvariant.t.sol +1 -1
  35. package/test/invariants/handlers/TierLifecycleHandler.sol +1 -1
  36. package/test/invariants/handlers/TierStoreHandler.sol +1 -1
  37. package/test/regression/BrokenTerminalDoesNotDos.t.sol +1 -1
  38. package/test/regression/CacheTierLookup.t.sol +1 -1
  39. package/test/regression/ProjectDeployerRulesets.t.sol +1 -1
  40. package/test/regression/ReserveBeneficiaryOverwrite.t.sol +1 -1
  41. package/test/regression/SplitDistributionBugs.t.sol +1 -1
  42. package/test/regression/SplitNoBeneficiary.t.sol +1 -1
  43. package/test/unit/JB721TiersRulesetMetadataResolver.t.sol +1 -1
  44. package/test/unit/JBBitmap.t.sol +1 -1
  45. package/test/unit/JBIpfsDecoder.t.sol +1 -1
  46. package/test/unit/TierSupplyReserveCheck.t.sol +1 -1
  47. package/test/unit/adjustTier_Unit.t.sol +1 -1
  48. package/test/unit/deployer_Unit.t.sol +1 -1
  49. package/test/unit/getters_constructor_Unit.t.sol +4 -1
  50. package/test/unit/mintFor_mintReservesFor_Unit.t.sol +1 -1
  51. package/test/unit/pay_CrossCurrency_Unit.t.sol +1 -1
  52. package/test/unit/pay_Unit.t.sol +1 -1
  53. package/test/unit/redeem_Unit.t.sol +1 -1
  54. package/test/unit/splitHookDistribution_Unit.t.sol +1 -1
  55. package/test/unit/tierSplitRouting_Unit.t.sol +1 -1
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "forge-std/Test.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "forge-std/Test.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  import {CommonBase} from "forge-std/Base.sol";
5
5
  import {StdCheats} from "forge-std/StdCheats.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "forge-std/Test.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "forge-std/Test.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "forge-std/Test.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -193,6 +193,7 @@ contract Test_Getters_Constructor_Unit is UnitTestSetup {
193
193
  }
194
194
 
195
195
  function test_balanceOf_returnsCompleteBalance(uint256 numberOfTiers, address holder) public {
196
+ vm.assume(holder != address(0));
196
197
  numberOfTiers = bound(numberOfTiers, 0, 30);
197
198
 
198
199
  ForTest_JB721TiersHook hook = _initializeForTestHook(numberOfTiers);
@@ -330,6 +331,8 @@ contract Test_Getters_Constructor_Unit is UnitTestSetup {
330
331
  // Check: for each tier, does the tier's token URI match the theoretic hash?
331
332
  for (uint256 i = 1; i <= 10; i++) {
332
333
  uint256 tokenId = _generateTokenId(i, 1);
334
+ // Set an owner so the token existence check passes.
335
+ hook.ForTest_setOwnerOf(tokenId, beneficiary);
333
336
  assertEq(hook.tokenURI(tokenId), string(abi.encodePacked(baseUri, theoreticHashes[i - 1])));
334
337
  }
335
338
  }
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.26;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  // forge-lint: disable-next-line(unaliased-plain-import)
5
5
  import "../utils/UnitTestSetup.sol";