@gearbox-protocol/sdk 14.5.7 → 14.5.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.
Files changed (22) hide show
  1. package/dist/cjs/abi/iDefaultAccountFactoryV3.js +194 -0
  2. package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeOnRamp.js +73 -0
  3. package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeOnRampAdapter.js +98 -0
  4. package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeRedemptionGateway.js +149 -0
  5. package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayAdapter.js +144 -0
  6. package/dist/cjs/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +4 -2
  7. package/dist/cjs/plugins/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.js +4 -2
  8. package/dist/esm/abi/iDefaultAccountFactoryV3.js +170 -0
  9. package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeOnRamp.js +49 -0
  10. package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeOnRampAdapter.js +74 -0
  11. package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeRedemptionGateway.js +125 -0
  12. package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayAdapter.js +120 -0
  13. package/dist/esm/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +4 -2
  14. package/dist/esm/plugins/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.js +4 -2
  15. package/dist/types/abi/iDefaultAccountFactoryV3.d.ts +177 -0
  16. package/dist/types/plugins/adapters/abi/securitize/iSecuritizeOnRamp.d.ts +67 -0
  17. package/dist/types/plugins/adapters/abi/securitize/iSecuritizeOnRampAdapter.d.ts +107 -0
  18. package/dist/types/plugins/adapters/abi/securitize/iSecuritizeRedemptionGateway.d.ts +183 -0
  19. package/dist/types/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayAdapter.d.ts +185 -0
  20. package/dist/types/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +174 -2
  21. package/dist/types/plugins/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +368 -2
  22. package/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ const iDefaultAccountFactoryV3Abi = [
2
+ {
3
+ type: "function",
4
+ name: "addCreditManager",
5
+ inputs: [
6
+ { name: "creditManager", type: "address", internalType: "address" }
7
+ ],
8
+ outputs: [],
9
+ stateMutability: "nonpayable"
10
+ },
11
+ {
12
+ type: "function",
13
+ name: "contractType",
14
+ inputs: [],
15
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
16
+ stateMutability: "view"
17
+ },
18
+ {
19
+ type: "function",
20
+ name: "delay",
21
+ inputs: [],
22
+ outputs: [{ name: "", type: "uint40", internalType: "uint40" }],
23
+ stateMutability: "view"
24
+ },
25
+ {
26
+ type: "function",
27
+ name: "rescue",
28
+ inputs: [
29
+ { name: "creditAccount", type: "address", internalType: "address" },
30
+ { name: "target", type: "address", internalType: "address" },
31
+ { name: "data", type: "bytes", internalType: "bytes" }
32
+ ],
33
+ outputs: [],
34
+ stateMutability: "nonpayable"
35
+ },
36
+ {
37
+ type: "function",
38
+ name: "returnCreditAccount",
39
+ inputs: [
40
+ { name: "creditAccount", type: "address", internalType: "address" }
41
+ ],
42
+ outputs: [],
43
+ stateMutability: "nonpayable"
44
+ },
45
+ {
46
+ type: "function",
47
+ name: "serialize",
48
+ inputs: [],
49
+ outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
50
+ stateMutability: "view"
51
+ },
52
+ {
53
+ type: "function",
54
+ name: "takeCreditAccount",
55
+ inputs: [
56
+ { name: "", type: "uint256", internalType: "uint256" },
57
+ { name: "", type: "uint256", internalType: "uint256" }
58
+ ],
59
+ outputs: [
60
+ { name: "creditAccount", type: "address", internalType: "address" }
61
+ ],
62
+ stateMutability: "nonpayable"
63
+ },
64
+ {
65
+ type: "function",
66
+ name: "version",
67
+ inputs: [],
68
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
69
+ stateMutability: "view"
70
+ },
71
+ {
72
+ type: "event",
73
+ name: "AddCreditManager",
74
+ inputs: [
75
+ {
76
+ name: "creditManager",
77
+ type: "address",
78
+ indexed: true,
79
+ internalType: "address"
80
+ },
81
+ {
82
+ name: "masterCreditAccount",
83
+ type: "address",
84
+ indexed: false,
85
+ internalType: "address"
86
+ }
87
+ ],
88
+ anonymous: false
89
+ },
90
+ {
91
+ type: "event",
92
+ name: "DeployCreditAccount",
93
+ inputs: [
94
+ {
95
+ name: "creditAccount",
96
+ type: "address",
97
+ indexed: true,
98
+ internalType: "address"
99
+ },
100
+ {
101
+ name: "creditManager",
102
+ type: "address",
103
+ indexed: true,
104
+ internalType: "address"
105
+ }
106
+ ],
107
+ anonymous: false
108
+ },
109
+ {
110
+ type: "event",
111
+ name: "Rescue",
112
+ inputs: [
113
+ {
114
+ name: "creditAccount",
115
+ type: "address",
116
+ indexed: true,
117
+ internalType: "address"
118
+ },
119
+ {
120
+ name: "target",
121
+ type: "address",
122
+ indexed: true,
123
+ internalType: "address"
124
+ },
125
+ { name: "data", type: "bytes", indexed: false, internalType: "bytes" }
126
+ ],
127
+ anonymous: false
128
+ },
129
+ {
130
+ type: "event",
131
+ name: "ReturnCreditAccount",
132
+ inputs: [
133
+ {
134
+ name: "creditAccount",
135
+ type: "address",
136
+ indexed: true,
137
+ internalType: "address"
138
+ },
139
+ {
140
+ name: "creditManager",
141
+ type: "address",
142
+ indexed: true,
143
+ internalType: "address"
144
+ }
145
+ ],
146
+ anonymous: false
147
+ },
148
+ {
149
+ type: "event",
150
+ name: "TakeCreditAccount",
151
+ inputs: [
152
+ {
153
+ name: "creditAccount",
154
+ type: "address",
155
+ indexed: true,
156
+ internalType: "address"
157
+ },
158
+ {
159
+ name: "creditManager",
160
+ type: "address",
161
+ indexed: true,
162
+ internalType: "address"
163
+ }
164
+ ],
165
+ anonymous: false
166
+ }
167
+ ];
168
+ export {
169
+ iDefaultAccountFactoryV3Abi
170
+ };
@@ -0,0 +1,49 @@
1
+ const iSecuritizeOnRampAbi = [
2
+ {
3
+ type: "function",
4
+ name: "calculateDsTokenAmount",
5
+ inputs: [
6
+ { name: "_liquidityAmount", type: "uint256", internalType: "uint256" }
7
+ ],
8
+ outputs: [
9
+ { name: "dsTokenAmount", type: "uint256", internalType: "uint256" },
10
+ { name: "rate", type: "uint256", internalType: "uint256" },
11
+ { name: "fee", type: "uint256", internalType: "uint256" }
12
+ ],
13
+ stateMutability: "view"
14
+ },
15
+ {
16
+ type: "function",
17
+ name: "dsToken",
18
+ inputs: [],
19
+ outputs: [{ name: "", type: "address", internalType: "address" }],
20
+ stateMutability: "view"
21
+ },
22
+ {
23
+ type: "function",
24
+ name: "liquidityToken",
25
+ inputs: [],
26
+ outputs: [{ name: "", type: "address", internalType: "address" }],
27
+ stateMutability: "view"
28
+ },
29
+ {
30
+ type: "function",
31
+ name: "navProvider",
32
+ inputs: [],
33
+ outputs: [{ name: "", type: "address", internalType: "address" }],
34
+ stateMutability: "view"
35
+ },
36
+ {
37
+ type: "function",
38
+ name: "swap",
39
+ inputs: [
40
+ { name: "_liquidityAmount", type: "uint256", internalType: "uint256" },
41
+ { name: "_minOutAmount", type: "uint256", internalType: "uint256" }
42
+ ],
43
+ outputs: [],
44
+ stateMutability: "nonpayable"
45
+ }
46
+ ];
47
+ export {
48
+ iSecuritizeOnRampAbi
49
+ };
@@ -0,0 +1,74 @@
1
+ const iSecuritizeOnRampAdapterAbi = [
2
+ {
3
+ type: "function",
4
+ name: "contractType",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
7
+ stateMutability: "view"
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "creditManager",
12
+ inputs: [],
13
+ outputs: [{ name: "", type: "address", internalType: "address" }],
14
+ stateMutability: "view"
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "dsToken",
19
+ inputs: [],
20
+ outputs: [{ name: "", type: "address", internalType: "address" }],
21
+ stateMutability: "view"
22
+ },
23
+ {
24
+ type: "function",
25
+ name: "liquidityToken",
26
+ inputs: [],
27
+ outputs: [{ name: "", type: "address", internalType: "address" }],
28
+ stateMutability: "view"
29
+ },
30
+ {
31
+ type: "function",
32
+ name: "serialize",
33
+ inputs: [],
34
+ outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
35
+ stateMutability: "view"
36
+ },
37
+ {
38
+ type: "function",
39
+ name: "swap",
40
+ inputs: [
41
+ { name: "liquidityAmount", type: "uint256", internalType: "uint256" },
42
+ { name: "minOutAmount", type: "uint256", internalType: "uint256" }
43
+ ],
44
+ outputs: [{ name: "success", type: "bool", internalType: "bool" }],
45
+ stateMutability: "nonpayable"
46
+ },
47
+ {
48
+ type: "function",
49
+ name: "swapDiff",
50
+ inputs: [
51
+ { name: "leftoverAmount", type: "uint256", internalType: "uint256" },
52
+ { name: "rateMinRAY", type: "uint256", internalType: "uint256" }
53
+ ],
54
+ outputs: [{ name: "success", type: "bool", internalType: "bool" }],
55
+ stateMutability: "nonpayable"
56
+ },
57
+ {
58
+ type: "function",
59
+ name: "targetContract",
60
+ inputs: [],
61
+ outputs: [{ name: "", type: "address", internalType: "address" }],
62
+ stateMutability: "view"
63
+ },
64
+ {
65
+ type: "function",
66
+ name: "version",
67
+ inputs: [],
68
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
69
+ stateMutability: "view"
70
+ }
71
+ ];
72
+ export {
73
+ iSecuritizeOnRampAdapterAbi
74
+ };
@@ -0,0 +1,125 @@
1
+ const iSecuritizeRedemptionGatewayAbi = [
2
+ {
3
+ type: "function",
4
+ name: "claim",
5
+ inputs: [
6
+ { name: "redeemers", type: "address[]", internalType: "address[]" }
7
+ ],
8
+ outputs: [],
9
+ stateMutability: "nonpayable"
10
+ },
11
+ {
12
+ type: "function",
13
+ name: "contractType",
14
+ inputs: [],
15
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
16
+ stateMutability: "view"
17
+ },
18
+ {
19
+ type: "function",
20
+ name: "dsToken",
21
+ inputs: [],
22
+ outputs: [{ name: "", type: "address", internalType: "address" }],
23
+ stateMutability: "view"
24
+ },
25
+ {
26
+ type: "function",
27
+ name: "getRedeemers",
28
+ inputs: [{ name: "account", type: "address", internalType: "address" }],
29
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
30
+ stateMutability: "view"
31
+ },
32
+ {
33
+ type: "function",
34
+ name: "getRedemptionAmount",
35
+ inputs: [{ name: "account", type: "address", internalType: "address" }],
36
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
37
+ stateMutability: "view"
38
+ },
39
+ {
40
+ type: "function",
41
+ name: "getUnclaimedRedeemers",
42
+ inputs: [{ name: "account", type: "address", internalType: "address" }],
43
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
44
+ stateMutability: "view"
45
+ },
46
+ {
47
+ type: "function",
48
+ name: "masterRedeemer",
49
+ inputs: [],
50
+ outputs: [{ name: "", type: "address", internalType: "address" }],
51
+ stateMutability: "view"
52
+ },
53
+ {
54
+ type: "function",
55
+ name: "navProvider",
56
+ inputs: [],
57
+ outputs: [{ name: "", type: "address", internalType: "address" }],
58
+ stateMutability: "view"
59
+ },
60
+ {
61
+ type: "function",
62
+ name: "redeem",
63
+ inputs: [
64
+ { name: "dsTokenAmount", type: "uint256", internalType: "uint256" }
65
+ ],
66
+ outputs: [],
67
+ stateMutability: "nonpayable"
68
+ },
69
+ {
70
+ type: "function",
71
+ name: "redemptionAccount",
72
+ inputs: [],
73
+ outputs: [{ name: "", type: "address", internalType: "address" }],
74
+ stateMutability: "view"
75
+ },
76
+ {
77
+ type: "function",
78
+ name: "securitizeWhitelister",
79
+ inputs: [],
80
+ outputs: [{ name: "", type: "address", internalType: "address" }],
81
+ stateMutability: "view"
82
+ },
83
+ {
84
+ type: "function",
85
+ name: "stableCoinToken",
86
+ inputs: [],
87
+ outputs: [{ name: "", type: "address", internalType: "address" }],
88
+ stateMutability: "view"
89
+ },
90
+ {
91
+ type: "function",
92
+ name: "transferMaster",
93
+ inputs: [],
94
+ outputs: [{ name: "", type: "address", internalType: "address" }],
95
+ stateMutability: "view"
96
+ },
97
+ {
98
+ type: "function",
99
+ name: "transferRedeemer",
100
+ inputs: [
101
+ { name: "redeemer", type: "address", internalType: "address" },
102
+ { name: "newAccount", type: "address", internalType: "address" }
103
+ ],
104
+ outputs: [],
105
+ stateMutability: "nonpayable"
106
+ },
107
+ {
108
+ type: "function",
109
+ name: "version",
110
+ inputs: [],
111
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
112
+ stateMutability: "view"
113
+ },
114
+ {
115
+ type: "error",
116
+ name: "MaxUnclaimedRedeemersPerAccountException",
117
+ inputs: []
118
+ },
119
+ { type: "error", name: "NewAccountNotRegisteredException", inputs: [] },
120
+ { type: "error", name: "RedeemerNotOwnedByAccountException", inputs: [] },
121
+ { type: "error", name: "RedeemerTransferNotAllowedException", inputs: [] }
122
+ ];
123
+ export {
124
+ iSecuritizeRedemptionGatewayAbi
125
+ };
@@ -0,0 +1,120 @@
1
+ const iSecuritizeRedemptionGatewayAdapterAbi = [
2
+ {
3
+ type: "function",
4
+ name: "claim",
5
+ inputs: [
6
+ { name: "redeemers", type: "address[]", internalType: "address[]" }
7
+ ],
8
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
9
+ stateMutability: "nonpayable"
10
+ },
11
+ {
12
+ type: "function",
13
+ name: "contractType",
14
+ inputs: [],
15
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
16
+ stateMutability: "view"
17
+ },
18
+ {
19
+ type: "function",
20
+ name: "creditManager",
21
+ inputs: [],
22
+ outputs: [{ name: "", type: "address", internalType: "address" }],
23
+ stateMutability: "view"
24
+ },
25
+ {
26
+ type: "function",
27
+ name: "depositPhantomToken",
28
+ inputs: [
29
+ { name: "token", type: "address", internalType: "address" },
30
+ { name: "amount", type: "uint256", internalType: "uint256" }
31
+ ],
32
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
33
+ stateMutability: "nonpayable"
34
+ },
35
+ {
36
+ type: "function",
37
+ name: "dsToken",
38
+ inputs: [],
39
+ outputs: [{ name: "", type: "address", internalType: "address" }],
40
+ stateMutability: "view"
41
+ },
42
+ {
43
+ type: "function",
44
+ name: "redeem",
45
+ inputs: [
46
+ { name: "dsTokenAmount", type: "uint256", internalType: "uint256" }
47
+ ],
48
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
49
+ stateMutability: "nonpayable"
50
+ },
51
+ {
52
+ type: "function",
53
+ name: "redeemDiff",
54
+ inputs: [
55
+ { name: "leftoverAmount", type: "uint256", internalType: "uint256" }
56
+ ],
57
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
58
+ stateMutability: "nonpayable"
59
+ },
60
+ {
61
+ type: "function",
62
+ name: "redemptionPhantomToken",
63
+ inputs: [],
64
+ outputs: [{ name: "", type: "address", internalType: "address" }],
65
+ stateMutability: "view"
66
+ },
67
+ {
68
+ type: "function",
69
+ name: "serialize",
70
+ inputs: [],
71
+ outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
72
+ stateMutability: "view"
73
+ },
74
+ {
75
+ type: "function",
76
+ name: "stableCoinToken",
77
+ inputs: [],
78
+ outputs: [{ name: "", type: "address", internalType: "address" }],
79
+ stateMutability: "view"
80
+ },
81
+ {
82
+ type: "function",
83
+ name: "targetContract",
84
+ inputs: [],
85
+ outputs: [{ name: "", type: "address", internalType: "address" }],
86
+ stateMutability: "view"
87
+ },
88
+ {
89
+ type: "function",
90
+ name: "transferRedeemer",
91
+ inputs: [
92
+ { name: "redeemer", type: "address", internalType: "address" },
93
+ { name: "newAccount", type: "address", internalType: "address" }
94
+ ],
95
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
96
+ stateMutability: "nonpayable"
97
+ },
98
+ {
99
+ type: "function",
100
+ name: "version",
101
+ inputs: [],
102
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
103
+ stateMutability: "view"
104
+ },
105
+ {
106
+ type: "function",
107
+ name: "withdrawPhantomToken",
108
+ inputs: [
109
+ { name: "token", type: "address", internalType: "address" },
110
+ { name: "amount", type: "uint256", internalType: "uint256" }
111
+ ],
112
+ outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
113
+ stateMutability: "nonpayable"
114
+ },
115
+ { type: "error", name: "IncorrectStakedPhantomTokenException", inputs: [] },
116
+ { type: "error", name: "InvalidRedemptionGatewayException", inputs: [] }
117
+ ];
118
+ export {
119
+ iSecuritizeRedemptionGatewayAdapterAbi
120
+ };
@@ -2,9 +2,11 @@ import { decodeAbiParameters } from "viem";
2
2
  import {
3
3
  MissingSerializedParamsError
4
4
  } from "../../../sdk/index.js";
5
+ import { iSecuritizeOnRampAbi } from "../abi/securitize/iSecuritizeOnRamp.js";
6
+ import { iSecuritizeOnRampAdapterAbi } from "../abi/securitize/iSecuritizeOnRampAdapter.js";
5
7
  import { AbstractAdapterContract } from "./AbstractAdapter.js";
6
- const abi = [];
7
- const protocolAbi = [];
8
+ const abi = iSecuritizeOnRampAdapterAbi;
9
+ const protocolAbi = iSecuritizeOnRampAbi;
8
10
  class SecuritizeOnRampAdapterContract extends AbstractAdapterContract {
9
11
  #dsToken;
10
12
  #liquidityToken;
@@ -2,9 +2,11 @@ import { decodeAbiParameters } from "viem";
2
2
  import {
3
3
  MissingSerializedParamsError
4
4
  } from "../../../sdk/index.js";
5
+ import { iSecuritizeRedemptionGatewayAbi } from "../abi/securitize/iSecuritizeRedemptionGateway.js";
6
+ import { iSecuritizeRedemptionGatewayAdapterAbi } from "../abi/securitize/iSecuritizeRedemptionGatewayAdapter.js";
5
7
  import { AbstractAdapterContract } from "./AbstractAdapter.js";
6
- const abi = [];
7
- const protocolAbi = [];
8
+ const abi = iSecuritizeRedemptionGatewayAdapterAbi;
9
+ const protocolAbi = iSecuritizeRedemptionGatewayAbi;
8
10
  class SecuritizeRedemptionGatewayAdapterContract extends AbstractAdapterContract {
9
11
  #dsToken;
10
12
  #stableCoinToken;