@lombard.finance/sdk 3.1.0 → 3.2.0

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 (72) hide show
  1. package/README.md +59 -1
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +73 -62
  4. package/dist/index2.cjs +62 -52
  5. package/dist/index2.cjs.map +1 -1
  6. package/dist/index2.js +8680 -12363
  7. package/dist/index2.js.map +1 -1
  8. package/package.json +6 -6
  9. package/src/api-functions/generateDepositBtcAddress/generateDepositBtcAddress.ts +4 -4
  10. package/src/api-functions/getDepositBtcAddress/getDepositBtcAddress.stories.tsx +8 -0
  11. package/src/api-functions/getDepositBtcAddress/getDepositBtcAddress.ts +3 -3
  12. package/src/api-functions/getDepositsByAddress/getDepositsByAddress.ts +7 -7
  13. package/src/api-functions/getUnstakesByAddress/getUnstakesByAddress.ts +5 -5
  14. package/src/api-functions/getUserStakeAndBakeSignature/getUserStakeAndBakeSignature.stories.tsx +8 -0
  15. package/src/bridge/abi/CCIP_BRIDGE_ADAPTER_ABI.json +704 -0
  16. package/src/bridge/abi/OFT_BRIDGE_ADAPTER_ABI.json +912 -0
  17. package/src/bridge/index.ts +11 -0
  18. package/src/bridge/lib/bridge.stories.tsx +89 -0
  19. package/src/bridge/lib/bridge.ts +101 -0
  20. package/src/bridge/lib/ccip-bridge.stories.tsx +90 -0
  21. package/src/bridge/lib/ccip-bridge.ts +163 -0
  22. package/src/bridge/lib/config.ts +338 -0
  23. package/src/bridge/lib/oft-bridge.stories.tsx +89 -0
  24. package/src/bridge/lib/oft-bridge.ts +212 -0
  25. package/src/common/api-config.ts +8 -2
  26. package/src/common/blockchain-identifier.ts +32 -5
  27. package/src/common/chains.ts +13 -1
  28. package/src/common/contract-info.ts +8 -0
  29. package/src/contract-functions/approveLBTC/approveLBTC.stories.tsx +1 -1
  30. package/src/contract-functions/approveLBTC/approveLBTC.ts +3 -2
  31. package/src/contract-functions/claimLBTC/claimLBTC.ts +3 -2
  32. package/src/contract-functions/getBasculeDepositStatus/getBasculeDepositStatus.ts +10 -4
  33. package/src/contract-functions/getLBTCMintingFee/getLBTCMintingFee.tsx +14 -11
  34. package/src/contract-functions/getLBTCTotalSupply/getLBTCTotalSupply.ts +13 -9
  35. package/src/contract-functions/getPermitNonce/getPermitNonce.ts +16 -10
  36. package/src/contract-functions/getShareValue/getShareValue.stories.tsx +1 -1
  37. package/src/contract-functions/getShareValue/getShareValue.ts +1 -1
  38. package/src/contract-functions/getSharesByAddress/getSharesByAddress.stories.tsx +1 -1
  39. package/src/contract-functions/getSharesByAddress/getSharesByAddress.ts +1 -1
  40. package/src/contract-functions/getStakeAndBakeFee/getStakeAndBakeFee.stories.tsx +14 -1
  41. package/src/contract-functions/getStakeAndBakeFee/getStakeAndBakeFee.tsx +5 -1
  42. package/src/contract-functions/signNetworkFee/signNetworkFee.ts +3 -2
  43. package/src/contract-functions/signStakeAndBake/signStakeAndBake.stories.tsx +2 -1
  44. package/src/contract-functions/signStakeAndBake/signStakeAndBake.ts +8 -3
  45. package/src/contract-functions/unstakeLBTC/unstakeLBTC.ts +3 -2
  46. package/src/index.ts +26 -28
  47. package/src/metrics/get-lbtc-stats.stories.tsx +51 -0
  48. package/src/metrics/get-lbtc-stats.ts +38 -0
  49. package/src/tokens/abi/LBTC_ABI.json +1760 -1760
  50. package/src/tokens/abi/LBTC_ABI.ts +1761 -0
  51. package/src/tokens/lbtc-addresses.ts +1 -0
  52. package/src/tokens/token-addresses.ts +32 -0
  53. package/src/tokens/tokens.ts +59 -50
  54. package/src/utils/numbers.ts +3 -0
  55. package/src/vaults/index.ts +35 -176
  56. package/src/vaults/lib/config.ts +196 -0
  57. package/src/vaults/lib/metrics/get-vault-apy.stories.tsx +57 -0
  58. package/src/vaults/lib/metrics/get-vault-apy.ts +132 -0
  59. package/src/vaults/lib/{get-vault-points.stories.tsx → metrics/get-vault-points.stories.tsx} +8 -8
  60. package/src/vaults/lib/{get-vault-points.ts → metrics/get-vault-points.ts} +1 -1
  61. package/src/vaults/lib/metrics/get-vault-tvl.stories.tsx +57 -0
  62. package/src/vaults/lib/metrics/get-vault-tvl.ts +119 -0
  63. package/src/vaults/lib/{cancel-withdraw.stories.tsx → ops/cancel-withdraw.stories.tsx} +9 -9
  64. package/src/vaults/lib/{deposit.stories.tsx → ops/deposit.stories.tsx} +9 -9
  65. package/src/vaults/lib/{deposit.ts → ops/deposit.ts} +10 -10
  66. package/src/vaults/lib/{get-vault-deposits.stories.tsx → ops/get-vault-deposits.stories.tsx} +9 -9
  67. package/src/vaults/lib/{get-vault-deposits.ts → ops/get-vault-deposits.ts} +5 -5
  68. package/src/vaults/lib/{get-vault-withdrawals.stories.tsx → ops/get-vault-withdrawals.stories.tsx} +9 -9
  69. package/src/vaults/lib/{get-vault-withdrawals.ts → ops/get-vault-withdrawals.ts} +5 -5
  70. package/src/vaults/lib/{withdraw.stories.tsx → ops/withdraw.stories.tsx} +9 -9
  71. package/src/vaults/lib/{withdraw.ts → ops/withdraw.ts} +12 -12
  72. package/src/tokens/lbtc-contract.ts +0 -89
@@ -0,0 +1,912 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ { "internalType": "address", "name": "_token", "type": "address" },
5
+ { "internalType": "address", "name": "_lzEndpoint", "type": "address" },
6
+ { "internalType": "address", "name": "_owner", "type": "address" }
7
+ ],
8
+ "stateMutability": "nonpayable",
9
+ "type": "constructor"
10
+ },
11
+ {
12
+ "inputs": [
13
+ { "internalType": "address", "name": "target", "type": "address" }
14
+ ],
15
+ "name": "AddressEmptyCode",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [
20
+ { "internalType": "address", "name": "account", "type": "address" }
21
+ ],
22
+ "name": "AddressInsufficientBalance",
23
+ "type": "error"
24
+ },
25
+ { "inputs": [], "name": "FailedInnerCall", "type": "error" },
26
+ { "inputs": [], "name": "InvalidDelegate", "type": "error" },
27
+ { "inputs": [], "name": "InvalidEndpointCall", "type": "error" },
28
+ { "inputs": [], "name": "InvalidLocalDecimals", "type": "error" },
29
+ {
30
+ "inputs": [{ "internalType": "bytes", "name": "options", "type": "bytes" }],
31
+ "name": "InvalidOptions",
32
+ "type": "error"
33
+ },
34
+ { "inputs": [], "name": "LzTokenUnavailable", "type": "error" },
35
+ { "inputs": [], "name": "MalformedRateLimit", "type": "error" },
36
+ {
37
+ "inputs": [{ "internalType": "uint32", "name": "eid", "type": "uint32" }],
38
+ "name": "NoPeer",
39
+ "type": "error"
40
+ },
41
+ {
42
+ "inputs": [
43
+ { "internalType": "uint256", "name": "msgValue", "type": "uint256" }
44
+ ],
45
+ "name": "NotEnoughNative",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [
50
+ { "internalType": "address", "name": "addr", "type": "address" }
51
+ ],
52
+ "name": "OnlyEndpoint",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ { "internalType": "uint32", "name": "eid", "type": "uint32" },
58
+ { "internalType": "bytes32", "name": "sender", "type": "bytes32" }
59
+ ],
60
+ "name": "OnlyPeer",
61
+ "type": "error"
62
+ },
63
+ { "inputs": [], "name": "OnlySelf", "type": "error" },
64
+ {
65
+ "inputs": [
66
+ { "internalType": "address", "name": "owner", "type": "address" }
67
+ ],
68
+ "name": "OwnableInvalidOwner",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [
73
+ { "internalType": "address", "name": "account", "type": "address" }
74
+ ],
75
+ "name": "OwnableUnauthorizedAccount",
76
+ "type": "error"
77
+ },
78
+ { "inputs": [], "name": "RateLimitExceeded", "type": "error" },
79
+ {
80
+ "inputs": [
81
+ { "internalType": "address", "name": "token", "type": "address" }
82
+ ],
83
+ "name": "SafeERC20FailedOperation",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [{ "internalType": "bytes", "name": "result", "type": "bytes" }],
88
+ "name": "SimulationResult",
89
+ "type": "error"
90
+ },
91
+ {
92
+ "inputs": [
93
+ { "internalType": "uint256", "name": "amountLD", "type": "uint256" },
94
+ { "internalType": "uint256", "name": "minAmountLD", "type": "uint256" }
95
+ ],
96
+ "name": "SlippageExceeded",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "anonymous": false,
101
+ "inputs": [
102
+ {
103
+ "components": [
104
+ { "internalType": "uint32", "name": "eid", "type": "uint32" },
105
+ { "internalType": "uint16", "name": "msgType", "type": "uint16" },
106
+ { "internalType": "bytes", "name": "options", "type": "bytes" }
107
+ ],
108
+ "indexed": false,
109
+ "internalType": "struct EnforcedOptionParam[]",
110
+ "name": "_enforcedOptions",
111
+ "type": "tuple[]"
112
+ }
113
+ ],
114
+ "name": "EnforcedOptionSet",
115
+ "type": "event"
116
+ },
117
+ {
118
+ "anonymous": false,
119
+ "inputs": [
120
+ {
121
+ "indexed": false,
122
+ "internalType": "address",
123
+ "name": "inspector",
124
+ "type": "address"
125
+ }
126
+ ],
127
+ "name": "MsgInspectorSet",
128
+ "type": "event"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
133
+ {
134
+ "indexed": true,
135
+ "internalType": "bytes32",
136
+ "name": "guid",
137
+ "type": "bytes32"
138
+ },
139
+ {
140
+ "indexed": false,
141
+ "internalType": "uint32",
142
+ "name": "srcEid",
143
+ "type": "uint32"
144
+ },
145
+ {
146
+ "indexed": true,
147
+ "internalType": "address",
148
+ "name": "toAddress",
149
+ "type": "address"
150
+ },
151
+ {
152
+ "indexed": false,
153
+ "internalType": "uint256",
154
+ "name": "amountReceivedLD",
155
+ "type": "uint256"
156
+ }
157
+ ],
158
+ "name": "OFTReceived",
159
+ "type": "event"
160
+ },
161
+ {
162
+ "anonymous": false,
163
+ "inputs": [
164
+ {
165
+ "indexed": true,
166
+ "internalType": "bytes32",
167
+ "name": "guid",
168
+ "type": "bytes32"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "internalType": "uint32",
173
+ "name": "dstEid",
174
+ "type": "uint32"
175
+ },
176
+ {
177
+ "indexed": true,
178
+ "internalType": "address",
179
+ "name": "fromAddress",
180
+ "type": "address"
181
+ },
182
+ {
183
+ "indexed": false,
184
+ "internalType": "uint256",
185
+ "name": "amountSentLD",
186
+ "type": "uint256"
187
+ },
188
+ {
189
+ "indexed": false,
190
+ "internalType": "uint256",
191
+ "name": "amountReceivedLD",
192
+ "type": "uint256"
193
+ }
194
+ ],
195
+ "name": "OFTSent",
196
+ "type": "event"
197
+ },
198
+ {
199
+ "anonymous": false,
200
+ "inputs": [
201
+ {
202
+ "indexed": true,
203
+ "internalType": "address",
204
+ "name": "previousOwner",
205
+ "type": "address"
206
+ },
207
+ {
208
+ "indexed": true,
209
+ "internalType": "address",
210
+ "name": "newOwner",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "name": "OwnershipTransferred",
215
+ "type": "event"
216
+ },
217
+ {
218
+ "anonymous": false,
219
+ "inputs": [
220
+ {
221
+ "indexed": false,
222
+ "internalType": "uint32",
223
+ "name": "eid",
224
+ "type": "uint32"
225
+ },
226
+ {
227
+ "indexed": false,
228
+ "internalType": "bytes32",
229
+ "name": "peer",
230
+ "type": "bytes32"
231
+ }
232
+ ],
233
+ "name": "PeerSet",
234
+ "type": "event"
235
+ },
236
+ {
237
+ "anonymous": false,
238
+ "inputs": [
239
+ {
240
+ "indexed": false,
241
+ "internalType": "address",
242
+ "name": "preCrimeAddress",
243
+ "type": "address"
244
+ }
245
+ ],
246
+ "name": "PreCrimeSet",
247
+ "type": "event"
248
+ },
249
+ {
250
+ "anonymous": false,
251
+ "inputs": [
252
+ {
253
+ "components": [
254
+ { "internalType": "bytes32", "name": "chainId", "type": "bytes32" },
255
+ { "internalType": "uint256", "name": "limit", "type": "uint256" },
256
+ { "internalType": "uint256", "name": "window", "type": "uint256" }
257
+ ],
258
+ "indexed": false,
259
+ "internalType": "struct RateLimits.Config[]",
260
+ "name": "rateLimitConfigs",
261
+ "type": "tuple[]"
262
+ },
263
+ {
264
+ "indexed": false,
265
+ "internalType": "enum EfficientRateLimiter.RateLimitDirection",
266
+ "name": "direction",
267
+ "type": "uint8"
268
+ }
269
+ ],
270
+ "name": "RateLimitsChanged",
271
+ "type": "event"
272
+ },
273
+ {
274
+ "inputs": [],
275
+ "name": "SEND",
276
+ "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
277
+ "stateMutability": "view",
278
+ "type": "function"
279
+ },
280
+ {
281
+ "inputs": [],
282
+ "name": "SEND_AND_CALL",
283
+ "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
284
+ "stateMutability": "view",
285
+ "type": "function"
286
+ },
287
+ {
288
+ "inputs": [
289
+ {
290
+ "components": [
291
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" },
292
+ { "internalType": "bytes32", "name": "sender", "type": "bytes32" },
293
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
294
+ ],
295
+ "internalType": "struct Origin",
296
+ "name": "origin",
297
+ "type": "tuple"
298
+ }
299
+ ],
300
+ "name": "allowInitializePath",
301
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
302
+ "stateMutability": "view",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "inputs": [],
307
+ "name": "approvalRequired",
308
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
309
+ "stateMutability": "pure",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [
314
+ { "internalType": "uint32", "name": "_eid", "type": "uint32" },
315
+ { "internalType": "uint16", "name": "_msgType", "type": "uint16" },
316
+ { "internalType": "bytes", "name": "_extraOptions", "type": "bytes" }
317
+ ],
318
+ "name": "combineOptions",
319
+ "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "inputs": [],
325
+ "name": "decimalConversionRate",
326
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
327
+ "stateMutability": "view",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "inputs": [],
332
+ "name": "empty",
333
+ "outputs": [],
334
+ "stateMutability": "nonpayable",
335
+ "type": "function"
336
+ },
337
+ {
338
+ "inputs": [],
339
+ "name": "endpoint",
340
+ "outputs": [
341
+ {
342
+ "internalType": "contract ILayerZeroEndpointV2",
343
+ "name": "",
344
+ "type": "address"
345
+ }
346
+ ],
347
+ "stateMutability": "view",
348
+ "type": "function"
349
+ },
350
+ {
351
+ "inputs": [
352
+ { "internalType": "uint32", "name": "eid", "type": "uint32" },
353
+ { "internalType": "uint16", "name": "msgType", "type": "uint16" }
354
+ ],
355
+ "name": "enforcedOptions",
356
+ "outputs": [
357
+ { "internalType": "bytes", "name": "enforcedOption", "type": "bytes" }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [
364
+ { "internalType": "uint32", "name": "_srcEid", "type": "uint32" }
365
+ ],
366
+ "name": "getAmountCanBeReceived",
367
+ "outputs": [
368
+ {
369
+ "internalType": "uint256",
370
+ "name": "currentAmountInFlight",
371
+ "type": "uint256"
372
+ },
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "amountCanBeReceived",
376
+ "type": "uint256"
377
+ }
378
+ ],
379
+ "stateMutability": "view",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [
384
+ { "internalType": "uint32", "name": "_dstEid", "type": "uint32" }
385
+ ],
386
+ "name": "getAmountCanBeSent",
387
+ "outputs": [
388
+ {
389
+ "internalType": "uint256",
390
+ "name": "currentAmountInFlight",
391
+ "type": "uint256"
392
+ },
393
+ {
394
+ "internalType": "uint256",
395
+ "name": "amountCanBeSent",
396
+ "type": "uint256"
397
+ }
398
+ ],
399
+ "stateMutability": "view",
400
+ "type": "function"
401
+ },
402
+ {
403
+ "inputs": [
404
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" }
405
+ ],
406
+ "name": "inboundRateLimits",
407
+ "outputs": [
408
+ {
409
+ "internalType": "uint256",
410
+ "name": "amountInFlight",
411
+ "type": "uint256"
412
+ },
413
+ { "internalType": "uint256", "name": "lastUpdated", "type": "uint256" },
414
+ { "internalType": "uint256", "name": "limit", "type": "uint256" },
415
+ { "internalType": "uint256", "name": "window", "type": "uint256" }
416
+ ],
417
+ "stateMutability": "view",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "components": [
424
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" },
425
+ { "internalType": "bytes32", "name": "sender", "type": "bytes32" },
426
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
427
+ ],
428
+ "internalType": "struct Origin",
429
+ "name": "",
430
+ "type": "tuple"
431
+ },
432
+ { "internalType": "bytes", "name": "", "type": "bytes" },
433
+ { "internalType": "address", "name": "_sender", "type": "address" }
434
+ ],
435
+ "name": "isComposeMsgSender",
436
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
437
+ "stateMutability": "view",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [
442
+ { "internalType": "uint32", "name": "_eid", "type": "uint32" },
443
+ { "internalType": "bytes32", "name": "_peer", "type": "bytes32" }
444
+ ],
445
+ "name": "isPeer",
446
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
447
+ "stateMutability": "view",
448
+ "type": "function"
449
+ },
450
+ {
451
+ "inputs": [
452
+ {
453
+ "components": [
454
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" },
455
+ { "internalType": "bytes32", "name": "sender", "type": "bytes32" },
456
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
457
+ ],
458
+ "internalType": "struct Origin",
459
+ "name": "_origin",
460
+ "type": "tuple"
461
+ },
462
+ { "internalType": "bytes32", "name": "_guid", "type": "bytes32" },
463
+ { "internalType": "bytes", "name": "_message", "type": "bytes" },
464
+ { "internalType": "address", "name": "_executor", "type": "address" },
465
+ { "internalType": "bytes", "name": "_extraData", "type": "bytes" }
466
+ ],
467
+ "name": "lzReceive",
468
+ "outputs": [],
469
+ "stateMutability": "payable",
470
+ "type": "function"
471
+ },
472
+ {
473
+ "inputs": [
474
+ {
475
+ "components": [
476
+ {
477
+ "components": [
478
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" },
479
+ {
480
+ "internalType": "bytes32",
481
+ "name": "sender",
482
+ "type": "bytes32"
483
+ },
484
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
485
+ ],
486
+ "internalType": "struct Origin",
487
+ "name": "origin",
488
+ "type": "tuple"
489
+ },
490
+ { "internalType": "uint32", "name": "dstEid", "type": "uint32" },
491
+ { "internalType": "address", "name": "receiver", "type": "address" },
492
+ { "internalType": "bytes32", "name": "guid", "type": "bytes32" },
493
+ { "internalType": "uint256", "name": "value", "type": "uint256" },
494
+ { "internalType": "address", "name": "executor", "type": "address" },
495
+ { "internalType": "bytes", "name": "message", "type": "bytes" },
496
+ { "internalType": "bytes", "name": "extraData", "type": "bytes" }
497
+ ],
498
+ "internalType": "struct InboundPacket[]",
499
+ "name": "_packets",
500
+ "type": "tuple[]"
501
+ }
502
+ ],
503
+ "name": "lzReceiveAndRevert",
504
+ "outputs": [],
505
+ "stateMutability": "payable",
506
+ "type": "function"
507
+ },
508
+ {
509
+ "inputs": [
510
+ {
511
+ "components": [
512
+ { "internalType": "uint32", "name": "srcEid", "type": "uint32" },
513
+ { "internalType": "bytes32", "name": "sender", "type": "bytes32" },
514
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
515
+ ],
516
+ "internalType": "struct Origin",
517
+ "name": "_origin",
518
+ "type": "tuple"
519
+ },
520
+ { "internalType": "bytes32", "name": "_guid", "type": "bytes32" },
521
+ { "internalType": "bytes", "name": "_message", "type": "bytes" },
522
+ { "internalType": "address", "name": "_executor", "type": "address" },
523
+ { "internalType": "bytes", "name": "_extraData", "type": "bytes" }
524
+ ],
525
+ "name": "lzReceiveSimulate",
526
+ "outputs": [],
527
+ "stateMutability": "payable",
528
+ "type": "function"
529
+ },
530
+ {
531
+ "inputs": [],
532
+ "name": "msgInspector",
533
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
534
+ "stateMutability": "view",
535
+ "type": "function"
536
+ },
537
+ {
538
+ "inputs": [
539
+ { "internalType": "uint32", "name": "", "type": "uint32" },
540
+ { "internalType": "bytes32", "name": "", "type": "bytes32" }
541
+ ],
542
+ "name": "nextNonce",
543
+ "outputs": [
544
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" }
545
+ ],
546
+ "stateMutability": "view",
547
+ "type": "function"
548
+ },
549
+ {
550
+ "inputs": [],
551
+ "name": "oApp",
552
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
553
+ "stateMutability": "view",
554
+ "type": "function"
555
+ },
556
+ {
557
+ "inputs": [],
558
+ "name": "oAppVersion",
559
+ "outputs": [
560
+ { "internalType": "uint64", "name": "senderVersion", "type": "uint64" },
561
+ { "internalType": "uint64", "name": "receiverVersion", "type": "uint64" }
562
+ ],
563
+ "stateMutability": "pure",
564
+ "type": "function"
565
+ },
566
+ {
567
+ "inputs": [],
568
+ "name": "oftVersion",
569
+ "outputs": [
570
+ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" },
571
+ { "internalType": "uint64", "name": "version", "type": "uint64" }
572
+ ],
573
+ "stateMutability": "pure",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [
578
+ { "internalType": "uint32", "name": "dstEid", "type": "uint32" }
579
+ ],
580
+ "name": "outboundRateLimits",
581
+ "outputs": [
582
+ {
583
+ "internalType": "uint256",
584
+ "name": "amountInFlight",
585
+ "type": "uint256"
586
+ },
587
+ { "internalType": "uint256", "name": "lastUpdated", "type": "uint256" },
588
+ { "internalType": "uint256", "name": "limit", "type": "uint256" },
589
+ { "internalType": "uint256", "name": "window", "type": "uint256" }
590
+ ],
591
+ "stateMutability": "view",
592
+ "type": "function"
593
+ },
594
+ {
595
+ "inputs": [],
596
+ "name": "owner",
597
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
598
+ "stateMutability": "view",
599
+ "type": "function"
600
+ },
601
+ {
602
+ "inputs": [{ "internalType": "uint32", "name": "eid", "type": "uint32" }],
603
+ "name": "peers",
604
+ "outputs": [
605
+ { "internalType": "bytes32", "name": "peer", "type": "bytes32" }
606
+ ],
607
+ "stateMutability": "view",
608
+ "type": "function"
609
+ },
610
+ {
611
+ "inputs": [],
612
+ "name": "preCrime",
613
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
614
+ "stateMutability": "view",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [
619
+ {
620
+ "components": [
621
+ { "internalType": "uint32", "name": "dstEid", "type": "uint32" },
622
+ { "internalType": "bytes32", "name": "to", "type": "bytes32" },
623
+ { "internalType": "uint256", "name": "amountLD", "type": "uint256" },
624
+ {
625
+ "internalType": "uint256",
626
+ "name": "minAmountLD",
627
+ "type": "uint256"
628
+ },
629
+ { "internalType": "bytes", "name": "extraOptions", "type": "bytes" },
630
+ { "internalType": "bytes", "name": "composeMsg", "type": "bytes" },
631
+ { "internalType": "bytes", "name": "oftCmd", "type": "bytes" }
632
+ ],
633
+ "internalType": "struct SendParam",
634
+ "name": "_sendParam",
635
+ "type": "tuple"
636
+ }
637
+ ],
638
+ "name": "quoteOFT",
639
+ "outputs": [
640
+ {
641
+ "components": [
642
+ {
643
+ "internalType": "uint256",
644
+ "name": "minAmountLD",
645
+ "type": "uint256"
646
+ },
647
+ {
648
+ "internalType": "uint256",
649
+ "name": "maxAmountLD",
650
+ "type": "uint256"
651
+ }
652
+ ],
653
+ "internalType": "struct OFTLimit",
654
+ "name": "oftLimit",
655
+ "type": "tuple"
656
+ },
657
+ {
658
+ "components": [
659
+ { "internalType": "int256", "name": "feeAmountLD", "type": "int256" },
660
+ { "internalType": "string", "name": "description", "type": "string" }
661
+ ],
662
+ "internalType": "struct OFTFeeDetail[]",
663
+ "name": "oftFeeDetails",
664
+ "type": "tuple[]"
665
+ },
666
+ {
667
+ "components": [
668
+ {
669
+ "internalType": "uint256",
670
+ "name": "amountSentLD",
671
+ "type": "uint256"
672
+ },
673
+ {
674
+ "internalType": "uint256",
675
+ "name": "amountReceivedLD",
676
+ "type": "uint256"
677
+ }
678
+ ],
679
+ "internalType": "struct OFTReceipt",
680
+ "name": "oftReceipt",
681
+ "type": "tuple"
682
+ }
683
+ ],
684
+ "stateMutability": "view",
685
+ "type": "function"
686
+ },
687
+ {
688
+ "inputs": [
689
+ {
690
+ "components": [
691
+ { "internalType": "uint32", "name": "dstEid", "type": "uint32" },
692
+ { "internalType": "bytes32", "name": "to", "type": "bytes32" },
693
+ { "internalType": "uint256", "name": "amountLD", "type": "uint256" },
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "minAmountLD",
697
+ "type": "uint256"
698
+ },
699
+ { "internalType": "bytes", "name": "extraOptions", "type": "bytes" },
700
+ { "internalType": "bytes", "name": "composeMsg", "type": "bytes" },
701
+ { "internalType": "bytes", "name": "oftCmd", "type": "bytes" }
702
+ ],
703
+ "internalType": "struct SendParam",
704
+ "name": "_sendParam",
705
+ "type": "tuple"
706
+ },
707
+ { "internalType": "bool", "name": "_payInLzToken", "type": "bool" }
708
+ ],
709
+ "name": "quoteSend",
710
+ "outputs": [
711
+ {
712
+ "components": [
713
+ { "internalType": "uint256", "name": "nativeFee", "type": "uint256" },
714
+ { "internalType": "uint256", "name": "lzTokenFee", "type": "uint256" }
715
+ ],
716
+ "internalType": "struct MessagingFee",
717
+ "name": "msgFee",
718
+ "type": "tuple"
719
+ }
720
+ ],
721
+ "stateMutability": "view",
722
+ "type": "function"
723
+ },
724
+ {
725
+ "inputs": [],
726
+ "name": "renounceOwnership",
727
+ "outputs": [],
728
+ "stateMutability": "nonpayable",
729
+ "type": "function"
730
+ },
731
+ {
732
+ "inputs": [
733
+ {
734
+ "components": [
735
+ { "internalType": "uint32", "name": "dstEid", "type": "uint32" },
736
+ { "internalType": "bytes32", "name": "to", "type": "bytes32" },
737
+ { "internalType": "uint256", "name": "amountLD", "type": "uint256" },
738
+ {
739
+ "internalType": "uint256",
740
+ "name": "minAmountLD",
741
+ "type": "uint256"
742
+ },
743
+ { "internalType": "bytes", "name": "extraOptions", "type": "bytes" },
744
+ { "internalType": "bytes", "name": "composeMsg", "type": "bytes" },
745
+ { "internalType": "bytes", "name": "oftCmd", "type": "bytes" }
746
+ ],
747
+ "internalType": "struct SendParam",
748
+ "name": "_sendParam",
749
+ "type": "tuple"
750
+ },
751
+ {
752
+ "components": [
753
+ { "internalType": "uint256", "name": "nativeFee", "type": "uint256" },
754
+ { "internalType": "uint256", "name": "lzTokenFee", "type": "uint256" }
755
+ ],
756
+ "internalType": "struct MessagingFee",
757
+ "name": "_fee",
758
+ "type": "tuple"
759
+ },
760
+ { "internalType": "address", "name": "_refundAddress", "type": "address" }
761
+ ],
762
+ "name": "send",
763
+ "outputs": [
764
+ {
765
+ "components": [
766
+ { "internalType": "bytes32", "name": "guid", "type": "bytes32" },
767
+ { "internalType": "uint64", "name": "nonce", "type": "uint64" },
768
+ {
769
+ "components": [
770
+ {
771
+ "internalType": "uint256",
772
+ "name": "nativeFee",
773
+ "type": "uint256"
774
+ },
775
+ {
776
+ "internalType": "uint256",
777
+ "name": "lzTokenFee",
778
+ "type": "uint256"
779
+ }
780
+ ],
781
+ "internalType": "struct MessagingFee",
782
+ "name": "fee",
783
+ "type": "tuple"
784
+ }
785
+ ],
786
+ "internalType": "struct MessagingReceipt",
787
+ "name": "msgReceipt",
788
+ "type": "tuple"
789
+ },
790
+ {
791
+ "components": [
792
+ {
793
+ "internalType": "uint256",
794
+ "name": "amountSentLD",
795
+ "type": "uint256"
796
+ },
797
+ {
798
+ "internalType": "uint256",
799
+ "name": "amountReceivedLD",
800
+ "type": "uint256"
801
+ }
802
+ ],
803
+ "internalType": "struct OFTReceipt",
804
+ "name": "oftReceipt",
805
+ "type": "tuple"
806
+ }
807
+ ],
808
+ "stateMutability": "payable",
809
+ "type": "function"
810
+ },
811
+ {
812
+ "inputs": [
813
+ { "internalType": "address", "name": "_delegate", "type": "address" }
814
+ ],
815
+ "name": "setDelegate",
816
+ "outputs": [],
817
+ "stateMutability": "nonpayable",
818
+ "type": "function"
819
+ },
820
+ {
821
+ "inputs": [
822
+ {
823
+ "components": [
824
+ { "internalType": "uint32", "name": "eid", "type": "uint32" },
825
+ { "internalType": "uint16", "name": "msgType", "type": "uint16" },
826
+ { "internalType": "bytes", "name": "options", "type": "bytes" }
827
+ ],
828
+ "internalType": "struct EnforcedOptionParam[]",
829
+ "name": "_enforcedOptions",
830
+ "type": "tuple[]"
831
+ }
832
+ ],
833
+ "name": "setEnforcedOptions",
834
+ "outputs": [],
835
+ "stateMutability": "nonpayable",
836
+ "type": "function"
837
+ },
838
+ {
839
+ "inputs": [
840
+ { "internalType": "address", "name": "_msgInspector", "type": "address" }
841
+ ],
842
+ "name": "setMsgInspector",
843
+ "outputs": [],
844
+ "stateMutability": "nonpayable",
845
+ "type": "function"
846
+ },
847
+ {
848
+ "inputs": [
849
+ { "internalType": "uint32", "name": "_eid", "type": "uint32" },
850
+ { "internalType": "bytes32", "name": "_peer", "type": "bytes32" }
851
+ ],
852
+ "name": "setPeer",
853
+ "outputs": [],
854
+ "stateMutability": "nonpayable",
855
+ "type": "function"
856
+ },
857
+ {
858
+ "inputs": [
859
+ { "internalType": "address", "name": "_preCrime", "type": "address" }
860
+ ],
861
+ "name": "setPreCrime",
862
+ "outputs": [],
863
+ "stateMutability": "nonpayable",
864
+ "type": "function"
865
+ },
866
+ {
867
+ "inputs": [
868
+ {
869
+ "components": [
870
+ { "internalType": "bytes32", "name": "chainId", "type": "bytes32" },
871
+ { "internalType": "uint256", "name": "limit", "type": "uint256" },
872
+ { "internalType": "uint256", "name": "window", "type": "uint256" }
873
+ ],
874
+ "internalType": "struct RateLimits.Config[]",
875
+ "name": "_rateLimitConfigs",
876
+ "type": "tuple[]"
877
+ },
878
+ {
879
+ "internalType": "enum EfficientRateLimiter.RateLimitDirection",
880
+ "name": "direction",
881
+ "type": "uint8"
882
+ }
883
+ ],
884
+ "name": "setRateLimits",
885
+ "outputs": [],
886
+ "stateMutability": "nonpayable",
887
+ "type": "function"
888
+ },
889
+ {
890
+ "inputs": [],
891
+ "name": "sharedDecimals",
892
+ "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
893
+ "stateMutability": "view",
894
+ "type": "function"
895
+ },
896
+ {
897
+ "inputs": [],
898
+ "name": "token",
899
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
900
+ "stateMutability": "view",
901
+ "type": "function"
902
+ },
903
+ {
904
+ "inputs": [
905
+ { "internalType": "address", "name": "newOwner", "type": "address" }
906
+ ],
907
+ "name": "transferOwnership",
908
+ "outputs": [],
909
+ "stateMutability": "nonpayable",
910
+ "type": "function"
911
+ }
912
+ ]