@bananapus/721-hook-v6 0.0.7 → 0.0.9
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/README.md +32 -28
- package/SKILLS.md +120 -27
- package/package.json +5 -5
- package/src/JB721TiersHook.sol +37 -162
- package/src/JB721TiersHookStore.sol +8 -0
- package/src/abstract/JB721Hook.sol +264 -0
- package/src/interfaces/IJB721Hook.sol +21 -0
- package/src/interfaces/IJB721TiersHook.sol +2 -17
- package/src/interfaces/IJB721TiersHookStore.sol +7 -0
- package/src/libraries/JB721TiersHookLib.sol +21 -9
- package/src/structs/JB721TierConfig.sol +3 -1
- package/test/regression/L34_ReserveBeneficiaryOverwrite.t.sol +154 -0
- package/test/regression/L35_CacheTierLookup.t.sol +188 -0
- package/test/regression/L36_SplitNoBeneficiary.t.sol +146 -0
- package/test/unit/M6_TierSupplyCheck.t.sol +1 -1
- package/test/unit/pay_Unit.t.sol +1 -1
- package/test/unit/redeem_Unit.t.sol +4 -6
|
@@ -206,7 +206,7 @@ contract Test_cashOut_Unit is UnitTestSetup {
|
|
|
206
206
|
vm.assume(tokenCount > 0);
|
|
207
207
|
|
|
208
208
|
// Expect a revert on account of the token count being non-zero while the total supply is zero.
|
|
209
|
-
vm.expectRevert(abi.encodeWithSelector(
|
|
209
|
+
vm.expectRevert(abi.encodeWithSelector(JB721Hook.JB721Hook_UnexpectedTokenCashedOut.selector));
|
|
210
210
|
|
|
211
211
|
hook.beforeCashOutRecordedWith(
|
|
212
212
|
JBBeforeCashOutRecordedContext({
|
|
@@ -347,7 +347,7 @@ contract Test_cashOut_Unit is UnitTestSetup {
|
|
|
347
347
|
);
|
|
348
348
|
|
|
349
349
|
// Expect to revert on account of the project ID being incorrect.
|
|
350
|
-
vm.expectRevert(abi.encodeWithSelector(
|
|
350
|
+
vm.expectRevert(abi.encodeWithSelector(JB721Hook.JB721Hook_InvalidCashOut.selector));
|
|
351
351
|
|
|
352
352
|
vm.prank(mockTerminalAddress);
|
|
353
353
|
hook.afterCashOutRecordedWith(
|
|
@@ -382,7 +382,7 @@ contract Test_cashOut_Unit is UnitTestSetup {
|
|
|
382
382
|
);
|
|
383
383
|
|
|
384
384
|
// Expect to revert on account of the caller not being a terminal of the project.
|
|
385
|
-
vm.expectRevert(abi.encodeWithSelector(
|
|
385
|
+
vm.expectRevert(abi.encodeWithSelector(JB721Hook.JB721Hook_InvalidCashOut.selector));
|
|
386
386
|
|
|
387
387
|
vm.prank(mockTerminalAddress);
|
|
388
388
|
hook.afterCashOutRecordedWith(
|
|
@@ -434,9 +434,7 @@ contract Test_cashOut_Unit is UnitTestSetup {
|
|
|
434
434
|
abi.encode(true)
|
|
435
435
|
);
|
|
436
436
|
|
|
437
|
-
vm.expectRevert(
|
|
438
|
-
abi.encodeWithSelector(JB721TiersHook.JB721TiersHook_UnauthorizedToken.selector, tokenId, wrongHolder)
|
|
439
|
-
);
|
|
437
|
+
vm.expectRevert(abi.encodeWithSelector(JB721Hook.JB721Hook_UnauthorizedToken.selector, tokenId, wrongHolder));
|
|
440
438
|
|
|
441
439
|
vm.prank(mockTerminalAddress);
|
|
442
440
|
hook.afterCashOutRecordedWith(
|