@allbridge/bridge-core-sdk 3.23.0-beta.1 → 3.23.0-beta.3
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 +15 -8
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +4 -4
- package/dist/src/client/core-api/api-client-caching.js +1 -1
- package/dist/src/client/core-api/api-client-caching.js.map +1 -1
- package/dist/src/client/core-api/api-client.js +6 -0
- package/dist/src/client/core-api/api-client.js.map +1 -1
- package/dist/src/client/core-api/core-api-mapper.js +3 -0
- package/dist/src/client/core-api/core-api-mapper.js.map +1 -1
- package/dist/src/client/core-api/core-api.model.d.ts +8 -2
- package/dist/src/client/core-api/core-api.model.js +2 -0
- package/dist/src/client/core-api/core-api.model.js.map +1 -1
- package/dist/src/exceptions/exceptions.d.ts +4 -0
- package/dist/src/exceptions/exceptions.js +8 -1
- package/dist/src/exceptions/exceptions.js.map +1 -1
- package/dist/src/index.d.ts +10 -17
- package/dist/src/index.js +34 -26
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/index.d.ts +1 -0
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/services/bridge/evm/index.d.ts +3 -1
- package/dist/src/services/bridge/evm/index.js +46 -14
- package/dist/src/services/bridge/evm/index.js.map +1 -1
- package/dist/src/services/bridge/index.d.ts +1 -1
- package/dist/src/services/bridge/index.js +26 -19
- package/dist/src/services/bridge/index.js.map +1 -1
- package/dist/src/services/bridge/models/bridge.model.d.ts +4 -0
- package/dist/src/services/bridge/models/bridge.model.js.map +1 -1
- package/dist/src/services/bridge/sol/index.d.ts +2 -2
- package/dist/src/services/bridge/sol/index.js +7 -4
- package/dist/src/services/bridge/sol/index.js.map +1 -1
- package/dist/src/services/bridge/sui/index.js +2 -0
- package/dist/src/services/bridge/sui/index.js.map +1 -1
- package/dist/src/services/bridge/trx/index.d.ts +1 -1
- package/dist/src/services/bridge/trx/index.js +84 -53
- package/dist/src/services/bridge/trx/index.js.map +1 -1
- package/dist/src/services/bridge/utils.d.ts +2 -2
- package/dist/src/services/bridge/utils.js +64 -36
- package/dist/src/services/bridge/utils.js.map +1 -1
- package/dist/src/services/index.d.ts +13 -7
- package/dist/src/services/index.js +129 -48
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/models/abi/OftBridge.d.ts +386 -0
- package/dist/src/services/models/abi/OftBridge.js +500 -0
- package/dist/src/services/models/abi/OftBridge.js.map +1 -0
- package/dist/src/tokens-info/tokens-info.model.d.ts +14 -0
- package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
- package/dist/src/utils/evm/index.d.ts +40 -0
- package/dist/src/utils/evm/index.js +36 -0
- package/dist/src/utils/evm/index.js.map +1 -0
- package/dist/src/utils/index.d.ts +6 -0
- package/dist/src/utils/index.js +6 -0
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/sui/index.d.ts +28 -0
- package/dist/src/utils/sui/index.js +57 -0
- package/dist/src/utils/sui/index.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const artifact = {
|
|
4
|
+
abi: [
|
|
5
|
+
{
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
internalType: "uint256",
|
|
9
|
+
name: "chainId_",
|
|
10
|
+
type: "uint256",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
internalType: "uint256",
|
|
14
|
+
name: "chainPrecision_",
|
|
15
|
+
type: "uint256",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
internalType: "contract IGasOracle",
|
|
19
|
+
name: "gasOracle_",
|
|
20
|
+
type: "address",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
stateMutability: "nonpayable",
|
|
24
|
+
type: "constructor",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
inputs: [
|
|
28
|
+
{
|
|
29
|
+
internalType: "uint16",
|
|
30
|
+
name: "optionType",
|
|
31
|
+
type: "uint16",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
name: "InvalidOptionType",
|
|
35
|
+
type: "error",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
anonymous: false,
|
|
39
|
+
inputs: [
|
|
40
|
+
{
|
|
41
|
+
indexed: false,
|
|
42
|
+
internalType: "address",
|
|
43
|
+
name: "sender",
|
|
44
|
+
type: "address",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
indexed: false,
|
|
48
|
+
internalType: "bytes32",
|
|
49
|
+
name: "recipient",
|
|
50
|
+
type: "bytes32",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
indexed: false,
|
|
54
|
+
internalType: "address",
|
|
55
|
+
name: "tokenAddress",
|
|
56
|
+
type: "address",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
indexed: false,
|
|
60
|
+
internalType: "uint256",
|
|
61
|
+
name: "amount",
|
|
62
|
+
type: "uint256",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
indexed: false,
|
|
66
|
+
internalType: "uint256",
|
|
67
|
+
name: "destinationChainId",
|
|
68
|
+
type: "uint256",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
indexed: false,
|
|
72
|
+
internalType: "uint256",
|
|
73
|
+
name: "receivedRelayerFeeFromGas",
|
|
74
|
+
type: "uint256",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
indexed: false,
|
|
78
|
+
internalType: "uint256",
|
|
79
|
+
name: "receivedRelayerFeeFromTokens",
|
|
80
|
+
type: "uint256",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
indexed: false,
|
|
84
|
+
internalType: "uint256",
|
|
85
|
+
name: "relayerFeeWithExtraGas",
|
|
86
|
+
type: "uint256",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
indexed: false,
|
|
90
|
+
internalType: "uint256",
|
|
91
|
+
name: "receivedRelayerFeeTokenAmount",
|
|
92
|
+
type: "uint256",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
indexed: false,
|
|
96
|
+
internalType: "uint256",
|
|
97
|
+
name: "adminFeeTokenAmount",
|
|
98
|
+
type: "uint256",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
indexed: false,
|
|
102
|
+
internalType: "uint256",
|
|
103
|
+
name: "extraGasDestinationToken",
|
|
104
|
+
type: "uint256",
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
name: "OftTokensSent",
|
|
108
|
+
type: "event",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
anonymous: false,
|
|
112
|
+
inputs: [
|
|
113
|
+
{
|
|
114
|
+
indexed: true,
|
|
115
|
+
internalType: "address",
|
|
116
|
+
name: "previousOwner",
|
|
117
|
+
type: "address",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
indexed: true,
|
|
121
|
+
internalType: "address",
|
|
122
|
+
name: "newOwner",
|
|
123
|
+
type: "address",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
name: "OwnershipTransferred",
|
|
127
|
+
type: "event",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
anonymous: false,
|
|
131
|
+
inputs: [
|
|
132
|
+
{
|
|
133
|
+
indexed: false,
|
|
134
|
+
internalType: "address",
|
|
135
|
+
name: "sender",
|
|
136
|
+
type: "address",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
indexed: false,
|
|
140
|
+
internalType: "uint256",
|
|
141
|
+
name: "amount",
|
|
142
|
+
type: "uint256",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
name: "ReceivedGas",
|
|
146
|
+
type: "event",
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
stateMutability: "payable",
|
|
150
|
+
type: "fallback",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
inputs: [
|
|
154
|
+
{
|
|
155
|
+
internalType: "address",
|
|
156
|
+
name: "oft_",
|
|
157
|
+
type: "address",
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
name: "addToken",
|
|
161
|
+
outputs: [],
|
|
162
|
+
stateMutability: "nonpayable",
|
|
163
|
+
type: "function",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
inputs: [
|
|
167
|
+
{
|
|
168
|
+
internalType: "address",
|
|
169
|
+
name: "tokenAddress",
|
|
170
|
+
type: "address",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
name: "adminFeeShareBP",
|
|
174
|
+
outputs: [
|
|
175
|
+
{
|
|
176
|
+
internalType: "uint256",
|
|
177
|
+
name: "feeShare",
|
|
178
|
+
type: "uint256",
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
stateMutability: "view",
|
|
182
|
+
type: "function",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
inputs: [
|
|
186
|
+
{
|
|
187
|
+
internalType: "address",
|
|
188
|
+
name: "tokenAddress",
|
|
189
|
+
type: "address",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
internalType: "uint256",
|
|
193
|
+
name: "amount",
|
|
194
|
+
type: "uint256",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
internalType: "bytes32",
|
|
198
|
+
name: "recipient",
|
|
199
|
+
type: "bytes32",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
internalType: "uint256",
|
|
203
|
+
name: "destinationChainId",
|
|
204
|
+
type: "uint256",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
internalType: "uint256",
|
|
208
|
+
name: "relayerFeeTokenAmount",
|
|
209
|
+
type: "uint256",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
internalType: "uint256",
|
|
213
|
+
name: "extraGasInDestinationToken",
|
|
214
|
+
type: "uint256",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
internalType: "uint256",
|
|
218
|
+
name: "slippageBP",
|
|
219
|
+
type: "uint256",
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
name: "bridge",
|
|
223
|
+
outputs: [],
|
|
224
|
+
stateMutability: "payable",
|
|
225
|
+
type: "function",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
inputs: [],
|
|
229
|
+
name: "chainId",
|
|
230
|
+
outputs: [
|
|
231
|
+
{
|
|
232
|
+
internalType: "uint256",
|
|
233
|
+
name: "",
|
|
234
|
+
type: "uint256",
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
stateMutability: "view",
|
|
238
|
+
type: "function",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
inputs: [
|
|
242
|
+
{
|
|
243
|
+
internalType: "address",
|
|
244
|
+
name: "tokenAddress_",
|
|
245
|
+
type: "address",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
internalType: "uint256",
|
|
249
|
+
name: "destinationChainId_",
|
|
250
|
+
type: "uint256",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
internalType: "uint128",
|
|
254
|
+
name: "extraGasAmount_",
|
|
255
|
+
type: "uint128",
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
name: "extraGasPrice",
|
|
259
|
+
outputs: [
|
|
260
|
+
{
|
|
261
|
+
internalType: "uint256",
|
|
262
|
+
name: "",
|
|
263
|
+
type: "uint256",
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
stateMutability: "view",
|
|
267
|
+
type: "function",
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
inputs: [
|
|
271
|
+
{
|
|
272
|
+
internalType: "uint256",
|
|
273
|
+
name: "chainId_",
|
|
274
|
+
type: "uint256",
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
name: "getEidByChainId",
|
|
278
|
+
outputs: [
|
|
279
|
+
{
|
|
280
|
+
internalType: "uint32",
|
|
281
|
+
name: "",
|
|
282
|
+
type: "uint32",
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
stateMutability: "view",
|
|
286
|
+
type: "function",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
inputs: [
|
|
290
|
+
{
|
|
291
|
+
internalType: "address",
|
|
292
|
+
name: "tokenAddress",
|
|
293
|
+
type: "address",
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
name: "oftAddress",
|
|
297
|
+
outputs: [
|
|
298
|
+
{
|
|
299
|
+
internalType: "address",
|
|
300
|
+
name: "oftAddress",
|
|
301
|
+
type: "address",
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
stateMutability: "view",
|
|
305
|
+
type: "function",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
inputs: [],
|
|
309
|
+
name: "owner",
|
|
310
|
+
outputs: [
|
|
311
|
+
{
|
|
312
|
+
internalType: "address",
|
|
313
|
+
name: "",
|
|
314
|
+
type: "address",
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
stateMutability: "view",
|
|
318
|
+
type: "function",
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
inputs: [
|
|
322
|
+
{
|
|
323
|
+
internalType: "uint256",
|
|
324
|
+
name: "chainId_",
|
|
325
|
+
type: "uint256",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
internalType: "uint32",
|
|
329
|
+
name: "eid_",
|
|
330
|
+
type: "uint32",
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
internalType: "uint128",
|
|
334
|
+
name: "lzGasLimit_",
|
|
335
|
+
type: "uint128",
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
name: "registerBridgeDestination",
|
|
339
|
+
outputs: [],
|
|
340
|
+
stateMutability: "nonpayable",
|
|
341
|
+
type: "function",
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
inputs: [
|
|
345
|
+
{
|
|
346
|
+
internalType: "address",
|
|
347
|
+
name: "tokenAddress_",
|
|
348
|
+
type: "address",
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
internalType: "uint256",
|
|
352
|
+
name: "destinationChainId_",
|
|
353
|
+
type: "uint256",
|
|
354
|
+
},
|
|
355
|
+
],
|
|
356
|
+
name: "relayerFee",
|
|
357
|
+
outputs: [
|
|
358
|
+
{
|
|
359
|
+
internalType: "uint256",
|
|
360
|
+
name: "",
|
|
361
|
+
type: "uint256",
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
stateMutability: "view",
|
|
365
|
+
type: "function",
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
inputs: [
|
|
369
|
+
{
|
|
370
|
+
internalType: "address",
|
|
371
|
+
name: "oft_",
|
|
372
|
+
type: "address",
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
name: "removeToken",
|
|
376
|
+
outputs: [],
|
|
377
|
+
stateMutability: "nonpayable",
|
|
378
|
+
type: "function",
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
inputs: [],
|
|
382
|
+
name: "renounceOwnership",
|
|
383
|
+
outputs: [],
|
|
384
|
+
stateMutability: "nonpayable",
|
|
385
|
+
type: "function",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
inputs: [
|
|
389
|
+
{
|
|
390
|
+
internalType: "address",
|
|
391
|
+
name: "tokenAddress_",
|
|
392
|
+
type: "address",
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
internalType: "uint256",
|
|
396
|
+
name: "adminFeeShareBP_",
|
|
397
|
+
type: "uint256",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
name: "setAdminFeeShare",
|
|
401
|
+
outputs: [],
|
|
402
|
+
stateMutability: "nonpayable",
|
|
403
|
+
type: "function",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
inputs: [
|
|
407
|
+
{
|
|
408
|
+
internalType: "uint256",
|
|
409
|
+
name: "chainId_",
|
|
410
|
+
type: "uint256",
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
internalType: "uint128",
|
|
414
|
+
name: "lzGasLimit_",
|
|
415
|
+
type: "uint128",
|
|
416
|
+
},
|
|
417
|
+
],
|
|
418
|
+
name: "setLzGasLimit",
|
|
419
|
+
outputs: [],
|
|
420
|
+
stateMutability: "nonpayable",
|
|
421
|
+
type: "function",
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
inputs: [
|
|
425
|
+
{
|
|
426
|
+
internalType: "uint256",
|
|
427
|
+
name: "chainId_",
|
|
428
|
+
type: "uint256",
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
internalType: "uint256",
|
|
432
|
+
name: "maxExtraGas_",
|
|
433
|
+
type: "uint256",
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
name: "setMaxExtraGas",
|
|
437
|
+
outputs: [],
|
|
438
|
+
stateMutability: "nonpayable",
|
|
439
|
+
type: "function",
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
inputs: [
|
|
443
|
+
{
|
|
444
|
+
internalType: "address",
|
|
445
|
+
name: "newOwner",
|
|
446
|
+
type: "address",
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
name: "transferOwnership",
|
|
450
|
+
outputs: [],
|
|
451
|
+
stateMutability: "nonpayable",
|
|
452
|
+
type: "function",
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
inputs: [
|
|
456
|
+
{
|
|
457
|
+
internalType: "uint256",
|
|
458
|
+
name: "chainId_",
|
|
459
|
+
type: "uint256",
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
name: "unregisterBridgeDestination",
|
|
463
|
+
outputs: [],
|
|
464
|
+
stateMutability: "nonpayable",
|
|
465
|
+
type: "function",
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
inputs: [
|
|
469
|
+
{
|
|
470
|
+
internalType: "contract IERC20",
|
|
471
|
+
name: "token_",
|
|
472
|
+
type: "address",
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
name: "withdrawFeeInTokens",
|
|
476
|
+
outputs: [],
|
|
477
|
+
stateMutability: "nonpayable",
|
|
478
|
+
type: "function",
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
inputs: [
|
|
482
|
+
{
|
|
483
|
+
internalType: "uint256",
|
|
484
|
+
name: "amount_",
|
|
485
|
+
type: "uint256",
|
|
486
|
+
},
|
|
487
|
+
],
|
|
488
|
+
name: "withdrawGas",
|
|
489
|
+
outputs: [],
|
|
490
|
+
stateMutability: "nonpayable",
|
|
491
|
+
type: "function",
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
stateMutability: "payable",
|
|
495
|
+
type: "receive",
|
|
496
|
+
},
|
|
497
|
+
],
|
|
498
|
+
};
|
|
499
|
+
exports.default = artifact;
|
|
500
|
+
//# sourceMappingURL=OftBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OftBridge.js","sourceRoot":"","sources":["../../../../../src/services/models/abi/OftBridge.ts"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG;IACf,GAAG,EAAE;QACH;YACE,MAAM,EAAE;gBACN;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,YAAY,EAAE,qBAAqB;oBACnC,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,eAAe,EAAE,YAAY;YAC7B,IAAI,EAAE,aAAa;SACpB;QACD;Y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YACD,IAAI,EAAE,6BAA6B;YACnC,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,YAAY;YAC7B,IAAI,EAAE,UAAU;SACjB;QACD;YACE,MAAM,EAAE;gBACN;oBACE,YAAY,EAAE,iBAAiB;oBAC/B,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,IAAI,EAAE,qBAAqB;YAC3B,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,YAAY;YAC7B,IAAI,EAAE,UAAU;SACjB;QACD;YACE,MAAM,EAAE;gBACN;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,YAAY;YAC7B,IAAI,EAAE,UAAU;SACjB;QACD;YACE,eAAe,EAAE,SAAS;YAC1B,IAAI,EAAE,SAAS;SAChB;KACF;CACO,CAAC;AACX,kBAAe,QAAQ,CAAC","sourcesContent":["const artifact = {\n abi: [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"chainPrecision_\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IGasOracle\",\n name: \"gasOracle_\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"uint16\",\n name: \"optionType\",\n type: \"uint16\",\n },\n ],\n name: \"InvalidOptionType\",\n type: \"error\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"recipient\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"tokenAddress\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"destinationChainId\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"receivedRelayerFeeFromGas\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"receivedRelayerFeeFromTokens\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"relayerFeeWithExtraGas\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"receivedRelayerFeeTokenAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"adminFeeTokenAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"extraGasDestinationToken\",\n type: \"uint256\",\n },\n ],\n name: \"OftTokensSent\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"OwnershipTransferred\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"ReceivedGas\",\n type: \"event\",\n },\n {\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"oft_\",\n type: \"address\",\n },\n ],\n name: \"addToken\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress\",\n type: \"address\",\n },\n ],\n name: \"adminFeeShareBP\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"feeShare\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"recipient\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"destinationChainId\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"relayerFeeTokenAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"extraGasInDestinationToken\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"slippageBP\",\n type: \"uint256\",\n },\n ],\n name: \"bridge\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"chainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress_\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"destinationChainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint128\",\n name: \"extraGasAmount_\",\n type: \"uint128\",\n },\n ],\n name: \"extraGasPrice\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n ],\n name: \"getEidByChainId\",\n outputs: [\n {\n internalType: \"uint32\",\n name: \"\",\n type: \"uint32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress\",\n type: \"address\",\n },\n ],\n name: \"oftAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"oftAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint32\",\n name: \"eid_\",\n type: \"uint32\",\n },\n {\n internalType: \"uint128\",\n name: \"lzGasLimit_\",\n type: \"uint128\",\n },\n ],\n name: \"registerBridgeDestination\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress_\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"destinationChainId_\",\n type: \"uint256\",\n },\n ],\n name: \"relayerFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"oft_\",\n type: \"address\",\n },\n ],\n name: \"removeToken\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenAddress_\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"adminFeeShareBP_\",\n type: \"uint256\",\n },\n ],\n name: \"setAdminFeeShare\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint128\",\n name: \"lzGasLimit_\",\n type: \"uint128\",\n },\n ],\n name: \"setLzGasLimit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"maxExtraGas_\",\n type: \"uint256\",\n },\n ],\n name: \"setMaxExtraGas\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n ],\n name: \"unregisterBridgeDestination\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token_\",\n type: \"address\",\n },\n ],\n name: \"withdrawFeeInTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount_\",\n type: \"uint256\",\n },\n ],\n name: \"withdrawGas\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n ],\n} as const;\nexport default artifact;\n"]}
|
|
@@ -22,6 +22,11 @@ export interface ChainDetails extends BasicChainProperties {
|
|
|
22
22
|
* Bridge contract address
|
|
23
23
|
*/
|
|
24
24
|
bridgeAddress: string;
|
|
25
|
+
/**
|
|
26
|
+
* OFT Bridge contract address
|
|
27
|
+
* Optional. Defined if the chain supports OFT
|
|
28
|
+
*/
|
|
29
|
+
oftBridgeAddress?: string;
|
|
25
30
|
/**
|
|
26
31
|
* Average transfer time to other blockchains
|
|
27
32
|
*/
|
|
@@ -106,6 +111,15 @@ export interface Token {
|
|
|
106
111
|
* Optional. Defined if CCTP supported by token
|
|
107
112
|
*/
|
|
108
113
|
cctpV2FeeShare?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Internal identifier for the same token across different chains.
|
|
116
|
+
*
|
|
117
|
+
* Used to link representations of a token deployed on multiple networks (e.g., Ethereum, BSC).
|
|
118
|
+
* Tokens with the same `oftId` are considered to be equivalent.
|
|
119
|
+
*
|
|
120
|
+
* Optional. Defined if OFT supported by token
|
|
121
|
+
*/
|
|
122
|
+
oftId?: string;
|
|
109
123
|
/**
|
|
110
124
|
* Token fee share
|
|
111
125
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens-info.model.js","sourceRoot":"","sources":["../../../src/tokens-info/tokens-info.model.ts"],"names":[],"mappings":"","sourcesContent":["import { ChainSymbol } from \"../chains/chain.enums\";\nimport { BasicChainProperties } from \"../chains/models\";\nimport { Messenger } from \"../client/core-api/core-api.model\";\n\n/**\n * Type representing a map of blockchain chain symbols to their corresponding details, including token information.\n *\n * @typedef {Record<string, ChainDetailsWithTokens>} ChainDetailsMap\n * @property {string} chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @property {ChainDetailsWithTokens} chainDetails - The detailed information of the specified chain, including token information.\n */\nexport type ChainDetailsMap = Record<string, ChainDetailsWithTokens>;\n\nexport type ChainDetailsMapWithFlags = Record<string, ChainDetailsWithTokensWithFlags>;\n\n/**\n * Contains some blockchain details\n */\nexport interface ChainDetails extends BasicChainProperties {\n /**\n * Allbridge's Id\n */\n allbridgeChainId: number;\n /**\n * Bridge contract address\n */\n bridgeAddress: string;\n /**\n * Average transfer time to other blockchains\n */\n transferTime: TransferTime;\n /**\n * Transfers costs\n */\n txCostAmount: TxCostAmount;\n /**\n * Number of confirmations required\n */\n confirmations: number;\n /**\n * Sui addresses\n * Optional. Defined for SUI\n */\n suiAddresses?: SuiAddresses;\n}\n\n/**\n * Contains tokens list\n */\nexport interface ChainDetailsWithTokens extends ChainDetails {\n /**\n * Tokens\n */\n tokens: TokenWithChainDetails[];\n}\n\n/**\n * Contains tokens list\n */\nexport interface ChainDetailsWithTokensWithFlags extends ChainDetails {\n /**\n * Tokens\n */\n tokens: TokenWithChainDetailsWithFlags[];\n}\n\n/**\n * Contains token information\n */\nexport interface Token {\n /**\n * Token symbol\n */\n symbol: string;\n /**\n * Token name\n */\n name: string;\n /**\n * Token decimals\n */\n decimals: number;\n /**\n * Token pool address\n */\n poolAddress: string;\n /**\n * Token address\n */\n tokenAddress: string;\n /**\n * Token origin address\n */\n originTokenAddress?: string;\n /**\n * Token CCTP address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpAddress?: string;\n /**\n * Token CCTP V2 address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpFeeShare?: string;\n /**\n * Token CCTP address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpV2Address?: string;\n /**\n * Token CCTP V2 address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpV2FeeShare?: string;\n /**\n * Token fee share\n */\n feeShare: string;\n /**\n * @deprecated use {@link apr7d}</br>\n * Token APR\n */\n apr: string;\n /**\n * Token APR based on last 7 days\n */\n apr7d: string;\n /**\n * Token APR based on last 30 days\n */\n apr30d: string;\n /**\n * Token LP rate\n */\n lpRate: string;\n /**\n * Sui addresses\n * Optional. Defined for SUI\n */\n suiAddresses?: SuiAddresses;\n}\n\nexport interface SuiAddresses {\n bridgeAddress: string;\n bridgeAddressOrigin?: string;\n bridgeObjectAddress: string;\n\n allbridgeMessengerAddress: string;\n allbridgeMessengerAddressOrigin?: string;\n allbridgeMessengerObjectAddress: string;\n\n gasOracleAddress: string;\n gasOracleAddressOrigin?: string;\n gasOracleObjectAddress: string;\n\n utilsAddress: string;\n\n wormholeMessengerAddress: string;\n wormholeMessengerAddressOrigin?: string;\n wormholeMessengerObjectAddress: string;\n wormholeStateObjectAddress: string;\n\n cctpAddress: string;\n cctpAddressOrigin?: string;\n cctpObjectAddress: string;\n\n cctpDenyListObjectAddress: string;\n cctpMessageTransmitterStateObjectAddress: string;\n cctpTokenMessengerMinterStateObjectAddress: string;\n cctpTreasuryObjectAddress: string;\n}\n\n/**\n * General Token Interface\n */\nexport interface TokenWithChainDetails extends Token, Omit<ChainDetails, \"name\"> {\n /**\n * Blockchain network name\n */\n chainName: string;\n}\n\nexport interface TokenWithChainDetailsWithFlags extends TokenWithChainDetails {\n flags: { swap: boolean; pool: boolean };\n}\n\n/**\n * General Pool Interface\n */\nexport interface PoolInfo {\n /**\n * Pool A value\n */\n aValue: string;\n /**\n * Pool D value\n */\n dValue: string;\n /**\n * Pool token balance\n */\n tokenBalance: string;\n /**\n * Pool virtual USD balance\n */\n vUsdBalance: string;\n /**\n * Pool total liquidity amount\n */\n totalLpAmount: string;\n /**\n * Current accumulated reward per share shifted by P bits\n */\n accRewardPerShareP: string;\n /**\n * P value, needed for accRewardPerShareP\n */\n p: number;\n /**\n * Pool imbalance\n */\n imbalance: string;\n}\n\n/**\n * Type representing transfer times for various blockchain chains.\n *\n * @typedef {Record<string, MessengerTransferTime>} TransferTime\n * @property {chain} chainSymbol\n * @property {MessengerTransferTime} transferTime - The average transfer time details for the specified chain.\n */\nexport type TransferTime = {\n [chain in ChainSymbol]?: MessengerTransferTime;\n};\n\n/**\n * Contains Avg transaction time withing different messenger protocols\n */\nexport type MessengerTransferTime = {\n [messenger in Messenger]?: number;\n};\n\nexport interface PoolKeyObject {\n chainSymbol: string;\n poolAddress: string;\n}\n\n/**\n * Contains transfer costs\n */\nexport interface TxCostAmount {\n /**\n * The maximum gas amount that can be received as extra gas for one transfer\n */\n maxAmount: string;\n /**\n * Swap cost\n */\n swap: string;\n /**\n * Transfer cost\n */\n transfer: string;\n}\n\nexport type PoolInfoMap = Record<string, PoolInfo>;\n"]}
|
|
1
|
+
{"version":3,"file":"tokens-info.model.js","sourceRoot":"","sources":["../../../src/tokens-info/tokens-info.model.ts"],"names":[],"mappings":"","sourcesContent":["import { ChainSymbol } from \"../chains/chain.enums\";\nimport { BasicChainProperties } from \"../chains/models\";\nimport { Messenger } from \"../client/core-api/core-api.model\";\n\n/**\n * Type representing a map of blockchain chain symbols to their corresponding details, including token information.\n *\n * @typedef {Record<string, ChainDetailsWithTokens>} ChainDetailsMap\n * @property {string} chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @property {ChainDetailsWithTokens} chainDetails - The detailed information of the specified chain, including token information.\n */\nexport type ChainDetailsMap = Record<string, ChainDetailsWithTokens>;\n\nexport type ChainDetailsMapWithFlags = Record<string, ChainDetailsWithTokensWithFlags>;\n\n/**\n * Contains some blockchain details\n */\nexport interface ChainDetails extends BasicChainProperties {\n /**\n * Allbridge's Id\n */\n allbridgeChainId: number;\n /**\n * Bridge contract address\n */\n bridgeAddress: string;\n /**\n * OFT Bridge contract address\n * Optional. Defined if the chain supports OFT\n */\n oftBridgeAddress?: string;\n /**\n * Average transfer time to other blockchains\n */\n transferTime: TransferTime;\n /**\n * Transfers costs\n */\n txCostAmount: TxCostAmount;\n /**\n * Number of confirmations required\n */\n confirmations: number;\n /**\n * Sui addresses\n * Optional. Defined for SUI\n */\n suiAddresses?: SuiAddresses;\n}\n\n/**\n * Contains tokens list\n */\nexport interface ChainDetailsWithTokens extends ChainDetails {\n /**\n * Tokens\n */\n tokens: TokenWithChainDetails[];\n}\n\n/**\n * Contains tokens list\n */\nexport interface ChainDetailsWithTokensWithFlags extends ChainDetails {\n /**\n * Tokens\n */\n tokens: TokenWithChainDetailsWithFlags[];\n}\n\n/**\n * Contains token information\n */\nexport interface Token {\n /**\n * Token symbol\n */\n symbol: string;\n /**\n * Token name\n */\n name: string;\n /**\n * Token decimals\n */\n decimals: number;\n /**\n * Token pool address\n */\n poolAddress: string;\n /**\n * Token address\n */\n tokenAddress: string;\n /**\n * Token origin address\n */\n originTokenAddress?: string;\n /**\n * Token CCTP address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpAddress?: string;\n /**\n * Token CCTP V2 address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpFeeShare?: string;\n /**\n * Token CCTP address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpV2Address?: string;\n /**\n * Token CCTP V2 address</br>\n * Optional. Defined if CCTP supported by token\n */\n cctpV2FeeShare?: string;\n /**\n * Internal identifier for the same token across different chains.\n *\n * Used to link representations of a token deployed on multiple networks (e.g., Ethereum, BSC).\n * Tokens with the same `oftId` are considered to be equivalent.\n *\n * Optional. Defined if OFT supported by token\n */\n oftId?: string;\n /**\n * Token fee share\n */\n feeShare: string;\n /**\n * @deprecated use {@link apr7d}</br>\n * Token APR\n */\n apr: string;\n /**\n * Token APR based on last 7 days\n */\n apr7d: string;\n /**\n * Token APR based on last 30 days\n */\n apr30d: string;\n /**\n * Token LP rate\n */\n lpRate: string;\n /**\n * Sui addresses\n * Optional. Defined for SUI\n */\n suiAddresses?: SuiAddresses;\n}\n\nexport interface SuiAddresses {\n bridgeAddress: string;\n bridgeAddressOrigin?: string;\n bridgeObjectAddress: string;\n\n allbridgeMessengerAddress: string;\n allbridgeMessengerAddressOrigin?: string;\n allbridgeMessengerObjectAddress: string;\n\n gasOracleAddress: string;\n gasOracleAddressOrigin?: string;\n gasOracleObjectAddress: string;\n\n utilsAddress: string;\n\n wormholeMessengerAddress: string;\n wormholeMessengerAddressOrigin?: string;\n wormholeMessengerObjectAddress: string;\n wormholeStateObjectAddress: string;\n\n cctpAddress: string;\n cctpAddressOrigin?: string;\n cctpObjectAddress: string;\n\n cctpDenyListObjectAddress: string;\n cctpMessageTransmitterStateObjectAddress: string;\n cctpTokenMessengerMinterStateObjectAddress: string;\n cctpTreasuryObjectAddress: string;\n}\n\n/**\n * General Token Interface\n */\nexport interface TokenWithChainDetails extends Token, Omit<ChainDetails, \"name\"> {\n /**\n * Blockchain network name\n */\n chainName: string;\n}\n\nexport interface TokenWithChainDetailsWithFlags extends TokenWithChainDetails {\n flags: { swap: boolean; pool: boolean };\n}\n\n/**\n * General Pool Interface\n */\nexport interface PoolInfo {\n /**\n * Pool A value\n */\n aValue: string;\n /**\n * Pool D value\n */\n dValue: string;\n /**\n * Pool token balance\n */\n tokenBalance: string;\n /**\n * Pool virtual USD balance\n */\n vUsdBalance: string;\n /**\n * Pool total liquidity amount\n */\n totalLpAmount: string;\n /**\n * Current accumulated reward per share shifted by P bits\n */\n accRewardPerShareP: string;\n /**\n * P value, needed for accRewardPerShareP\n */\n p: number;\n /**\n * Pool imbalance\n */\n imbalance: string;\n}\n\n/**\n * Type representing transfer times for various blockchain chains.\n *\n * @typedef {Record<string, MessengerTransferTime>} TransferTime\n * @property {chain} chainSymbol\n * @property {MessengerTransferTime} transferTime - The average transfer time details for the specified chain.\n */\nexport type TransferTime = {\n [chain in ChainSymbol]?: MessengerTransferTime;\n};\n\n/**\n * Contains Avg transaction time withing different messenger protocols\n */\nexport type MessengerTransferTime = {\n [messenger in Messenger]?: number;\n};\n\nexport interface PoolKeyObject {\n chainSymbol: string;\n poolAddress: string;\n}\n\n/**\n * Contains transfer costs\n */\nexport interface TxCostAmount {\n /**\n * The maximum gas amount that can be received as extra gas for one transfer\n */\n maxAmount: string;\n /**\n * Swap cost\n */\n swap: string;\n /**\n * Transfer cost\n */\n transfer: string;\n}\n\nexport type PoolInfoMap = Record<string, PoolInfo>;\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AllbridgeCoreSdkOptions, Provider, RawTransaction } from "../../index";
|
|
2
|
+
import { NodeRpcUrlsConfig } from "../../services";
|
|
3
|
+
import { ApproveParams, CheckAllowanceParams, GetAllowanceParams } from "../../services/token/models";
|
|
4
|
+
/**
|
|
5
|
+
* Contains usefully EVM methods
|
|
6
|
+
*/
|
|
7
|
+
export interface EvmUtils {
|
|
8
|
+
/**
|
|
9
|
+
* Get amount of tokens approved to be sent by the bridge
|
|
10
|
+
* @param params - See {@link GetAllowanceParams}
|
|
11
|
+
* @param provider - optional, will be used to access the network
|
|
12
|
+
* @returns the amount of approved tokens
|
|
13
|
+
*/
|
|
14
|
+
getAllowance(params: GetAllowanceParams, provider?: Provider): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Check if the amount of approved tokens is enough to make a transfer
|
|
17
|
+
* @param params - See {@link CheckAllowanceParams}
|
|
18
|
+
* @param provider - optional, will be used to access the network
|
|
19
|
+
* @return true if the amount of approved tokens is enough to make a transfer
|
|
20
|
+
*/
|
|
21
|
+
checkAllowance(params: CheckAllowanceParams, provider?: Provider): Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* builds a raw transaction for approving token usage by the specified spender
|
|
24
|
+
* @param approveData - data for approval
|
|
25
|
+
* @param provider - optional, will be used to access the network
|
|
26
|
+
*
|
|
27
|
+
* @return a raw transaction for approving token usage
|
|
28
|
+
*/
|
|
29
|
+
buildRawTransactionApprove(approveData: ApproveParams, provider?: Provider): Promise<RawTransaction>;
|
|
30
|
+
}
|
|
31
|
+
export declare class DefaultEvmUtils implements EvmUtils {
|
|
32
|
+
readonly nodeRpcUrlsConfig: NodeRpcUrlsConfig;
|
|
33
|
+
readonly params: AllbridgeCoreSdkOptions;
|
|
34
|
+
private readonly api;
|
|
35
|
+
private readonly tokenService;
|
|
36
|
+
constructor(nodeRpcUrlsConfig: NodeRpcUrlsConfig, params: AllbridgeCoreSdkOptions);
|
|
37
|
+
buildRawTransactionApprove(approveData: ApproveParams, provider?: Provider): Promise<RawTransaction>;
|
|
38
|
+
checkAllowance(params: CheckAllowanceParams, provider?: Provider): Promise<boolean>;
|
|
39
|
+
getAllowance(params: GetAllowanceParams, provider?: Provider): Promise<string>;
|
|
40
|
+
}
|