@bananapus/router-terminal-v6 0.0.50 → 0.0.52
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/router-terminal-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-router-terminal-v6'"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@bananapus/buyback-hook-v6": "^0.0.
|
|
28
|
-
"@bananapus/core-v6": "^0.0.
|
|
27
|
+
"@bananapus/buyback-hook-v6": "^0.0.55",
|
|
28
|
+
"@bananapus/core-v6": "^0.0.68",
|
|
29
29
|
"@bananapus/permission-ids-v6": "^0.0.27",
|
|
30
|
-
"@bananapus/univ4-router-v6": "^0.0.
|
|
30
|
+
"@bananapus/univ4-router-v6": "^0.0.40",
|
|
31
31
|
"@openzeppelin/contracts": "5.6.1",
|
|
32
32
|
"@uniswap/permit2": "github:Uniswap/permit2#cc56ad0f3439c502c246fc5cfcc3db92bb8b7219",
|
|
33
33
|
"@uniswap/v3-core": "github:Uniswap/v3-core#6562c52e8f75f0c10f9deaf44861847585fc8129",
|
package/src/JBRouterTerminal.sol
CHANGED
|
@@ -1078,7 +1078,7 @@ contract JBRouterTerminal is
|
|
|
1078
1078
|
|
|
1079
1079
|
try PERMIT2.permit({owner: sender, permitSingle: permitSingle, signature: allowance.signature}) {}
|
|
1080
1080
|
catch (bytes memory reason) {
|
|
1081
|
-
emit Permit2AllowanceFailed({token: token, owner: sender, reason: reason});
|
|
1081
|
+
emit Permit2AllowanceFailed({token: token, owner: sender, reason: reason, caller: sender});
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
@@ -735,7 +735,7 @@ contract JBRouterTerminalRegistry is IJBRouterTerminalRegistry, JBPermissioned,
|
|
|
735
735
|
try PERMIT2.permit({owner: _msgSender(), permitSingle: permitSingle, signature: allowance.signature}) {}
|
|
736
736
|
catch (bytes memory reason) {
|
|
737
737
|
// Emit a failure event so callers can surface the permit2 error reason.
|
|
738
|
-
emit Permit2AllowanceFailed({token: token, owner: _msgSender(), reason: reason});
|
|
738
|
+
emit Permit2AllowanceFailed({token: token, owner: _msgSender(), reason: reason, caller: _msgSender()});
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
|
|
@@ -8,6 +8,13 @@ import {PoolInfo} from "../structs/PoolInfo.sol";
|
|
|
8
8
|
|
|
9
9
|
/// @notice A terminal that routes payments by discovering what token a project accepts and converting automatically.
|
|
10
10
|
interface IJBRouterTerminal is IJBTerminal {
|
|
11
|
+
/// @notice A Permit2 allowance approval failed.
|
|
12
|
+
/// @param token The token the approval was attempted for.
|
|
13
|
+
/// @param owner The owner of the tokens.
|
|
14
|
+
/// @param reason The failure reason.
|
|
15
|
+
/// @param caller The address that called the terminal function.
|
|
16
|
+
event Permit2AllowanceFailed(address indexed token, address indexed owner, bytes reason, address caller);
|
|
17
|
+
|
|
11
18
|
/// @notice Discover the best pool across both V3 and V4 for a token pair.
|
|
12
19
|
/// @param normalizedTokenIn The input token (wrapped if native).
|
|
13
20
|
/// @param normalizedTokenOut The output token (wrapped if native).
|
|
@@ -42,7 +42,8 @@ interface IJBRouterTerminalRegistry is IJBTerminal, IJBForwardingTerminal, IJBPa
|
|
|
42
42
|
/// @param token The token the approval was attempted for.
|
|
43
43
|
/// @param owner The owner of the tokens.
|
|
44
44
|
/// @param reason The failure reason.
|
|
45
|
-
|
|
45
|
+
/// @param caller The address that called the terminal function.
|
|
46
|
+
event Permit2AllowanceFailed(address indexed token, address indexed owner, bytes reason, address caller);
|
|
46
47
|
|
|
47
48
|
/// @notice The default terminal used when a project has not set a specific terminal.
|
|
48
49
|
/// @dev Only applies to projects with ID > `defaultTerminalProjectIdThreshold`. Older projects resolve via
|