@sonarwatch/portfolio-plugins 0.14.145 → 0.14.152
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/CHANGELOG.md +2232 -2204
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/allbridge/constants.d.ts +0 -6
- package/src/plugins/allbridge/constants.js +1 -9
- package/src/plugins/allbridge/constants.js.map +1 -1
- package/src/plugins/allbridge/helpers.d.ts +1 -1
- package/src/plugins/allbridge/helpers.js +1 -3
- package/src/plugins/allbridge/helpers.js.map +1 -1
- package/src/plugins/allbridge/positionsFetcher.js +2 -1
- package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
- package/src/plugins/allbridge/structs.d.ts +13 -0
- package/src/plugins/allbridge/structs.js +14 -0
- package/src/plugins/allbridge/structs.js.map +1 -0
- package/src/plugins/allbridge/types.d.ts +0 -6
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/bonfida/constants.js +1 -1
- package/src/plugins/bonfida/constants.js.map +1 -1
- package/src/plugins/divvy/constants.d.ts +0 -2
- package/src/plugins/divvy/constants.js +1 -7
- package/src/plugins/divvy/constants.js.map +1 -1
- package/src/plugins/divvy/houseJob.js +6 -3
- package/src/plugins/divvy/houseJob.js.map +1 -1
- package/src/plugins/divvy/housePoolFetcher.js +9 -11
- package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
- package/src/plugins/divvy/stakingFetcher.js +7 -12
- package/src/plugins/divvy/stakingFetcher.js.map +1 -1
- package/src/plugins/divvy/structs.d.ts +57 -0
- package/src/plugins/divvy/structs.js +57 -0
- package/src/plugins/divvy/structs.js.map +1 -0
- package/src/plugins/elemental/constants.d.ts +4 -2
- package/src/plugins/elemental/constants.js +3 -7
- package/src/plugins/elemental/constants.js.map +1 -1
- package/src/plugins/elemental/filters.d.ts +0 -1
- package/src/plugins/elemental/filters.js +1 -6
- package/src/plugins/elemental/filters.js.map +1 -1
- package/src/plugins/elemental/helpers.js +2 -2
- package/src/plugins/elemental/helpers.js.map +1 -1
- package/src/plugins/elemental/poolsJob.js +4 -4
- package/src/plugins/elemental/poolsJob.js.map +1 -1
- package/src/plugins/ensofi/constants.d.ts +4 -2
- package/src/plugins/ensofi/constants.js +3 -7
- package/src/plugins/ensofi/constants.js.map +1 -1
- package/src/plugins/ensofi/idl.d.ts +149 -6
- package/src/plugins/ensofi/idl.js +1074 -61
- package/src/plugins/ensofi/idl.js.map +1 -1
- package/src/plugins/ensofi/solanaLoansFetcher.js +23 -37
- package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
- package/src/plugins/ensofi/structs.d.ts +58 -0
- package/src/plugins/ensofi/structs.js +60 -0
- package/src/plugins/ensofi/structs.js.map +1 -0
- package/src/plugins/jupiter/governance/constants.js +3 -3
- package/src/plugins/jupiter/governance/constants.js.map +1 -1
- package/src/plugins/jupiter/launchpad/constants.d.ts +1 -0
- package/src/plugins/jupiter/launchpad/constants.js +8 -7
- package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +2 -1
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +7 -7
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/orca/types.d.ts +2 -0
- package/src/plugins/picasso/constants.d.ts +0 -2
- package/src/plugins/picasso/constants.js +1 -7
- package/src/plugins/picasso/constants.js.map +1 -1
- package/src/plugins/picasso/helpers.js +7 -4
- package/src/plugins/picasso/helpers.js.map +1 -1
- package/src/plugins/picasso/structs.d.ts +39 -0
- package/src/plugins/picasso/structs.js +37 -0
- package/src/plugins/picasso/structs.js.map +1 -0
- package/src/plugins/picasso/unstakingNftsJob.js +2 -1
- package/src/plugins/picasso/unstakingNftsJob.js.map +1 -1
- package/src/plugins/picasso/unstakingPositionsFetcher.js +4 -4
- package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
- package/src/plugins/ratex/getPool.d.ts +1 -2
- package/src/plugins/ratex/getPool.js +4 -3
- package/src/plugins/ratex/getPool.js.map +1 -1
- package/src/plugins/ratex/helpers.d.ts +7 -4
- package/src/plugins/ratex/helpers.js +11 -31
- package/src/plugins/ratex/helpers.js.map +1 -1
- package/src/plugins/ratex/marketsJob.js +4 -9
- package/src/plugins/ratex/marketsJob.js.map +1 -1
- package/src/plugins/ratex/positionsFetcher.js +2 -2
- package/src/plugins/ratex/positionsFetcher.js.map +1 -1
- package/src/plugins/ratex/structs.d.ts +211 -0
- package/src/plugins/ratex/structs.js +203 -0
- package/src/plugins/ratex/structs.js.map +1 -0
- package/src/plugins/ratex/types.d.ts +5 -76
- package/src/plugins/raydium/ammV2ApiJob.js +24 -0
- package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
- package/src/plugins/raydium/constants.d.ts +1 -0
- package/src/plugins/raydium/constants.js +2 -1
- package/src/plugins/raydium/constants.js.map +1 -1
- package/src/plugins/raydium/getRaydiumCLMMPositions.js +9 -5
- package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
- package/src/plugins/raydium/types.d.ts +14 -4
- package/src/plugins/sanctum/s1AirdropFetcher.js +2 -2
- package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
- package/src/plugins/sharky/collectionsJob.js +8 -9
- package/src/plugins/sharky/collectionsJob.js.map +1 -1
- package/src/plugins/sharky/constants.d.ts +0 -2
- package/src/plugins/sharky/constants.js +1 -7
- package/src/plugins/sharky/constants.js.map +1 -1
- package/src/plugins/sharky/loansFetcher.js +25 -19
- package/src/plugins/sharky/loansFetcher.js.map +1 -1
- package/src/plugins/sharky/structs.d.ts +96 -0
- package/src/plugins/sharky/structs.js +103 -0
- package/src/plugins/sharky/structs.js.map +1 -0
- package/src/plugins/sharky/types.d.ts +0 -15
- package/src/plugins/sharky/types.js +0 -8
- package/src/plugins/sharky/types.js.map +1 -1
- package/src/plugins/stabble/constants.d.ts +0 -3
- package/src/plugins/stabble/constants.js +1 -13
- package/src/plugins/stabble/constants.js.map +1 -1
- package/src/plugins/stabble/poolsJob.js +14 -9
- package/src/plugins/stabble/poolsJob.js.map +1 -1
- package/src/plugins/stabble/structs.d.ts +43 -0
- package/src/plugins/stabble/structs.js +42 -0
- package/src/plugins/stabble/structs.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/constants.d.ts +0 -2
- package/src/plugins/zeta/constants.js +1 -7
- package/src/plugins/zeta/constants.js.map +1 -1
- package/src/plugins/zeta/stakingFetcher.js +6 -3
- package/src/plugins/zeta/stakingFetcher.js.map +1 -1
- package/src/plugins/zeta/structs.d.ts +24 -1
- package/src/plugins/zeta/structs.js +30 -1
- package/src/plugins/zeta/structs.js.map +1 -1
- package/src/plugins/zeta/types.d.ts +0 -26
- package/src/plugins/zeta/types.js +0 -7
- package/src/plugins/zeta/types.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/solana/beets/ParsedGpa.d.ts +1 -0
- package/src/utils/solana/beets/ParsedGpa.js +9 -0
- package/src/utils/solana/beets/ParsedGpa.js.map +1 -1
- package/src/plugins/divvy/types.d.ts +0 -28
- package/src/plugins/divvy/types.js +0 -3
- package/src/plugins/divvy/types.js.map +0 -1
- package/src/plugins/picasso/types.d.ts +0 -17
- package/src/plugins/picasso/types.js +0 -3
- package/src/plugins/picasso/types.js.map +0 -1
- package/src/plugins/ratex/idl.json +0 -8806
- package/src/plugins/sharky/filters.d.ts +0 -8
- package/src/plugins/sharky/filters.js +0 -43
- package/src/plugins/sharky/filters.js.map +0 -1
- package/src/plugins/stabble/filters.d.ts +0 -5
- package/src/plugins/stabble/filters.js +0 -20
- package/src/plugins/stabble/filters.js.map +0 -1
- package/src/plugins/stabble/types.d.ts +0 -40
- package/src/plugins/stabble/types.js +0 -3
- package/src/plugins/stabble/types.js.map +0 -1
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.ensofiIdl = void 0;
|
4
4
|
exports.ensofiIdl = {
|
5
|
-
version: '0.
|
5
|
+
version: '1.0.0',
|
6
6
|
name: 'enso_lending',
|
7
7
|
instructions: [
|
8
8
|
{
|
@@ -19,6 +19,7 @@ exports.ensofiIdl = {
|
|
19
19
|
{ name: 'duration', type: 'u64' },
|
20
20
|
{ name: 'lenderFeePercent', type: 'f64' },
|
21
21
|
{ name: 'borrowerFeePercent', type: 'f64' },
|
22
|
+
{ name: 'liquidationFeePercent', type: 'f64' },
|
22
23
|
],
|
23
24
|
},
|
24
25
|
{
|
@@ -35,6 +36,7 @@ exports.ensofiIdl = {
|
|
35
36
|
{ name: 'duration', type: { option: 'u64' } },
|
36
37
|
{ name: 'lenderFeePercent', type: { option: 'f64' } },
|
37
38
|
{ name: 'borrowerFeePercent', type: { option: 'f64' } },
|
39
|
+
{ name: 'liquidationFeePercent', type: { option: 'f64' } },
|
38
40
|
],
|
39
41
|
},
|
40
42
|
{
|
@@ -61,6 +63,8 @@ exports.ensofiIdl = {
|
|
61
63
|
{ name: 'isCollateral', type: 'bool' },
|
62
64
|
{ name: 'priceFeedId', type: 'string' },
|
63
65
|
{ name: 'maxPriceAgeSeconds', type: 'u64' },
|
66
|
+
{ name: 'tokenAddress', type: { option: { array: ['u8', 32] } } },
|
67
|
+
{ name: 'chainId', type: 'u16' },
|
64
68
|
],
|
65
69
|
},
|
66
70
|
{
|
@@ -82,13 +86,27 @@ exports.ensofiIdl = {
|
|
82
86
|
{ name: 'isCollateral', type: { option: 'bool' } },
|
83
87
|
{ name: 'priceFeedId', type: { option: 'string' } },
|
84
88
|
{ name: 'maxPriceAgeSeconds', type: { option: 'u64' } },
|
89
|
+
{ name: 'tokenAddress', type: { option: { array: ['u8', 32] } } },
|
85
90
|
],
|
86
91
|
},
|
92
|
+
{
|
93
|
+
name: 'closeAsset',
|
94
|
+
accounts: [
|
95
|
+
{ name: 'owner', isMut: true, isSigner: true },
|
96
|
+
{ name: 'tokenMint', isMut: false, isSigner: false },
|
97
|
+
{ name: 'asset', isMut: true, isSigner: false },
|
98
|
+
],
|
99
|
+
args: [],
|
100
|
+
},
|
87
101
|
{
|
88
102
|
name: 'initVaultAuthority',
|
89
103
|
accounts: [
|
90
104
|
{ name: 'borrower', isMut: true, isSigner: true },
|
91
105
|
{ name: 'vaultAuthority', isMut: true, isSigner: false },
|
106
|
+
{ name: 'mint', isMut: false, isSigner: false },
|
107
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
108
|
+
{ name: 'associatedTokenProgram', isMut: false, isSigner: false },
|
109
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
92
110
|
{ name: 'systemProgram', isMut: false, isSigner: false },
|
93
111
|
],
|
94
112
|
args: [],
|
@@ -109,7 +127,7 @@ exports.ensofiIdl = {
|
|
109
127
|
args: [
|
110
128
|
{ name: 'offerId', type: 'string' },
|
111
129
|
{ name: 'tierId', type: 'string' },
|
112
|
-
{ name: 'interest', type: '
|
130
|
+
{ name: 'interest', type: 'u16' },
|
113
131
|
],
|
114
132
|
},
|
115
133
|
{
|
@@ -120,7 +138,7 @@ exports.ensofiIdl = {
|
|
120
138
|
],
|
121
139
|
args: [
|
122
140
|
{ name: 'offerId', type: 'string' },
|
123
|
-
{ name: 'interest', type: '
|
141
|
+
{ name: 'interest', type: 'u16' },
|
124
142
|
],
|
125
143
|
},
|
126
144
|
{
|
@@ -174,7 +192,7 @@ exports.ensofiIdl = {
|
|
174
192
|
{ name: 'lendOfferId', type: 'string' },
|
175
193
|
{ name: 'tierId', type: 'string' },
|
176
194
|
{ name: 'collateralAmount', type: 'u64' },
|
177
|
-
{ name: 'interest', type: '
|
195
|
+
{ name: 'interest', type: 'u16' },
|
178
196
|
],
|
179
197
|
},
|
180
198
|
{
|
@@ -199,7 +217,7 @@ exports.ensofiIdl = {
|
|
199
217
|
{ name: 'lendOfferId', type: 'string' },
|
200
218
|
{ name: 'tierId', type: 'string' },
|
201
219
|
{ name: 'collateralAmount', type: 'u64' },
|
202
|
-
{ name: 'interest', type: '
|
220
|
+
{ name: 'interest', type: 'u16' },
|
203
221
|
],
|
204
222
|
},
|
205
223
|
{
|
@@ -373,63 +391,745 @@ exports.ensofiIdl = {
|
|
373
391
|
{ name: 'vault', isMut: true, isSigner: false },
|
374
392
|
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
375
393
|
],
|
376
|
-
args: [{ name: 'offerId', type: 'string' }],
|
394
|
+
args: [{ name: 'offerId', type: 'string' }],
|
395
|
+
},
|
396
|
+
{
|
397
|
+
name: 'finishLiquidateContract',
|
398
|
+
accounts: [
|
399
|
+
{ name: 'system', isMut: true, isSigner: true },
|
400
|
+
{ name: 'systemAta', isMut: true, isSigner: false },
|
401
|
+
{ name: 'mintAsset', isMut: false, isSigner: false },
|
402
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
403
|
+
{ name: 'borrowerAtaAsset', isMut: true, isSigner: false },
|
404
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
405
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
406
|
+
],
|
407
|
+
args: [
|
408
|
+
{ name: 'loanOfferId', type: 'string' },
|
409
|
+
{ name: 'collateralSwappedAmount', type: 'u64' },
|
410
|
+
{ name: 'liquidatedPrice', type: 'u64' },
|
411
|
+
{ name: 'liquidatedTx', type: 'string' },
|
412
|
+
],
|
413
|
+
},
|
414
|
+
{
|
415
|
+
name: 'systemFinishLoanOffer',
|
416
|
+
accounts: [
|
417
|
+
{ name: 'system', isMut: true, isSigner: true },
|
418
|
+
{ name: 'systemAta', isMut: true, isSigner: false },
|
419
|
+
{ name: 'mintAsset', isMut: false, isSigner: false },
|
420
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
421
|
+
{ name: 'lenderAtaAsset', isMut: true, isSigner: false },
|
422
|
+
{ name: 'borrower', isMut: true, isSigner: false },
|
423
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
424
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
425
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
426
|
+
],
|
427
|
+
args: [
|
428
|
+
{ name: 'loanOfferId', type: 'string' },
|
429
|
+
{ name: 'loanAmount', type: 'u64' },
|
430
|
+
{ name: 'interestAmount', type: 'u64' },
|
431
|
+
],
|
432
|
+
},
|
433
|
+
{
|
434
|
+
name: 'systemRevertStatus',
|
435
|
+
accounts: [
|
436
|
+
{ name: 'system', isMut: true, isSigner: true },
|
437
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
438
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
439
|
+
],
|
440
|
+
args: [{ name: 'offerId', type: 'string' }],
|
441
|
+
},
|
442
|
+
{
|
443
|
+
name: 'closeLendOffer',
|
444
|
+
accounts: [
|
445
|
+
{ name: 'signer', isMut: true, isSigner: true },
|
446
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
447
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
448
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
449
|
+
],
|
450
|
+
args: [{ name: 'offerId', type: 'string' }],
|
451
|
+
},
|
452
|
+
{
|
453
|
+
name: 'initForeignChainAccount',
|
454
|
+
accounts: [
|
455
|
+
{ name: 'owner', isMut: true, isSigner: true },
|
456
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
457
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
458
|
+
],
|
459
|
+
args: [
|
460
|
+
{ name: 'chainId', type: 'u16' },
|
461
|
+
{ name: 'contractAddress', type: 'string' },
|
462
|
+
{ name: 'emitterAddress', type: 'string' },
|
463
|
+
{ name: 'crossChainFee', type: 'u64' },
|
464
|
+
],
|
465
|
+
},
|
466
|
+
{
|
467
|
+
name: 'editForeignChainAccount',
|
468
|
+
accounts: [
|
469
|
+
{ name: 'owner', isMut: true, isSigner: true },
|
470
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
471
|
+
],
|
472
|
+
args: [
|
473
|
+
{ name: 'chainId', type: 'u16' },
|
474
|
+
{ name: 'contractAddress', type: { option: 'string' } },
|
475
|
+
{ name: 'emitterAddress', type: { option: 'string' } },
|
476
|
+
{ name: 'crossChainFee', type: { option: 'u64' } },
|
477
|
+
],
|
478
|
+
},
|
479
|
+
{
|
480
|
+
name: 'createLoanOfferCrossChain',
|
481
|
+
accounts: [
|
482
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
483
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
484
|
+
{ name: 'lendMintAsset', isMut: false, isSigner: false },
|
485
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
486
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
487
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
488
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
489
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
490
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
491
|
+
{ name: 'settingAccount', isMut: false, isSigner: false },
|
492
|
+
{
|
493
|
+
name: 'posted',
|
494
|
+
isMut: false,
|
495
|
+
isSigner: false,
|
496
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
497
|
+
},
|
498
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
499
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
500
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
501
|
+
],
|
502
|
+
args: [
|
503
|
+
{ name: 'tierId', type: 'string' },
|
504
|
+
{ name: 'loanOfferId', type: 'string' },
|
505
|
+
{ name: 'lendOfferId', type: 'string' },
|
506
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
507
|
+
],
|
508
|
+
},
|
509
|
+
{
|
510
|
+
name: 'repayLoanOfferCrossChain',
|
511
|
+
accounts: [
|
512
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
513
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
514
|
+
{ name: 'lendMintAsset', isMut: false, isSigner: false },
|
515
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
516
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
517
|
+
{ name: 'borrowerAtaLendAsset', isMut: true, isSigner: false },
|
518
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
519
|
+
{ name: 'hotWalletAtaLendAsset', isMut: true, isSigner: false },
|
520
|
+
{ name: 'config', isMut: false, isSigner: false },
|
521
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
522
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
523
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
524
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
525
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
526
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
527
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
528
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
529
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
530
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
531
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
532
|
+
],
|
533
|
+
args: [{ name: 'loanOfferId', type: 'string' }],
|
534
|
+
},
|
535
|
+
{
|
536
|
+
name: 'initWormhole',
|
537
|
+
accounts: [
|
538
|
+
{ name: 'owner', isMut: true, isSigner: true },
|
539
|
+
{ name: 'wormholeConfig', isMut: true, isSigner: false },
|
540
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
541
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
542
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
543
|
+
{ name: 'wormholeEmitter', isMut: true, isSigner: false },
|
544
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
545
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
546
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
547
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
548
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
549
|
+
],
|
550
|
+
args: [],
|
551
|
+
},
|
552
|
+
{
|
553
|
+
name: 'updateDepositCollateralCrossChain',
|
554
|
+
accounts: [
|
555
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
556
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
557
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
558
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
559
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
560
|
+
{
|
561
|
+
name: 'posted',
|
562
|
+
isMut: false,
|
563
|
+
isSigner: false,
|
564
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
565
|
+
},
|
566
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
567
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
568
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
569
|
+
],
|
570
|
+
args: [
|
571
|
+
{ name: 'loanOfferId', type: 'string' },
|
572
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
573
|
+
],
|
574
|
+
},
|
575
|
+
{
|
576
|
+
name: 'updateWithdrawCollateralCrossChain',
|
577
|
+
accounts: [
|
578
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
579
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
580
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
581
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
582
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
583
|
+
{
|
584
|
+
name: 'posted',
|
585
|
+
isMut: false,
|
586
|
+
isSigner: false,
|
587
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
588
|
+
},
|
589
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
590
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
591
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
592
|
+
],
|
593
|
+
args: [
|
594
|
+
{ name: 'loanOfferId', type: 'string' },
|
595
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
596
|
+
],
|
597
|
+
},
|
598
|
+
{
|
599
|
+
name: 'requestCancelCollateralCrossChain',
|
600
|
+
accounts: [
|
601
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
602
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
603
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
604
|
+
{ name: 'lendMintAsset', isMut: false, isSigner: false },
|
605
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
606
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
607
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
608
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
609
|
+
{
|
610
|
+
name: 'posted',
|
611
|
+
isMut: false,
|
612
|
+
isSigner: false,
|
613
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
614
|
+
},
|
615
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
616
|
+
{ name: 'config', isMut: false, isSigner: false },
|
617
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
618
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
619
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
620
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
621
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
622
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
623
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
624
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
625
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
626
|
+
],
|
627
|
+
args: [
|
628
|
+
{ name: 'tierId', type: 'string' },
|
629
|
+
{ name: 'lendOfferId', type: 'string' },
|
630
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
631
|
+
],
|
632
|
+
},
|
633
|
+
{
|
634
|
+
name: 'requestCancelLoanedCrossChain',
|
635
|
+
accounts: [
|
636
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
637
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
638
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
639
|
+
{ name: 'lendMintAsset', isMut: false, isSigner: false },
|
640
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
641
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
642
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
643
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
644
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
645
|
+
{
|
646
|
+
name: 'posted',
|
647
|
+
isMut: false,
|
648
|
+
isSigner: false,
|
649
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
650
|
+
},
|
651
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
652
|
+
{ name: 'config', isMut: false, isSigner: false },
|
653
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
654
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
655
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
656
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
657
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
658
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
659
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
660
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
661
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
662
|
+
],
|
663
|
+
args: [
|
664
|
+
{ name: 'tierId', type: 'string' },
|
665
|
+
{ name: 'lendOfferId', type: 'string' },
|
666
|
+
{ name: 'loanOfferId', type: 'string' },
|
667
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
668
|
+
{ name: 'loanedBorrower', type: 'publicKey' },
|
669
|
+
],
|
670
|
+
},
|
671
|
+
{
|
672
|
+
name: 'depositCollateralTakeLoanCrossChainNative',
|
673
|
+
accounts: [
|
674
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
675
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
676
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
677
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
678
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
679
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
680
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
681
|
+
{ name: 'lendPriceFeedAccount', isMut: false, isSigner: false },
|
682
|
+
{ name: 'collateralPriceFeedAccount', isMut: false, isSigner: false },
|
683
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
684
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
685
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
686
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
687
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
688
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
689
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
690
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
691
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
692
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
693
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
694
|
+
],
|
695
|
+
args: [
|
696
|
+
{ name: 'tierId', type: 'string' },
|
697
|
+
{ name: 'lendOfferId', type: 'string' },
|
698
|
+
{ name: 'lendAmount', type: 'u64' },
|
699
|
+
{ name: 'collateralAmount', type: 'u64' },
|
700
|
+
{ name: 'lendChainId', type: 'u16' },
|
701
|
+
{ name: 'interest', type: 'u16' },
|
702
|
+
{ name: 'lendChainBorrower', type: 'string' },
|
703
|
+
],
|
704
|
+
},
|
705
|
+
{
|
706
|
+
name: 'depositCollateralLoanOfferCrossChainNative',
|
707
|
+
accounts: [
|
708
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
709
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
710
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
711
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
712
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
713
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
714
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
715
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
716
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
717
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
718
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
719
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
720
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
721
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
722
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
723
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
724
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
725
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
726
|
+
],
|
727
|
+
args: [
|
728
|
+
{ name: 'lendOfferId', type: 'string' },
|
729
|
+
{ name: 'lendChainId', type: 'u16' },
|
730
|
+
{ name: 'depositAmount', type: 'u64' },
|
731
|
+
],
|
732
|
+
},
|
733
|
+
{
|
734
|
+
name: 'depositCollateralLoanOfferCrossChain',
|
735
|
+
accounts: [
|
736
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
737
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
738
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
739
|
+
{ name: 'borrowerCollateralMintAta', isMut: true, isSigner: false },
|
740
|
+
{ name: 'vaultAuthority', isMut: false, isSigner: false },
|
741
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
742
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
743
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
744
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
745
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
746
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
747
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
748
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
749
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
750
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
751
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
752
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
753
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
754
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
755
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
756
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
757
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
758
|
+
],
|
759
|
+
args: [
|
760
|
+
{ name: 'lendOfferId', type: 'string' },
|
761
|
+
{ name: 'lendChainId', type: 'u16' },
|
762
|
+
{ name: 'depositAmount', type: 'u64' },
|
763
|
+
],
|
764
|
+
},
|
765
|
+
{
|
766
|
+
name: 'withdrawCollateralLoanOfferCrossChainNative',
|
767
|
+
accounts: [
|
768
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
769
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
770
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
771
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
772
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
773
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
774
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
775
|
+
{ name: 'lendPriceFeedAccount', isMut: false, isSigner: false },
|
776
|
+
{ name: 'collateralPriceFeedAccount', isMut: false, isSigner: false },
|
777
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
778
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
779
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
780
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
781
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
782
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
783
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
784
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
785
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
786
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
787
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
788
|
+
],
|
789
|
+
args: [
|
790
|
+
{ name: 'lendOfferId', type: 'string' },
|
791
|
+
{ name: 'lendChainId', type: 'u16' },
|
792
|
+
{ name: 'withdrawAmount', type: 'u64' },
|
793
|
+
],
|
794
|
+
},
|
795
|
+
{
|
796
|
+
name: 'withdrawCollateralLoanOfferCrossChain',
|
797
|
+
accounts: [
|
798
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
799
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
800
|
+
{ name: 'borrowerCollateralMintAta', isMut: true, isSigner: false },
|
801
|
+
{ name: 'vaultAuthority', isMut: false, isSigner: false },
|
802
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
803
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
804
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
805
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
806
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
807
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
808
|
+
{ name: 'lendPriceFeedAccount', isMut: false, isSigner: false },
|
809
|
+
{ name: 'collateralPriceFeedAccount', isMut: false, isSigner: false },
|
810
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
811
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
812
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
813
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
814
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
815
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
816
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
817
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
818
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
819
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
820
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
821
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
822
|
+
],
|
823
|
+
args: [
|
824
|
+
{ name: 'lendOfferId', type: 'string' },
|
825
|
+
{ name: 'lendChainId', type: 'u16' },
|
826
|
+
{ name: 'withdrawAmount', type: 'u64' },
|
827
|
+
],
|
828
|
+
},
|
829
|
+
{
|
830
|
+
name: 'refundCollateralLoanOfferCrossChainNative',
|
831
|
+
accounts: [
|
832
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
833
|
+
{ name: 'borrower', isMut: true, isSigner: false },
|
834
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
835
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
836
|
+
{
|
837
|
+
name: 'posted',
|
838
|
+
isMut: false,
|
839
|
+
isSigner: false,
|
840
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
841
|
+
},
|
842
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
843
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
844
|
+
],
|
845
|
+
args: [
|
846
|
+
{ name: 'lendOfferId', type: 'string' },
|
847
|
+
{ name: 'lendChainId', type: 'u16' },
|
848
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
849
|
+
],
|
850
|
+
},
|
851
|
+
{
|
852
|
+
name: 'refundCollateralLoanOfferCrossChain',
|
853
|
+
accounts: [
|
854
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
855
|
+
{ name: 'borrower', isMut: true, isSigner: false },
|
856
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
857
|
+
{ name: 'borrowerCollateralMintAta', isMut: true, isSigner: false },
|
858
|
+
{ name: 'vaultAuthority', isMut: false, isSigner: false },
|
859
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
860
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
861
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
862
|
+
{
|
863
|
+
name: 'posted',
|
864
|
+
isMut: false,
|
865
|
+
isSigner: false,
|
866
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
867
|
+
},
|
868
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
869
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
870
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
871
|
+
],
|
872
|
+
args: [
|
873
|
+
{ name: 'lendOfferId', type: 'string' },
|
874
|
+
{ name: 'lendChainId', type: 'u16' },
|
875
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
876
|
+
],
|
877
|
+
},
|
878
|
+
{
|
879
|
+
name: 'liquidateCollateralCrossChainNative',
|
880
|
+
accounts: [
|
881
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
882
|
+
{ name: 'hotWallet', isMut: true, isSigner: false },
|
883
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
884
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
885
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
886
|
+
{
|
887
|
+
name: 'posted',
|
888
|
+
isMut: false,
|
889
|
+
isSigner: false,
|
890
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
891
|
+
},
|
892
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
893
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
894
|
+
],
|
895
|
+
args: [
|
896
|
+
{ name: 'lendOfferId', type: 'string' },
|
897
|
+
{ name: 'lendChainId', type: 'u16' },
|
898
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
899
|
+
],
|
900
|
+
},
|
901
|
+
{
|
902
|
+
name: 'liquidateCollateralCrossChain',
|
903
|
+
accounts: [
|
904
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
905
|
+
{ name: 'hotWalletCollateralMintAta', isMut: true, isSigner: false },
|
906
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
907
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
908
|
+
{ name: 'vaultAuthority', isMut: true, isSigner: false },
|
909
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
910
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
911
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
912
|
+
{
|
913
|
+
name: 'posted',
|
914
|
+
isMut: false,
|
915
|
+
isSigner: false,
|
916
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
917
|
+
},
|
918
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
919
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
920
|
+
],
|
921
|
+
args: [
|
922
|
+
{ name: 'lendOfferId', type: 'string' },
|
923
|
+
{ name: 'lendChainId', type: 'u16' },
|
924
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
925
|
+
],
|
926
|
+
},
|
927
|
+
{
|
928
|
+
name: 'startLiquidateHealthLoanCrossChain',
|
929
|
+
accounts: [
|
930
|
+
{ name: 'system', isMut: true, isSigner: true },
|
931
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
932
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
933
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
934
|
+
{ name: 'lendMintAsset', isMut: false, isSigner: false },
|
935
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
936
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
937
|
+
{ name: 'lendPriceFeedAccount', isMut: false, isSigner: false },
|
938
|
+
{ name: 'collateralPriceFeedAccount', isMut: false, isSigner: false },
|
939
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
940
|
+
{ name: 'config', isMut: false, isSigner: false },
|
941
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
942
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
943
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
944
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
945
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
946
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
947
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
948
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
949
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
950
|
+
],
|
951
|
+
args: [{ name: 'loanOfferId', type: 'string' }],
|
952
|
+
},
|
953
|
+
{
|
954
|
+
name: 'startLiquidateExpiredLoanCrossChain',
|
955
|
+
accounts: [
|
956
|
+
{ name: 'system', isMut: true, isSigner: true },
|
957
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
958
|
+
{ name: 'collateralMintAsset', isMut: false, isSigner: false },
|
959
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
960
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
961
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
962
|
+
{ name: 'config', isMut: false, isSigner: false },
|
963
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
964
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
965
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
966
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
967
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
968
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
969
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
970
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
971
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
972
|
+
],
|
973
|
+
args: [{ name: 'loanOfferId', type: 'string' }],
|
974
|
+
},
|
975
|
+
{
|
976
|
+
name: 'depositCollateralTakeLoanCrossChain',
|
977
|
+
accounts: [
|
978
|
+
{ name: 'borrower', isMut: true, isSigner: true },
|
979
|
+
{ name: 'relayer', isMut: true, isSigner: false },
|
980
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
981
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
982
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
983
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
984
|
+
{ name: 'borrowerCollateralMintAta', isMut: true, isSigner: false },
|
985
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
986
|
+
{ name: 'vaultAuthority', isMut: false, isSigner: false },
|
987
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
988
|
+
{ name: 'lendPriceFeedAccount', isMut: false, isSigner: false },
|
989
|
+
{ name: 'collateralPriceFeedAccount', isMut: false, isSigner: false },
|
990
|
+
{ name: 'foreignChain', isMut: false, isSigner: false },
|
991
|
+
{ name: 'wormholeConfig', isMut: false, isSigner: false },
|
992
|
+
{ name: 'wormholeBridge', isMut: true, isSigner: false },
|
993
|
+
{ name: 'wormholeFeeCollector', isMut: true, isSigner: false },
|
994
|
+
{ name: 'wormholeEmitter', isMut: false, isSigner: false },
|
995
|
+
{ name: 'wormholeSequence', isMut: true, isSigner: false },
|
996
|
+
{ name: 'wormholeMessage', isMut: true, isSigner: false },
|
997
|
+
{ name: 'clock', isMut: false, isSigner: false },
|
998
|
+
{ name: 'rent', isMut: false, isSigner: false },
|
999
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
1000
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
1001
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
1002
|
+
],
|
1003
|
+
args: [
|
1004
|
+
{ name: 'tierId', type: 'string' },
|
1005
|
+
{ name: 'lendOfferId', type: 'string' },
|
1006
|
+
{ name: 'lendAmount', type: 'u64' },
|
1007
|
+
{ name: 'collateralAmount', type: 'u64' },
|
1008
|
+
{ name: 'lendChainId', type: 'u16' },
|
1009
|
+
{ name: 'interest', type: 'u16' },
|
1010
|
+
{ name: 'lendChainBorrower', type: 'string' },
|
1011
|
+
],
|
1012
|
+
},
|
1013
|
+
{
|
1014
|
+
name: 'cancelCollateralCrossChainNative',
|
1015
|
+
accounts: [
|
1016
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
1017
|
+
{ name: 'borrower', isMut: true, isSigner: false },
|
1018
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
1019
|
+
{
|
1020
|
+
name: 'posted',
|
1021
|
+
isMut: false,
|
1022
|
+
isSigner: false,
|
1023
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
1024
|
+
},
|
1025
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
1026
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
1027
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
1028
|
+
],
|
1029
|
+
args: [
|
1030
|
+
{ name: 'lendOfferId', type: 'string' },
|
1031
|
+
{ name: 'lendChainId', type: 'u16' },
|
1032
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
1033
|
+
],
|
1034
|
+
},
|
1035
|
+
{
|
1036
|
+
name: 'cancelCollateralCrossChain',
|
1037
|
+
accounts: [
|
1038
|
+
{ name: 'relayer', isMut: true, isSigner: true },
|
1039
|
+
{ name: 'borrower', isMut: true, isSigner: false },
|
1040
|
+
{ name: 'collateralHolder', isMut: true, isSigner: false },
|
1041
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
1042
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
1043
|
+
{ name: 'borrowerCollateralMintAta', isMut: true, isSigner: false },
|
1044
|
+
{ name: 'vaultAuthority', isMut: true, isSigner: false },
|
1045
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
1046
|
+
{
|
1047
|
+
name: 'posted',
|
1048
|
+
isMut: false,
|
1049
|
+
isSigner: false,
|
1050
|
+
docs: ['signatures and posted the account data here. Read-only.'],
|
1051
|
+
},
|
1052
|
+
{ name: 'foreignChain', isMut: true, isSigner: false },
|
1053
|
+
{ name: 'wormholeProgram', isMut: false, isSigner: false },
|
1054
|
+
{ name: 'associatedTokenProgram', isMut: false, isSigner: false },
|
1055
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
1056
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
1057
|
+
],
|
1058
|
+
args: [
|
1059
|
+
{ name: 'lendOfferId', type: 'string' },
|
1060
|
+
{ name: 'lendChainId', type: 'u16' },
|
1061
|
+
{ name: 'vaaHash', type: { array: ['u8', 32] } },
|
1062
|
+
],
|
377
1063
|
},
|
378
1064
|
{
|
379
|
-
name: '
|
1065
|
+
name: 'openActiveLendOffer',
|
380
1066
|
accounts: [
|
381
1067
|
{ name: 'system', isMut: true, isSigner: true },
|
382
|
-
{ name: '
|
383
|
-
{ name: '
|
384
|
-
{ name: '
|
385
|
-
{ name: '
|
386
|
-
{ name: '
|
387
|
-
{ name: '
|
1068
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
1069
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
1070
|
+
{ name: 'settingAccount', isMut: false, isSigner: false },
|
1071
|
+
{ name: 'lender', isMut: false, isSigner: false },
|
1072
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
1073
|
+
{ name: 'systemProgram', isMut: false, isSigner: false },
|
388
1074
|
],
|
389
1075
|
args: [
|
390
|
-
{ name: '
|
391
|
-
{ name: '
|
392
|
-
{ name: '
|
393
|
-
{ name: 'liquidatedTx', type: 'string' },
|
1076
|
+
{ name: 'offerId', type: 'string' },
|
1077
|
+
{ name: 'tierId', type: 'string' },
|
1078
|
+
{ name: 'interest', type: 'u16' },
|
394
1079
|
],
|
395
1080
|
},
|
396
1081
|
{
|
397
|
-
name: '
|
1082
|
+
name: 'openActiveLoanOfferNative',
|
398
1083
|
accounts: [
|
399
1084
|
{ name: 'system', isMut: true, isSigner: true },
|
400
|
-
{ name: '
|
401
|
-
{ name: 'mintAsset', isMut: false, isSigner: false },
|
1085
|
+
{ name: 'borrower', isMut: false, isSigner: false },
|
402
1086
|
{ name: 'lender', isMut: false, isSigner: false },
|
403
|
-
{ name: '
|
404
|
-
{ name: '
|
1087
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
1088
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
1089
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
1090
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
1091
|
+
{ name: 'settingAccount', isMut: false, isSigner: false },
|
1092
|
+
{ name: 'lendOffer', isMut: true, isSigner: false },
|
405
1093
|
{ name: 'loanOffer', isMut: true, isSigner: false },
|
406
|
-
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
407
1094
|
{ name: 'systemProgram', isMut: false, isSigner: false },
|
408
1095
|
],
|
409
1096
|
args: [
|
410
1097
|
{ name: 'loanOfferId', type: 'string' },
|
411
|
-
{ name: '
|
412
|
-
{ name: '
|
1098
|
+
{ name: 'lendOfferId', type: 'string' },
|
1099
|
+
{ name: 'tierId', type: 'string' },
|
1100
|
+
{ name: 'interest', type: 'u16' },
|
1101
|
+
{ name: 'collateralAmount', type: 'u64' },
|
1102
|
+
{ name: 'loanOfferStartedAt', type: 'i64' },
|
413
1103
|
],
|
414
1104
|
},
|
415
1105
|
{
|
416
|
-
name: '
|
1106
|
+
name: 'openActiveLoanOffer',
|
417
1107
|
accounts: [
|
418
1108
|
{ name: 'system', isMut: true, isSigner: true },
|
1109
|
+
{ name: 'systemCollateralAta', isMut: true, isSigner: false },
|
419
1110
|
{ name: 'borrower', isMut: false, isSigner: false },
|
420
|
-
{ name: 'loanOffer', isMut: true, isSigner: false },
|
421
|
-
],
|
422
|
-
args: [{ name: 'offerId', type: 'string' }],
|
423
|
-
},
|
424
|
-
{
|
425
|
-
name: 'closeLendOffer',
|
426
|
-
accounts: [
|
427
|
-
{ name: 'signer', isMut: true, isSigner: true },
|
428
1111
|
{ name: 'lender', isMut: false, isSigner: false },
|
1112
|
+
{ name: 'lendMint', isMut: false, isSigner: false },
|
1113
|
+
{ name: 'lendAsset', isMut: false, isSigner: false },
|
1114
|
+
{ name: 'collateralMint', isMut: false, isSigner: false },
|
1115
|
+
{ name: 'collateralAsset', isMut: false, isSigner: false },
|
1116
|
+
{ name: 'vaultAuthority', isMut: true, isSigner: false },
|
1117
|
+
{ name: 'vault', isMut: true, isSigner: false },
|
1118
|
+
{ name: 'settingAccount', isMut: false, isSigner: false },
|
429
1119
|
{ name: 'lendOffer', isMut: true, isSigner: false },
|
1120
|
+
{ name: 'loanOffer', isMut: true, isSigner: false },
|
1121
|
+
{ name: 'associatedTokenProgram', isMut: false, isSigner: false },
|
1122
|
+
{ name: 'tokenProgram', isMut: false, isSigner: false },
|
430
1123
|
{ name: 'systemProgram', isMut: false, isSigner: false },
|
431
1124
|
],
|
432
|
-
args: [
|
1125
|
+
args: [
|
1126
|
+
{ name: 'loanOfferId', type: 'string' },
|
1127
|
+
{ name: 'lendOfferId', type: 'string' },
|
1128
|
+
{ name: 'tierId', type: 'string' },
|
1129
|
+
{ name: 'interest', type: 'u16' },
|
1130
|
+
{ name: 'collateralAmount', type: 'u64' },
|
1131
|
+
{ name: 'loanOfferStartedAt', type: 'i64' },
|
1132
|
+
],
|
433
1133
|
},
|
434
1134
|
],
|
435
1135
|
accounts: [
|
@@ -447,6 +1147,45 @@ exports.ensofiIdl = {
|
|
447
1147
|
{ name: 'priceFeedAccount', type: 'publicKey' },
|
448
1148
|
{ name: 'bump', type: 'u8' },
|
449
1149
|
{ name: 'name', type: 'string' },
|
1150
|
+
{ name: 'tokenAddress', type: { option: { array: ['u8', 32] } } },
|
1151
|
+
{ name: 'chainId', type: 'u16' },
|
1152
|
+
],
|
1153
|
+
},
|
1154
|
+
},
|
1155
|
+
{
|
1156
|
+
name: 'CollateralHolder',
|
1157
|
+
type: {
|
1158
|
+
kind: 'struct',
|
1159
|
+
fields: [
|
1160
|
+
{ name: 'bump', type: 'u8' },
|
1161
|
+
{ name: 'lendAmount', type: 'u64' },
|
1162
|
+
{ name: 'lendChainId', type: 'u16' },
|
1163
|
+
{ name: 'collateralAmount', type: 'u64' },
|
1164
|
+
{ name: 'borrower', type: 'publicKey' },
|
1165
|
+
{ name: 'collateralMintToken', type: 'publicKey' },
|
1166
|
+
{ name: 'status', type: { defined: 'CollateralHolderStatus' } },
|
1167
|
+
{ name: 'startedAt', type: 'i64' },
|
1168
|
+
{ name: 'lendOfferId', type: 'string' },
|
1169
|
+
{ name: 'lendTokenAddress', type: { array: ['u8', 32] } },
|
1170
|
+
{ name: 'lendChainBorrower', type: { array: ['u8', 32] } },
|
1171
|
+
{ name: 'padding', type: { array: ['u64', 7] } },
|
1172
|
+
],
|
1173
|
+
},
|
1174
|
+
},
|
1175
|
+
{
|
1176
|
+
name: 'ForeignChain',
|
1177
|
+
type: {
|
1178
|
+
kind: 'struct',
|
1179
|
+
fields: [
|
1180
|
+
{
|
1181
|
+
name: 'chainId',
|
1182
|
+
docs: ["Emitter chain. Cannot equal `1` (Solana's Chain ID)."],
|
1183
|
+
type: 'u16',
|
1184
|
+
},
|
1185
|
+
{ name: 'contractAddress', type: { array: ['u8', 32] } },
|
1186
|
+
{ name: 'emitterAddress', type: { array: ['u8', 32] } },
|
1187
|
+
{ name: 'crossChainFee', type: 'u64' },
|
1188
|
+
{ name: 'bump', type: 'u8' },
|
450
1189
|
],
|
451
1190
|
},
|
452
1191
|
},
|
@@ -455,7 +1194,7 @@ exports.ensofiIdl = {
|
|
455
1194
|
type: {
|
456
1195
|
kind: 'struct',
|
457
1196
|
fields: [
|
458
|
-
{ name: 'interest', type: '
|
1197
|
+
{ name: 'interest', type: 'u16' },
|
459
1198
|
{ name: 'lenderFeePercent', type: 'f64' },
|
460
1199
|
{ name: 'duration', type: 'u64' },
|
461
1200
|
{ name: 'offerId', type: 'string' },
|
@@ -474,7 +1213,7 @@ exports.ensofiIdl = {
|
|
474
1213
|
fields: [
|
475
1214
|
{ name: 'tierId', type: 'string' },
|
476
1215
|
{ name: 'lendOfferId', type: 'string' },
|
477
|
-
{ name: 'interest', type: '
|
1216
|
+
{ name: 'interest', type: 'u16' },
|
478
1217
|
{ name: 'borrowAmount', type: 'u64' },
|
479
1218
|
{ name: 'lenderFeePercent', type: 'f64' },
|
480
1219
|
{ name: 'duration', type: 'u64' },
|
@@ -493,6 +1232,7 @@ exports.ensofiIdl = {
|
|
493
1232
|
{ name: 'liquidatedTx', type: { option: 'string' } },
|
494
1233
|
{ name: 'liquidatedPrice', type: { option: 'u64' } },
|
495
1234
|
{ name: 'bump', type: 'u8' },
|
1235
|
+
{ name: 'liquidationFeePercent', type: 'f64' },
|
496
1236
|
],
|
497
1237
|
},
|
498
1238
|
},
|
@@ -513,6 +1253,7 @@ exports.ensofiIdl = {
|
|
513
1253
|
{ name: 'lendPriceFeed', type: 'publicKey' },
|
514
1254
|
{ name: 'collateralPriceFeed', type: 'publicKey' },
|
515
1255
|
{ name: 'bump', type: 'u8' },
|
1256
|
+
{ name: 'liquidationFeePercent', type: 'f64' },
|
516
1257
|
],
|
517
1258
|
},
|
518
1259
|
},
|
@@ -526,8 +1267,39 @@ exports.ensofiIdl = {
|
|
526
1267
|
],
|
527
1268
|
},
|
528
1269
|
},
|
1270
|
+
{
|
1271
|
+
name: 'WormholeConfig',
|
1272
|
+
type: {
|
1273
|
+
kind: 'struct',
|
1274
|
+
fields: [
|
1275
|
+
{ name: 'bump', type: 'u8' },
|
1276
|
+
{ name: 'owner', type: 'publicKey' },
|
1277
|
+
{ name: 'wormhole', type: { defined: 'WormholeAddresses' } },
|
1278
|
+
{ name: 'batchId', type: 'u32' },
|
1279
|
+
{ name: 'finality', type: 'u8' },
|
1280
|
+
],
|
1281
|
+
},
|
1282
|
+
},
|
1283
|
+
{
|
1284
|
+
name: 'WormholeEmitter',
|
1285
|
+
type: {
|
1286
|
+
kind: 'struct',
|
1287
|
+
fields: [{ name: 'bump', docs: ['PDA bump.'], type: 'u8' }],
|
1288
|
+
},
|
1289
|
+
},
|
529
1290
|
],
|
530
1291
|
types: [
|
1292
|
+
{
|
1293
|
+
name: 'WormholeAddresses',
|
1294
|
+
type: {
|
1295
|
+
kind: 'struct',
|
1296
|
+
fields: [
|
1297
|
+
{ name: 'bridge', type: 'publicKey' },
|
1298
|
+
{ name: 'feeCollector', type: 'publicKey' },
|
1299
|
+
{ name: 'sequence', type: 'publicKey' },
|
1300
|
+
],
|
1301
|
+
},
|
1302
|
+
},
|
531
1303
|
{
|
532
1304
|
name: 'LendOfferStatus',
|
533
1305
|
type: {
|
@@ -555,6 +1327,17 @@ exports.ensofiIdl = {
|
|
555
1327
|
],
|
556
1328
|
},
|
557
1329
|
},
|
1330
|
+
{
|
1331
|
+
name: 'CollateralHolderStatus',
|
1332
|
+
type: {
|
1333
|
+
kind: 'enum',
|
1334
|
+
variants: [
|
1335
|
+
{ name: 'Created' },
|
1336
|
+
{ name: 'BorrowerPaid' },
|
1337
|
+
{ name: 'Liquidated' },
|
1338
|
+
],
|
1339
|
+
},
|
1340
|
+
},
|
558
1341
|
{
|
559
1342
|
name: 'LendOfferError',
|
560
1343
|
type: {
|
@@ -603,6 +1386,20 @@ exports.ensofiIdl = {
|
|
603
1386
|
{ name: 'InvalidAssetAccount' },
|
604
1387
|
{ name: 'NotEnoughCollateral' },
|
605
1388
|
{ name: 'InvalidInitializerVaultAuthority' },
|
1389
|
+
{ name: 'InvalidTargetFunction' },
|
1390
|
+
{ name: 'LendOfferIdNotMatch' },
|
1391
|
+
{ name: 'TierIdNotMatch' },
|
1392
|
+
{ name: 'PostedVaaExpired' },
|
1393
|
+
{ name: 'BorrowerSignedLoanOffer' },
|
1394
|
+
{ name: 'LoanOfferInValidity' },
|
1395
|
+
{ name: 'InvalidLendOfferAmount' },
|
1396
|
+
{ name: 'InvalidChainId' },
|
1397
|
+
{ name: 'WithdrawAmountNotMatch' },
|
1398
|
+
{ name: 'InvalidCollateralHolder' },
|
1399
|
+
{ name: 'DepositAmountNotMatch' },
|
1400
|
+
{ name: 'InvalidProgramId' },
|
1401
|
+
{ name: 'LendChainBorrowerNotMatch' },
|
1402
|
+
{ name: 'InvalidRelayer' },
|
606
1403
|
],
|
607
1404
|
},
|
608
1405
|
},
|
@@ -638,6 +1435,56 @@ exports.ensofiIdl = {
|
|
638
1435
|
],
|
639
1436
|
},
|
640
1437
|
},
|
1438
|
+
{
|
1439
|
+
name: 'WormholeError',
|
1440
|
+
type: {
|
1441
|
+
kind: 'enum',
|
1442
|
+
variants: [
|
1443
|
+
{ name: 'InvalidOwner' },
|
1444
|
+
{ name: 'InvalidSystem' },
|
1445
|
+
{ name: 'InvalidForeignEmitter' },
|
1446
|
+
{ name: 'InvalidMessage' },
|
1447
|
+
{ name: 'NotSupportThisChainId' },
|
1448
|
+
{ name: 'InvalidSequence' },
|
1449
|
+
{ name: 'InvalidWormholeFeeCollector' },
|
1450
|
+
{ name: 'InvalidWormholeConfig' },
|
1451
|
+
],
|
1452
|
+
},
|
1453
|
+
},
|
1454
|
+
{
|
1455
|
+
name: 'EmitterAccountError',
|
1456
|
+
type: {
|
1457
|
+
kind: 'enum',
|
1458
|
+
variants: [{ name: 'InvalidOwner' }, { name: 'InvalidChainId' }],
|
1459
|
+
},
|
1460
|
+
},
|
1461
|
+
{
|
1462
|
+
name: 'ParseVaaError',
|
1463
|
+
type: {
|
1464
|
+
kind: 'enum',
|
1465
|
+
variants: [
|
1466
|
+
{ name: 'InvalidTargetChain' },
|
1467
|
+
{ name: 'InvalidCollateralAmount' },
|
1468
|
+
{ name: 'InvalidCollateralDecimal' },
|
1469
|
+
{ name: 'InvalidForeignEmitter' },
|
1470
|
+
{ name: 'InvalidLendAmount' },
|
1471
|
+
{ name: 'InvalidRemainingCollateralAmount' },
|
1472
|
+
{ name: 'InvalidDepositAmount' },
|
1473
|
+
{ name: 'InvalidInterest' },
|
1474
|
+
{ name: 'InvalidLiquidatingPrice' },
|
1475
|
+
{ name: 'InvalidLiquidatingAt' },
|
1476
|
+
],
|
1477
|
+
},
|
1478
|
+
},
|
1479
|
+
{
|
1480
|
+
name: 'WormholeMessage',
|
1481
|
+
type: {
|
1482
|
+
kind: 'enum',
|
1483
|
+
variants: [
|
1484
|
+
{ name: 'Message', fields: [{ name: 'payload', type: 'bytes' }] },
|
1485
|
+
],
|
1486
|
+
},
|
1487
|
+
},
|
641
1488
|
],
|
642
1489
|
events: [
|
643
1490
|
{
|
@@ -678,6 +1525,12 @@ exports.ensofiIdl = {
|
|
678
1525
|
{ name: 'priceFeedAccount', type: 'publicKey', index: false },
|
679
1526
|
{ name: 'bump', type: 'u8', index: false },
|
680
1527
|
{ name: 'name', type: 'string', index: false },
|
1528
|
+
{
|
1529
|
+
name: 'tokenAddress',
|
1530
|
+
type: { option: { array: ['u8', 32] } },
|
1531
|
+
index: false,
|
1532
|
+
},
|
1533
|
+
{ name: 'chainId', type: 'u16', index: false },
|
681
1534
|
],
|
682
1535
|
},
|
683
1536
|
{
|
@@ -698,7 +1551,7 @@ exports.ensofiIdl = {
|
|
698
1551
|
name: 'CreateLendOfferEvent',
|
699
1552
|
fields: [
|
700
1553
|
{ name: 'lender', type: 'publicKey', index: false },
|
701
|
-
{ name: 'interest', type: '
|
1554
|
+
{ name: 'interest', type: 'u16', index: false },
|
702
1555
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
703
1556
|
{ name: 'duration', type: 'u64', index: false },
|
704
1557
|
{ name: 'amount', type: 'u64', index: false },
|
@@ -710,7 +1563,7 @@ exports.ensofiIdl = {
|
|
710
1563
|
name: 'EditLendOfferEvent',
|
711
1564
|
fields: [
|
712
1565
|
{ name: 'lender', type: 'publicKey', index: false },
|
713
|
-
{ name: 'interest', type: '
|
1566
|
+
{ name: 'interest', type: 'u16', index: false },
|
714
1567
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
715
1568
|
{ name: 'duration', type: 'u64', index: false },
|
716
1569
|
{ name: 'amount', type: 'u64', index: false },
|
@@ -721,7 +1574,7 @@ exports.ensofiIdl = {
|
|
721
1574
|
name: 'LendOfferCancelRequestEvent',
|
722
1575
|
fields: [
|
723
1576
|
{ name: 'lender', type: 'publicKey', index: false },
|
724
|
-
{ name: 'interest', type: '
|
1577
|
+
{ name: 'interest', type: 'u16', index: false },
|
725
1578
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
726
1579
|
{ name: 'duration', type: 'u64', index: false },
|
727
1580
|
{ name: 'amount', type: 'u64', index: false },
|
@@ -732,7 +1585,7 @@ exports.ensofiIdl = {
|
|
732
1585
|
name: 'LendOfferCanceledEvent',
|
733
1586
|
fields: [
|
734
1587
|
{ name: 'lender', type: 'publicKey', index: false },
|
735
|
-
{ name: 'interest', type: '
|
1588
|
+
{ name: 'interest', type: 'u16', index: false },
|
736
1589
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
737
1590
|
{ name: 'duration', type: 'u64', index: false },
|
738
1591
|
{ name: 'amount', type: 'u64', index: false },
|
@@ -744,7 +1597,7 @@ exports.ensofiIdl = {
|
|
744
1597
|
fields: [
|
745
1598
|
{ name: 'tierId', type: 'string', index: false },
|
746
1599
|
{ name: 'lendOfferId', type: 'string', index: false },
|
747
|
-
{ name: 'interest', type: '
|
1600
|
+
{ name: 'interest', type: 'u16', index: false },
|
748
1601
|
{ name: 'borrowAmount', type: 'u64', index: false },
|
749
1602
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
750
1603
|
{ name: 'duration', type: 'u64', index: false },
|
@@ -759,12 +1612,31 @@ exports.ensofiIdl = {
|
|
759
1612
|
{ name: 'startedAt', type: 'i64', index: false },
|
760
1613
|
],
|
761
1614
|
},
|
1615
|
+
{
|
1616
|
+
name: 'RequestCreateLoanEvent',
|
1617
|
+
fields: [
|
1618
|
+
{ name: 'loanId', type: 'string', index: false },
|
1619
|
+
{ name: 'offerId', type: 'string', index: false },
|
1620
|
+
{ name: 'borrowAmount', type: 'u64', index: false },
|
1621
|
+
{ name: 'duration', type: 'u64', index: false },
|
1622
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1623
|
+
{ name: 'lendToken', type: 'publicKey', index: false },
|
1624
|
+
{ name: 'collateralToken', type: 'string', index: false },
|
1625
|
+
{ name: 'lender', type: 'publicKey', index: false },
|
1626
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1627
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1628
|
+
{ name: 'interest', type: 'u16', index: false },
|
1629
|
+
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
1630
|
+
{ name: 'borrowerFeePercent', type: 'f64', index: false },
|
1631
|
+
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
1632
|
+
],
|
1633
|
+
},
|
762
1634
|
{
|
763
1635
|
name: 'LoanOfferUpdateEvent',
|
764
1636
|
fields: [
|
765
1637
|
{ name: 'tierId', type: 'string', index: false },
|
766
1638
|
{ name: 'lendOfferId', type: 'string', index: false },
|
767
|
-
{ name: 'interest', type: '
|
1639
|
+
{ name: 'interest', type: 'u16', index: false },
|
768
1640
|
{ name: 'borrowAmount', type: 'u64', index: false },
|
769
1641
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
770
1642
|
{ name: 'duration', type: 'u64', index: false },
|
@@ -811,7 +1683,7 @@ exports.ensofiIdl = {
|
|
811
1683
|
fields: [
|
812
1684
|
{ name: 'tierId', type: 'string', index: false },
|
813
1685
|
{ name: 'lendOfferId', type: 'string', index: false },
|
814
|
-
{ name: 'interest', type: '
|
1686
|
+
{ name: 'interest', type: 'u16', index: false },
|
815
1687
|
{ name: 'borrowAmount', type: 'u64', index: false },
|
816
1688
|
{ name: 'lenderFeePercent', type: 'f64', index: false },
|
817
1689
|
{ name: 'duration', type: 'u64', index: false },
|
@@ -827,35 +1699,35 @@ exports.ensofiIdl = {
|
|
827
1699
|
],
|
828
1700
|
},
|
829
1701
|
{
|
830
|
-
name: '
|
1702
|
+
name: 'LiquidatingCollateralEvent',
|
831
1703
|
fields: [
|
832
|
-
{ name: '
|
833
|
-
{ name: '
|
834
|
-
{ name: '
|
835
|
-
{ name: 'borrowerFeePercent', type: 'f64', index: false },
|
836
|
-
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
1704
|
+
{ name: 'offerId', type: 'string', index: false },
|
1705
|
+
{ name: 'liquidatingPrice', type: { option: 'f64' }, index: false },
|
1706
|
+
{ name: 'liquidatingAt', type: { option: 'i64' }, index: false },
|
837
1707
|
],
|
838
1708
|
},
|
839
1709
|
{
|
840
|
-
name: '
|
1710
|
+
name: 'LiquidatingCollateralLoanEvent',
|
841
1711
|
fields: [
|
842
|
-
{ name: '
|
1712
|
+
{ name: 'loanId', type: 'string', index: false },
|
843
1713
|
{ name: 'liquidatingPrice', type: { option: 'f64' }, index: false },
|
844
1714
|
{ name: 'liquidatingAt', type: { option: 'i64' }, index: false },
|
1715
|
+
{ name: 'collateralChainId', type: 'u16', index: false },
|
1716
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1717
|
+
{ name: 'collateralToken', type: 'string', index: false },
|
845
1718
|
],
|
846
1719
|
},
|
847
1720
|
{
|
848
|
-
name: '
|
1721
|
+
name: 'LiquidatedCollateralLoanEvent',
|
849
1722
|
fields: [
|
850
|
-
{ name: '
|
1723
|
+
{ name: 'lender', type: 'publicKey', index: false },
|
1724
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1725
|
+
{ name: 'loanId', type: 'string', index: false },
|
1726
|
+
{ name: 'swappedAmount', type: 'u64', index: false },
|
1727
|
+
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
851
1728
|
{ name: 'liquidatedPrice', type: 'u64', index: false },
|
852
1729
|
{ name: 'liquidatedTx', type: 'string', index: false },
|
853
|
-
{ name: 'system', type: 'publicKey', index: false },
|
854
|
-
{ name: 'lender', type: 'publicKey', index: false },
|
855
|
-
{ name: 'borrower', type: 'publicKey', index: false },
|
856
1730
|
{ name: 'remainingFundToBorrower', type: 'u64', index: false },
|
857
|
-
{ name: 'collateralSwappedAmount', type: 'u64', index: false },
|
858
|
-
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
859
1731
|
],
|
860
1732
|
},
|
861
1733
|
{
|
@@ -863,7 +1735,7 @@ exports.ensofiIdl = {
|
|
863
1735
|
fields: [
|
864
1736
|
{ name: 'lender', type: 'publicKey', index: false },
|
865
1737
|
{ name: 'borrower', type: 'publicKey', index: false },
|
866
|
-
{ name: 'interest', type: '
|
1738
|
+
{ name: 'interest', type: 'u16', index: false },
|
867
1739
|
{ name: 'loanAmount', type: 'u64', index: false },
|
868
1740
|
{ name: 'collateralAmount', type: 'u64', index: false },
|
869
1741
|
{ name: 'loanOfferId', type: 'string', index: false },
|
@@ -871,13 +1743,28 @@ exports.ensofiIdl = {
|
|
871
1743
|
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
872
1744
|
],
|
873
1745
|
},
|
1746
|
+
{
|
1747
|
+
name: 'BorrowerPaidEvent',
|
1748
|
+
fields: [
|
1749
|
+
{ name: 'lender', type: 'publicKey', index: false },
|
1750
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1751
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1752
|
+
{ name: 'lendToken', type: 'publicKey', index: false },
|
1753
|
+
{ name: 'collateralToken', type: 'string', index: false },
|
1754
|
+
{ name: 'loanId', type: 'string', index: false },
|
1755
|
+
{ name: 'repayAmount', type: 'u64', index: false },
|
1756
|
+
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
1757
|
+
{ name: 'interest', type: 'u16', index: false },
|
1758
|
+
{ name: 'tierId', type: 'string', index: false },
|
1759
|
+
],
|
1760
|
+
},
|
874
1761
|
{
|
875
1762
|
name: 'SystemFinishLoanOfferEvent',
|
876
1763
|
fields: [
|
877
1764
|
{ name: 'system', type: 'publicKey', index: false },
|
878
1765
|
{ name: 'lender', type: 'publicKey', index: false },
|
879
1766
|
{ name: 'borrower', type: 'publicKey', index: false },
|
880
|
-
{ name: 'interest', type: '
|
1767
|
+
{ name: 'interest', type: 'u16', index: false },
|
881
1768
|
{ name: 'loanAmount', type: 'u64', index: false },
|
882
1769
|
{ name: 'loanOfferId', type: 'string', index: false },
|
883
1770
|
{ name: 'tierId', type: 'string', index: false },
|
@@ -891,6 +1778,132 @@ exports.ensofiIdl = {
|
|
891
1778
|
{ name: 'status', type: { defined: 'LoanOfferStatus' }, index: false },
|
892
1779
|
],
|
893
1780
|
},
|
1781
|
+
{
|
1782
|
+
name: 'InitForeignEmitterEvent',
|
1783
|
+
fields: [
|
1784
|
+
{ name: 'chainId', type: 'u16', index: false },
|
1785
|
+
{ name: 'contractAddress', type: 'string', index: false },
|
1786
|
+
{ name: 'emitterAddress', type: 'string', index: false },
|
1787
|
+
{ name: 'crossChainFee', type: 'u64', index: false },
|
1788
|
+
],
|
1789
|
+
},
|
1790
|
+
{
|
1791
|
+
name: 'RequestCancelCollateralHolderEvent',
|
1792
|
+
fields: [
|
1793
|
+
{ name: 'collateralChainId', type: 'u16', index: false },
|
1794
|
+
{ name: 'collateralChainAddress', type: 'string', index: false },
|
1795
|
+
{ name: 'offerId', type: 'string', index: false },
|
1796
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1797
|
+
],
|
1798
|
+
},
|
1799
|
+
{
|
1800
|
+
name: 'DepositCollateralLoanEvent',
|
1801
|
+
fields: [
|
1802
|
+
{ name: 'collateralChainId', type: 'u16', index: false },
|
1803
|
+
{ name: 'collateralChainAddress', type: 'string', index: false },
|
1804
|
+
{ name: 'loanId', type: 'string', index: false },
|
1805
|
+
{ name: 'depositAmount', type: 'u64', index: false },
|
1806
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1807
|
+
{ name: 'collateralToken', type: 'string', index: false },
|
1808
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1809
|
+
],
|
1810
|
+
},
|
1811
|
+
{
|
1812
|
+
name: 'WithdrawCollateralLoanEvent',
|
1813
|
+
fields: [
|
1814
|
+
{ name: 'collateralChainId', type: 'u16', index: false },
|
1815
|
+
{ name: 'collateralChainAddress', type: 'string', index: false },
|
1816
|
+
{ name: 'loanId', type: 'string', index: false },
|
1817
|
+
{ name: 'withdrawAmount', type: 'u64', index: false },
|
1818
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1819
|
+
{ name: 'collateralToken', type: 'string', index: false },
|
1820
|
+
{ name: 'lendChainBorrower', type: 'publicKey', index: false },
|
1821
|
+
],
|
1822
|
+
},
|
1823
|
+
{
|
1824
|
+
name: 'CollateralCreatedEvent',
|
1825
|
+
fields: [
|
1826
|
+
{ name: 'offerId', type: 'string', index: false },
|
1827
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1828
|
+
{ name: 'lendAmount', type: 'u64', index: false },
|
1829
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1830
|
+
{ name: 'collateralToken', type: 'publicKey', index: false },
|
1831
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1832
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1833
|
+
{ name: 'lendChainBorrower', type: 'string', index: false },
|
1834
|
+
{
|
1835
|
+
name: 'status',
|
1836
|
+
type: { defined: 'CollateralHolderStatus' },
|
1837
|
+
index: false,
|
1838
|
+
},
|
1839
|
+
],
|
1840
|
+
},
|
1841
|
+
{
|
1842
|
+
name: 'DepositCollateralHolderEvent',
|
1843
|
+
fields: [
|
1844
|
+
{ name: 'offerId', type: 'string', index: false },
|
1845
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1846
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1847
|
+
{ name: 'collateralToken', type: 'publicKey', index: false },
|
1848
|
+
{ name: 'depositAmount', type: 'u64', index: false },
|
1849
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1850
|
+
{
|
1851
|
+
name: 'status',
|
1852
|
+
type: { defined: 'CollateralHolderStatus' },
|
1853
|
+
index: false,
|
1854
|
+
},
|
1855
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1856
|
+
],
|
1857
|
+
},
|
1858
|
+
{
|
1859
|
+
name: 'WithdrawCollateralHolderEvent',
|
1860
|
+
fields: [
|
1861
|
+
{ name: 'offerId', type: 'string', index: false },
|
1862
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1863
|
+
{ name: 'withdrawAmount', type: 'u64', index: false },
|
1864
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1865
|
+
{ name: 'collateralToken', type: 'publicKey', index: false },
|
1866
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1867
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1868
|
+
{
|
1869
|
+
name: 'status',
|
1870
|
+
type: { defined: 'CollateralHolderStatus' },
|
1871
|
+
index: false,
|
1872
|
+
},
|
1873
|
+
],
|
1874
|
+
},
|
1875
|
+
{
|
1876
|
+
name: 'RefundCollateralHolderEvent',
|
1877
|
+
fields: [
|
1878
|
+
{ name: 'offerId', type: 'string', index: false },
|
1879
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1880
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1881
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1882
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1883
|
+
{ name: 'collateralToken', type: 'publicKey', index: false },
|
1884
|
+
],
|
1885
|
+
},
|
1886
|
+
{
|
1887
|
+
name: 'CollateralHolderCancelledEvent',
|
1888
|
+
fields: [
|
1889
|
+
{ name: 'offerId', type: 'string', index: false },
|
1890
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1891
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1892
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1893
|
+
],
|
1894
|
+
},
|
1895
|
+
{
|
1896
|
+
name: 'LiquidateCollateralHolderEvent',
|
1897
|
+
fields: [
|
1898
|
+
{ name: 'offerId', type: 'string', index: false },
|
1899
|
+
{ name: 'liquidatingPrice', type: 'u64', index: false },
|
1900
|
+
{ name: 'liquidatingAt', type: 'u64', index: false },
|
1901
|
+
{ name: 'lendChainId', type: 'u16', index: false },
|
1902
|
+
{ name: 'collateralChainBorrower', type: 'publicKey', index: false },
|
1903
|
+
{ name: 'startedAt', type: 'i64', index: false },
|
1904
|
+
{ name: 'collateralAmount', type: 'u64', index: false },
|
1905
|
+
],
|
1906
|
+
},
|
894
1907
|
],
|
895
1908
|
errors: [
|
896
1909
|
{ code: 6000, name: 'InvalidTierId', msg: 'Invalid tier id' },
|