@gearbox-protocol/sdk 13.2.0-next.1 → 13.2.1
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/dist/cjs/dev/AccountOpener.js +5 -45
- package/dist/cjs/dev/index.js +13 -0
- package/dist/cjs/dev/isTransientError.js +5 -1
- package/dist/cjs/dev/logSplitterTransport.js +154 -0
- package/dist/cjs/plugins/zappers/ZappersPlugin.js +144 -0
- package/dist/cjs/{sdk/market/ZapperRegister.js → plugins/zappers/extraZappers.js} +6 -110
- package/dist/cjs/plugins/zappers/index.js +26 -0
- package/dist/cjs/plugins/zappers/package.json +1 -0
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +104 -462
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +5 -16
- package/dist/cjs/sdk/base/ChainContractsRegister.js +1 -1
- package/dist/cjs/sdk/base/TokensMeta.js +32 -255
- package/dist/cjs/sdk/base/index.js +0 -2
- package/dist/cjs/sdk/chain/chains.js +1 -2
- package/dist/cjs/sdk/constants/index.js +2 -0
- package/dist/cjs/sdk/{base/token-types.js → constants/phantom-tokens.js} +3 -9
- package/dist/cjs/sdk/market/MarketRegister.js +2 -2
- package/dist/cjs/sdk/market/MarketSuite.js +0 -6
- package/dist/cjs/sdk/market/index.js +1 -3
- package/dist/cjs/sdk/market/pool/PoolSuite.js +0 -3
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +2 -17
- package/dist/cjs/sdk/market/pool/index.js +0 -4
- package/dist/cjs/sdk/pools/AbstractPoolService.js +137 -0
- package/dist/cjs/{abi/iStateSerializer.js → sdk/pools/PoolServiceV310.js} +8 -14
- package/dist/cjs/sdk/pools/createPoolService.js +35 -0
- package/dist/cjs/sdk/pools/index.js +4 -2
- package/dist/cjs/sdk/utils/AddressMap.js +1 -1
- package/dist/cjs/sdk/utils/viem/sendRawTx.js +0 -16
- package/dist/esm/dev/AccountOpener.js +6 -47
- package/dist/esm/dev/index.js +10 -0
- package/dist/esm/dev/isTransientError.js +5 -1
- package/dist/esm/dev/logSplitterTransport.js +131 -0
- package/dist/esm/plugins/zappers/ZappersPlugin.js +126 -0
- package/dist/esm/{sdk/market/ZapperRegister.js → plugins/zappers/extraZappers.js} +2 -109
- package/dist/esm/plugins/zappers/index.js +3 -0
- package/dist/esm/plugins/zappers/package.json +1 -0
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +104 -462
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +5 -16
- package/dist/esm/sdk/base/ChainContractsRegister.js +1 -1
- package/dist/esm/sdk/base/TokensMeta.js +32 -261
- package/dist/esm/sdk/base/index.js +0 -1
- package/dist/esm/sdk/chain/chains.js +1 -2
- package/dist/esm/sdk/constants/index.js +1 -0
- package/dist/esm/sdk/{base/token-types.js → constants/phantom-tokens.js} +0 -4
- package/dist/esm/sdk/market/MarketRegister.js +2 -2
- package/dist/esm/sdk/market/MarketSuite.js +0 -6
- package/dist/esm/sdk/market/index.js +0 -1
- package/dist/esm/sdk/market/pool/PoolSuite.js +0 -3
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +2 -17
- package/dist/esm/sdk/market/pool/index.js +0 -2
- package/dist/esm/sdk/pools/AbstractPoolService.js +113 -0
- package/dist/esm/sdk/pools/PoolServiceV310.js +6 -0
- package/dist/esm/sdk/pools/createPoolService.js +11 -0
- package/dist/esm/sdk/pools/index.js +2 -1
- package/dist/esm/sdk/utils/AddressMap.js +1 -1
- package/dist/esm/sdk/utils/viem/sendRawTx.js +1 -19
- package/dist/types/dev/index.d.ts +1 -0
- package/dist/types/dev/logSplitterTransport.d.ts +118 -0
- package/dist/types/plugins/zappers/ZappersPlugin.d.ts +18 -0
- package/dist/types/plugins/zappers/extraZappers.d.ts +6 -0
- package/dist/types/plugins/zappers/index.d.ts +3 -0
- package/dist/types/plugins/zappers/types.d.ts +12 -0
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +27 -123
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +8 -108
- package/dist/types/sdk/base/TokensMeta.d.ts +18 -34
- package/dist/types/sdk/base/index.d.ts +0 -1
- package/dist/types/sdk/base/types.d.ts +1 -0
- package/dist/types/sdk/chain/chains.d.ts +1 -1
- package/dist/types/sdk/constants/index.d.ts +1 -0
- package/dist/types/sdk/constants/phantom-tokens.d.ts +2 -0
- package/dist/types/sdk/market/MarketRegister.d.ts +2 -2
- package/dist/types/sdk/market/MarketSuite.d.ts +0 -3
- package/dist/types/sdk/market/credit/CreditFacadeV310BaseContract.d.ts +1 -1
- package/dist/types/sdk/market/index.d.ts +0 -1
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +0 -2
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +2 -6
- package/dist/types/sdk/market/pool/index.d.ts +0 -2
- package/dist/types/sdk/pools/AbstractPoolService.d.ts +9 -0
- package/dist/types/sdk/pools/PoolServiceV310.d.ts +4 -0
- package/dist/types/sdk/pools/createPoolService.d.ts +3 -0
- package/dist/types/sdk/pools/index.d.ts +2 -1
- package/dist/types/sdk/pools/types.d.ts +63 -84
- package/dist/types/sdk/utils/AddressMap.d.ts +1 -1
- package/dist/types/sdk/utils/viem/sendRawTx.d.ts +1 -5
- package/package.json +5 -3
- package/dist/cjs/abi/310/iSecuritizeDegenNFT.js +0 -263
- package/dist/cjs/abi/310/iSecuritizeKYCFactory.js +0 -278
- package/dist/cjs/sdk/market/pool/SecuritizeKYCFactory.js +0 -97
- package/dist/cjs/sdk/pools/PoolService.js +0 -391
- package/dist/esm/abi/310/iSecuritizeDegenNFT.js +0 -239
- package/dist/esm/abi/310/iSecuritizeKYCFactory.js +0 -254
- package/dist/esm/abi/iStateSerializer.js +0 -12
- package/dist/esm/sdk/market/pool/SecuritizeKYCFactory.js +0 -73
- package/dist/esm/sdk/pools/PoolService.js +0 -371
- package/dist/types/abi/310/iSecuritizeDegenNFT.d.ts +0 -324
- package/dist/types/abi/310/iSecuritizeKYCFactory.d.ts +0 -322
- package/dist/types/abi/iStateSerializer.d.ts +0 -11
- package/dist/types/sdk/base/token-types.d.ts +0 -33
- package/dist/types/sdk/market/ZapperRegister.d.ts +0 -17
- package/dist/types/sdk/market/pool/SecuritizeKYCFactory.d.ts +0 -345
- package/dist/types/sdk/market/types.d.ts +0 -10
- package/dist/types/sdk/pools/PoolService.d.ts +0 -14
- /package/dist/cjs/{sdk/market → plugins/zappers}/types.js +0 -0
- /package/dist/esm/{sdk/market → plugins/zappers}/types.js +0 -0
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var iSecuritizeDegenNFT_exports = {};
|
|
20
|
-
__export(iSecuritizeDegenNFT_exports, {
|
|
21
|
-
iSecuritizeDegenNFTAbi: () => iSecuritizeDegenNFTAbi
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(iSecuritizeDegenNFT_exports);
|
|
24
|
-
const iSecuritizeDegenNFTAbi = [
|
|
25
|
-
{
|
|
26
|
-
type: "function",
|
|
27
|
-
name: "addRegistrar",
|
|
28
|
-
inputs: [{ name: "registrar", type: "address", internalType: "address" }],
|
|
29
|
-
outputs: [],
|
|
30
|
-
stateMutability: "nonpayable"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: "function",
|
|
34
|
-
name: "burn",
|
|
35
|
-
inputs: [
|
|
36
|
-
{ name: "wallet", type: "address", internalType: "address" },
|
|
37
|
-
{ name: "", type: "uint256", internalType: "uint256" }
|
|
38
|
-
],
|
|
39
|
-
outputs: [],
|
|
40
|
-
stateMutability: "nonpayable"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
type: "function",
|
|
44
|
-
name: "contractType",
|
|
45
|
-
inputs: [],
|
|
46
|
-
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
47
|
-
stateMutability: "view"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
type: "function",
|
|
51
|
-
name: "getDSTokens",
|
|
52
|
-
inputs: [],
|
|
53
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
54
|
-
stateMutability: "view"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
type: "function",
|
|
58
|
-
name: "getFactory",
|
|
59
|
-
inputs: [],
|
|
60
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
61
|
-
stateMutability: "view"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: "function",
|
|
65
|
-
name: "getOperators",
|
|
66
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
67
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
68
|
-
stateMutability: "view"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: "function",
|
|
72
|
-
name: "getRegisteredTokens",
|
|
73
|
-
inputs: [
|
|
74
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
75
|
-
],
|
|
76
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
77
|
-
stateMutability: "view"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: "function",
|
|
81
|
-
name: "getRegistrar",
|
|
82
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
83
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
84
|
-
stateMutability: "view"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: "function",
|
|
88
|
-
name: "isDSToken",
|
|
89
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
90
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
91
|
-
stateMutability: "view"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: "function",
|
|
95
|
-
name: "isOperator",
|
|
96
|
-
inputs: [
|
|
97
|
-
{ name: "token", type: "address", internalType: "address" },
|
|
98
|
-
{ name: "operator", type: "address", internalType: "address" }
|
|
99
|
-
],
|
|
100
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
101
|
-
stateMutability: "view"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: "function",
|
|
105
|
-
name: "mint",
|
|
106
|
-
inputs: [{ name: "wallet", type: "address", internalType: "address" }],
|
|
107
|
-
outputs: [],
|
|
108
|
-
stateMutability: "nonpayable"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
type: "function",
|
|
112
|
-
name: "registerCreditAccount",
|
|
113
|
-
inputs: [
|
|
114
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
115
|
-
{ name: "tokens", type: "address[]", internalType: "address[]" }
|
|
116
|
-
],
|
|
117
|
-
outputs: [],
|
|
118
|
-
stateMutability: "nonpayable"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
type: "function",
|
|
122
|
-
name: "registerHelperAccount",
|
|
123
|
-
inputs: [
|
|
124
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
125
|
-
{ name: "helperAccount", type: "address", internalType: "address" },
|
|
126
|
-
{ name: "token", type: "address", internalType: "address" }
|
|
127
|
-
],
|
|
128
|
-
outputs: [],
|
|
129
|
-
stateMutability: "nonpayable"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
type: "function",
|
|
133
|
-
name: "serialize",
|
|
134
|
-
inputs: [],
|
|
135
|
-
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
136
|
-
stateMutability: "view"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
type: "function",
|
|
140
|
-
name: "setOperatorStatus",
|
|
141
|
-
inputs: [
|
|
142
|
-
{ name: "token", type: "address", internalType: "address" },
|
|
143
|
-
{ name: "operator", type: "address", internalType: "address" },
|
|
144
|
-
{ name: "approved", type: "bool", internalType: "bool" }
|
|
145
|
-
],
|
|
146
|
-
outputs: [],
|
|
147
|
-
stateMutability: "nonpayable"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
type: "function",
|
|
151
|
-
name: "version",
|
|
152
|
-
inputs: [],
|
|
153
|
-
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
154
|
-
stateMutability: "view"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
type: "event",
|
|
158
|
-
name: "Burn",
|
|
159
|
-
inputs: [
|
|
160
|
-
{
|
|
161
|
-
name: "wallet",
|
|
162
|
-
type: "address",
|
|
163
|
-
indexed: true,
|
|
164
|
-
internalType: "address"
|
|
165
|
-
}
|
|
166
|
-
],
|
|
167
|
-
anonymous: false
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
type: "event",
|
|
171
|
-
name: "Mint",
|
|
172
|
-
inputs: [
|
|
173
|
-
{
|
|
174
|
-
name: "wallet",
|
|
175
|
-
type: "address",
|
|
176
|
-
indexed: true,
|
|
177
|
-
internalType: "address"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
anonymous: false
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
type: "event",
|
|
184
|
-
name: "SetOperatorStatus",
|
|
185
|
-
inputs: [
|
|
186
|
-
{
|
|
187
|
-
name: "token",
|
|
188
|
-
type: "address",
|
|
189
|
-
indexed: true,
|
|
190
|
-
internalType: "address"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: "operator",
|
|
194
|
-
type: "address",
|
|
195
|
-
indexed: true,
|
|
196
|
-
internalType: "address"
|
|
197
|
-
},
|
|
198
|
-
{ name: "approved", type: "bool", indexed: false, internalType: "bool" }
|
|
199
|
-
],
|
|
200
|
-
anonymous: false
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
type: "event",
|
|
204
|
-
name: "SetRegistrar",
|
|
205
|
-
inputs: [
|
|
206
|
-
{
|
|
207
|
-
name: "token",
|
|
208
|
-
type: "address",
|
|
209
|
-
indexed: true,
|
|
210
|
-
internalType: "address"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
name: "registrar",
|
|
214
|
-
type: "address",
|
|
215
|
-
indexed: true,
|
|
216
|
-
internalType: "address"
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
anonymous: false
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
type: "error",
|
|
223
|
-
name: "CallerIsNotCreditFacadeException",
|
|
224
|
-
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
type: "error",
|
|
228
|
-
name: "CallerIsNotFactoryException",
|
|
229
|
-
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: "error",
|
|
233
|
-
name: "CallerIsNotInstanceOwnerException",
|
|
234
|
-
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
type: "error",
|
|
238
|
-
name: "CallerIsNotOperatorException",
|
|
239
|
-
inputs: [
|
|
240
|
-
{ name: "token", type: "address", internalType: "address" },
|
|
241
|
-
{ name: "caller", type: "address", internalType: "address" }
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
type: "error",
|
|
246
|
-
name: "RegistrarNotSetForTokenException",
|
|
247
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }]
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
type: "error",
|
|
251
|
-
name: "UnknownTokenException",
|
|
252
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }]
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
type: "error",
|
|
256
|
-
name: "UnknownWalletException",
|
|
257
|
-
inputs: [{ name: "wallet", type: "address", internalType: "address" }]
|
|
258
|
-
}
|
|
259
|
-
];
|
|
260
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
261
|
-
0 && (module.exports = {
|
|
262
|
-
iSecuritizeDegenNFTAbi
|
|
263
|
-
});
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var iSecuritizeKYCFactory_exports = {};
|
|
20
|
-
__export(iSecuritizeKYCFactory_exports, {
|
|
21
|
-
iSecuritizeKYCFactoryAbi: () => iSecuritizeKYCFactoryAbi
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(iSecuritizeKYCFactory_exports);
|
|
24
|
-
const iSecuritizeKYCFactoryAbi = [
|
|
25
|
-
{
|
|
26
|
-
type: "function",
|
|
27
|
-
name: "contractType",
|
|
28
|
-
inputs: [],
|
|
29
|
-
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
30
|
-
stateMutability: "view"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: "function",
|
|
34
|
-
name: "getCreditAccounts",
|
|
35
|
-
inputs: [{ name: "investor", type: "address", internalType: "address" }],
|
|
36
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
37
|
-
stateMutability: "view"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
type: "function",
|
|
41
|
-
name: "getDegenNFT",
|
|
42
|
-
inputs: [],
|
|
43
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
44
|
-
stateMutability: "view"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
type: "function",
|
|
48
|
-
name: "getInvestor",
|
|
49
|
-
inputs: [
|
|
50
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
51
|
-
],
|
|
52
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
53
|
-
stateMutability: "view"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: "function",
|
|
57
|
-
name: "getWallet",
|
|
58
|
-
inputs: [
|
|
59
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
60
|
-
],
|
|
61
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
62
|
-
stateMutability: "view"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: "function",
|
|
66
|
-
name: "isCreditAccount",
|
|
67
|
-
inputs: [
|
|
68
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
69
|
-
],
|
|
70
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
71
|
-
stateMutability: "view"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
type: "function",
|
|
75
|
-
name: "isFrozen",
|
|
76
|
-
inputs: [
|
|
77
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
78
|
-
],
|
|
79
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
80
|
-
stateMutability: "view"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: "function",
|
|
84
|
-
name: "multicall",
|
|
85
|
-
inputs: [
|
|
86
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
87
|
-
{
|
|
88
|
-
name: "calls",
|
|
89
|
-
type: "tuple[]",
|
|
90
|
-
internalType: "struct MultiCall[]",
|
|
91
|
-
components: [
|
|
92
|
-
{ name: "target", type: "address", internalType: "address" },
|
|
93
|
-
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "tokensToRegister",
|
|
98
|
-
type: "address[]",
|
|
99
|
-
internalType: "address[]"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
outputs: [],
|
|
103
|
-
stateMutability: "nonpayable"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
type: "function",
|
|
107
|
-
name: "openCreditAccount",
|
|
108
|
-
inputs: [
|
|
109
|
-
{ name: "creditManager", type: "address", internalType: "address" },
|
|
110
|
-
{
|
|
111
|
-
name: "calls",
|
|
112
|
-
type: "tuple[]",
|
|
113
|
-
internalType: "struct MultiCall[]",
|
|
114
|
-
components: [
|
|
115
|
-
{ name: "target", type: "address", internalType: "address" },
|
|
116
|
-
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: "tokensToRegister",
|
|
121
|
-
type: "address[]",
|
|
122
|
-
internalType: "address[]"
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
outputs: [
|
|
126
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
127
|
-
{ name: "wallet", type: "address", internalType: "address" }
|
|
128
|
-
],
|
|
129
|
-
stateMutability: "nonpayable"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
type: "function",
|
|
133
|
-
name: "precomputeWalletAddress",
|
|
134
|
-
inputs: [
|
|
135
|
-
{ name: "creditManager", type: "address", internalType: "address" },
|
|
136
|
-
{ name: "investor", type: "address", internalType: "address" }
|
|
137
|
-
],
|
|
138
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
139
|
-
stateMutability: "view"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
type: "function",
|
|
143
|
-
name: "serialize",
|
|
144
|
-
inputs: [],
|
|
145
|
-
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
146
|
-
stateMutability: "view"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
type: "function",
|
|
150
|
-
name: "setFrozenStatus",
|
|
151
|
-
inputs: [
|
|
152
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
153
|
-
{ name: "frozen", type: "bool", internalType: "bool" }
|
|
154
|
-
],
|
|
155
|
-
outputs: [],
|
|
156
|
-
stateMutability: "nonpayable"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
type: "function",
|
|
160
|
-
name: "setInvestor",
|
|
161
|
-
inputs: [
|
|
162
|
-
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
163
|
-
{ name: "investor", type: "address", internalType: "address" }
|
|
164
|
-
],
|
|
165
|
-
outputs: [],
|
|
166
|
-
stateMutability: "nonpayable"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
type: "function",
|
|
170
|
-
name: "version",
|
|
171
|
-
inputs: [],
|
|
172
|
-
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
173
|
-
stateMutability: "view"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
type: "event",
|
|
177
|
-
name: "CreateWallet",
|
|
178
|
-
inputs: [
|
|
179
|
-
{
|
|
180
|
-
name: "creditAccount",
|
|
181
|
-
type: "address",
|
|
182
|
-
indexed: true,
|
|
183
|
-
internalType: "address"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
name: "wallet",
|
|
187
|
-
type: "address",
|
|
188
|
-
indexed: true,
|
|
189
|
-
internalType: "address"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: "investor",
|
|
193
|
-
type: "address",
|
|
194
|
-
indexed: true,
|
|
195
|
-
internalType: "address"
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
anonymous: false
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
type: "event",
|
|
202
|
-
name: "SetFrozenStatus",
|
|
203
|
-
inputs: [
|
|
204
|
-
{
|
|
205
|
-
name: "creditAccount",
|
|
206
|
-
type: "address",
|
|
207
|
-
indexed: true,
|
|
208
|
-
internalType: "address"
|
|
209
|
-
},
|
|
210
|
-
{ name: "frozen", type: "bool", indexed: false, internalType: "bool" }
|
|
211
|
-
],
|
|
212
|
-
anonymous: false
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
type: "event",
|
|
216
|
-
name: "SetInvestor",
|
|
217
|
-
inputs: [
|
|
218
|
-
{
|
|
219
|
-
name: "creditAccount",
|
|
220
|
-
type: "address",
|
|
221
|
-
indexed: true,
|
|
222
|
-
internalType: "address"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: "oldInvestor",
|
|
226
|
-
type: "address",
|
|
227
|
-
indexed: true,
|
|
228
|
-
internalType: "address"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
name: "newInvestor",
|
|
232
|
-
type: "address",
|
|
233
|
-
indexed: true,
|
|
234
|
-
internalType: "address"
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
anonymous: false
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
type: "error",
|
|
241
|
-
name: "CallerIsNotInvestorException",
|
|
242
|
-
inputs: [
|
|
243
|
-
{ name: "caller", type: "address", internalType: "address" },
|
|
244
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
245
|
-
]
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
type: "error",
|
|
249
|
-
name: "FrozenCreditAccountException",
|
|
250
|
-
inputs: [
|
|
251
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
252
|
-
]
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
type: "error",
|
|
256
|
-
name: "InvalidCreditManagerException",
|
|
257
|
-
inputs: [
|
|
258
|
-
{ name: "creditManager", type: "address", internalType: "address" }
|
|
259
|
-
]
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: "error",
|
|
263
|
-
name: "InvalidUnderlyingTokenException",
|
|
264
|
-
inputs: [{ name: "underlying", type: "address", internalType: "address" }]
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
type: "error",
|
|
268
|
-
name: "UnknownCreditAccountException",
|
|
269
|
-
inputs: [
|
|
270
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
271
|
-
]
|
|
272
|
-
},
|
|
273
|
-
{ type: "error", name: "ZeroAddressException", inputs: [] }
|
|
274
|
-
];
|
|
275
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
276
|
-
0 && (module.exports = {
|
|
277
|
-
iSecuritizeKYCFactoryAbi
|
|
278
|
-
});
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SecuritizeKYCFactory_exports = {};
|
|
20
|
-
__export(SecuritizeKYCFactory_exports, {
|
|
21
|
-
SecuritizeKYCFactory: () => SecuritizeKYCFactory
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SecuritizeKYCFactory_exports);
|
|
24
|
-
var import_iSecuritizeDegenNFT = require("../../../abi/310/iSecuritizeDegenNFT.js");
|
|
25
|
-
var import_iSecuritizeKYCFactory = require("../../../abi/310/iSecuritizeKYCFactory.js");
|
|
26
|
-
var import_base = require("../../base/index.js");
|
|
27
|
-
var import__ = require("../../index.js");
|
|
28
|
-
const abi = import_iSecuritizeKYCFactory.iSecuritizeKYCFactoryAbi;
|
|
29
|
-
class SecuritizeKYCFactory extends import_base.BaseContract {
|
|
30
|
-
investorCache;
|
|
31
|
-
#degenNFT;
|
|
32
|
-
constructor(options, address) {
|
|
33
|
-
super(options, {
|
|
34
|
-
addr: address,
|
|
35
|
-
name: "SecuritizeKYCFactory",
|
|
36
|
-
abi
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
async precomputeWalletAddress(creditManager, investor) {
|
|
40
|
-
return this.contract.read.precomputeWalletAddress([
|
|
41
|
-
creditManager,
|
|
42
|
-
investor
|
|
43
|
-
]);
|
|
44
|
-
}
|
|
45
|
-
async getWallet(creditAccount) {
|
|
46
|
-
return this.contract.read.getWallet([creditAccount]);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Returns the investor address for a credit account.
|
|
50
|
-
* @param creditAccount - Credit account address
|
|
51
|
-
* @param fromCache - If true, use and update an in-memory cache (creditAccount -> investor). On cache miss, loads from contract and stores the result for future calls.
|
|
52
|
-
*/
|
|
53
|
-
async getInvestor(creditAccount, fromCache) {
|
|
54
|
-
if (fromCache && this.investorCache?.has(creditAccount)) {
|
|
55
|
-
return this.investorCache.get(creditAccount);
|
|
56
|
-
}
|
|
57
|
-
const investor = await this.contract.read.getInvestor([creditAccount]);
|
|
58
|
-
if (fromCache) {
|
|
59
|
-
if (!this.investorCache) {
|
|
60
|
-
this.investorCache = new import__.AddressMap();
|
|
61
|
-
}
|
|
62
|
-
this.investorCache.upsert(creditAccount, investor);
|
|
63
|
-
}
|
|
64
|
-
return investor;
|
|
65
|
-
}
|
|
66
|
-
async getDSTokens() {
|
|
67
|
-
const degenNFT = await this.getDegenNFT();
|
|
68
|
-
const tokens = await this.client.readContract({
|
|
69
|
-
address: degenNFT,
|
|
70
|
-
abi: import_iSecuritizeDegenNFT.iSecuritizeDegenNFTAbi,
|
|
71
|
-
functionName: "getDSTokens"
|
|
72
|
-
});
|
|
73
|
-
return [...tokens];
|
|
74
|
-
}
|
|
75
|
-
multicall(creditAccount, calls, tokensToRegister) {
|
|
76
|
-
return this.createRawTx({
|
|
77
|
-
functionName: "multicall",
|
|
78
|
-
args: [creditAccount, calls, tokensToRegister]
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
openCreditAccount(creditManager, calls, tokensToRegister) {
|
|
82
|
-
return this.createRawTx({
|
|
83
|
-
functionName: "openCreditAccount",
|
|
84
|
-
args: [creditManager, calls, tokensToRegister]
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
async getDegenNFT() {
|
|
88
|
-
if (!this.#degenNFT) {
|
|
89
|
-
this.#degenNFT = await this.contract.read.getDegenNFT();
|
|
90
|
-
}
|
|
91
|
-
return this.#degenNFT;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
-
0 && (module.exports = {
|
|
96
|
-
SecuritizeKYCFactory
|
|
97
|
-
});
|