@defisaver/sdk 1.2.26 → 1.2.27-dev-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * LiquityV2LegacyCloseAction - Closes trove
5
+ *
6
+ * @category LiquityV2
7
+ */
8
+ export declare class LiquityV2LegacyCloseAction extends Action {
9
+ /**
10
+ * @param market liquity address registry for the market
11
+ * @param from address from which to take the BOLD Legacy
12
+ * @param to address to which to send the collateralToken and WETH gas compensation
13
+ * @param troveId id of the trove to close
14
+ */
15
+ constructor(market: EthAddress, from: EthAddress, to: EthAddress, troveId: string);
16
+ getAssetsToApprove(): Promise<{
17
+ asset: string;
18
+ owner: any;
19
+ }[]>;
20
+ }
@@ -0,0 +1,49 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { getAssetInfo } from '@defisaver/tokens';
11
+ import { Action } from '../../Action';
12
+ import { getAddr } from '../../addresses';
13
+ /**
14
+ * LiquityV2LegacyCloseAction - Closes trove
15
+ *
16
+ * @category LiquityV2
17
+ */
18
+ export class LiquityV2LegacyCloseAction extends Action {
19
+ /**
20
+ * @param market liquity address registry for the market
21
+ * @param from address from which to take the BOLD Legacy
22
+ * @param to address to which to send the collateralToken and WETH gas compensation
23
+ * @param troveId id of the trove to close
24
+ */
25
+ constructor(market, from, to, troveId) {
26
+ super('LiquityV2LegacyClose', getAddr('LiquityV2LegacyClose'), [
27
+ 'address',
28
+ 'address',
29
+ 'address',
30
+ 'uint256',
31
+ ], [
32
+ market,
33
+ from,
34
+ to,
35
+ troveId,
36
+ ]);
37
+ this.mappableArgs = [
38
+ this.args[0],
39
+ this.args[1],
40
+ this.args[2],
41
+ this.args[3],
42
+ ];
43
+ }
44
+ getAssetsToApprove() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ return [{ asset: getAssetInfo('BOLD Legacy').address, owner: this.args[1] }];
47
+ });
48
+ }
49
+ }
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * LiquityV2LegacyPaybackAction - Pays back BOLD to a trove
5
+ *
6
+ * @category LiquityV2
7
+ */
8
+ export declare class LiquityV2LegacyPaybackAction extends Action {
9
+ /**
10
+ * @param market liquity address registry for the market
11
+ * @param from address from which to take the BOLD Legacy for payback
12
+ * @param troveId id of the trove to pay back to
13
+ * @param amount BOLD amount to pay back
14
+ */
15
+ constructor(market: EthAddress, from: EthAddress, troveId: uint256, amount: uint256);
16
+ getAssetsToApprove(): Promise<{
17
+ asset: string;
18
+ owner: any;
19
+ }[]>;
20
+ }
@@ -0,0 +1,49 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { getAssetInfo } from '@defisaver/tokens';
11
+ import { Action } from '../../Action';
12
+ import { getAddr } from '../../addresses';
13
+ /**
14
+ * LiquityV2LegacyPaybackAction - Pays back BOLD to a trove
15
+ *
16
+ * @category LiquityV2
17
+ */
18
+ export class LiquityV2LegacyPaybackAction extends Action {
19
+ /**
20
+ * @param market liquity address registry for the market
21
+ * @param from address from which to take the BOLD Legacy for payback
22
+ * @param troveId id of the trove to pay back to
23
+ * @param amount BOLD amount to pay back
24
+ */
25
+ constructor(market, from, troveId, amount) {
26
+ super('LiquityV2LegacyPayback', getAddr('LiquityV2LegacyPayback'), [
27
+ 'address',
28
+ 'address',
29
+ 'uint256',
30
+ 'uint256',
31
+ ], [
32
+ market,
33
+ from,
34
+ troveId,
35
+ amount,
36
+ ]);
37
+ this.mappableArgs = [
38
+ this.args[0],
39
+ this.args[1],
40
+ this.args[2],
41
+ this.args[3],
42
+ ];
43
+ }
44
+ getAssetsToApprove() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ return [{ asset: getAssetInfo('BOLD Legacy').address, owner: this.args[1] }];
47
+ });
48
+ }
49
+ }
@@ -1,7 +1,9 @@
1
1
  export * from './LiquityV2OpenAction';
2
2
  export * from './LiquityV2CloseAction';
3
+ export * from './LiquityV2LegacyCloseAction';
3
4
  export * from './LiquityV2BorrowAction';
4
5
  export * from './LiquityV2PaybackAction';
6
+ export * from './LiquityV2LegacyPaybackAction';
5
7
  export * from './LiquityV2SupplyAction';
6
8
  export * from './LiquityV2WithdrawAction';
7
9
  export * from './LiquityV2SPDepositAction';
@@ -1,7 +1,9 @@
1
1
  export * from './LiquityV2OpenAction';
2
2
  export * from './LiquityV2CloseAction';
3
+ export * from './LiquityV2LegacyCloseAction';
3
4
  export * from './LiquityV2BorrowAction';
4
5
  export * from './LiquityV2PaybackAction';
6
+ export * from './LiquityV2LegacyPaybackAction';
5
7
  export * from './LiquityV2SupplyAction';
6
8
  export * from './LiquityV2WithdrawAction';
7
9
  export * from './LiquityV2SPDepositAction';
@@ -140,10 +140,12 @@ export declare const actionAddresses: {
140
140
  LiquityAdjust: string;
141
141
  LiquityV2Open: string;
142
142
  LiquityV2Close: string;
143
+ LiquityV2LegacyClose: string;
143
144
  LiquityV2Supply: string;
144
145
  LiquityV2Withdraw: string;
145
146
  LiquityV2Borrow: string;
146
147
  LiquityV2Payback: string;
148
+ LiquityV2LegacyPayback: string;
147
149
  LiquityV2Claim: string;
148
150
  LiquityV2Adjust: string;
149
151
  LiquityV2AdjustInterestRate: string;
@@ -413,10 +415,12 @@ export declare const actionAddresses: {
413
415
  LiquityAdjust?: undefined;
414
416
  LiquityV2Open?: undefined;
415
417
  LiquityV2Close?: undefined;
418
+ LiquityV2LegacyClose?: undefined;
416
419
  LiquityV2Supply?: undefined;
417
420
  LiquityV2Withdraw?: undefined;
418
421
  LiquityV2Borrow?: undefined;
419
422
  LiquityV2Payback?: undefined;
423
+ LiquityV2LegacyPayback?: undefined;
420
424
  LiquityV2Claim?: undefined;
421
425
  LiquityV2Adjust?: undefined;
422
426
  LiquityV2AdjustInterestRate?: undefined;
@@ -690,10 +694,12 @@ export declare const actionAddresses: {
690
694
  LiquityAdjust?: undefined;
691
695
  LiquityV2Open?: undefined;
692
696
  LiquityV2Close?: undefined;
697
+ LiquityV2LegacyClose?: undefined;
693
698
  LiquityV2Supply?: undefined;
694
699
  LiquityV2Withdraw?: undefined;
695
700
  LiquityV2Borrow?: undefined;
696
701
  LiquityV2Payback?: undefined;
702
+ LiquityV2LegacyPayback?: undefined;
697
703
  LiquityV2Claim?: undefined;
698
704
  LiquityV2Adjust?: undefined;
699
705
  LiquityV2AdjustInterestRate?: undefined;
@@ -950,10 +956,12 @@ export declare const actionAddresses: {
950
956
  LiquityAdjust?: undefined;
951
957
  LiquityV2Open?: undefined;
952
958
  LiquityV2Close?: undefined;
959
+ LiquityV2LegacyClose?: undefined;
953
960
  LiquityV2Supply?: undefined;
954
961
  LiquityV2Withdraw?: undefined;
955
962
  LiquityV2Borrow?: undefined;
956
963
  LiquityV2Payback?: undefined;
964
+ LiquityV2LegacyPayback?: undefined;
957
965
  LiquityV2Claim?: undefined;
958
966
  LiquityV2Adjust?: undefined;
959
967
  LiquityV2AdjustInterestRate?: undefined;
@@ -158,19 +158,21 @@ export const actionAddresses = {
158
158
  LiquityRedeem: '0x20B78854658011394C931EF2BF3cEEA2Fe62E7f0',
159
159
  LiquityAdjust: '0x0A398f6B97677192A5d5e7Ea8A937383FFf9304c',
160
160
  // liquity v2
161
- LiquityV2Open: '0x6CEdC0317A9236CdFD800e6a6F41074f01d8229F',
162
- LiquityV2Close: '0xBD97F8fCfdb03ca29F0C9baCA7Cb09c5A51E4adE',
161
+ LiquityV2Open: '0x270A0C7eBd1C0a98FdA613782b51419300AB6322',
162
+ LiquityV2Close: '0x2b10B000292745099Deb15304A247c0816bd8b73',
163
+ LiquityV2LegacyClose: '0xBD97F8fCfdb03ca29F0C9baCA7Cb09c5A51E4adE',
163
164
  LiquityV2Supply: '0x89403Bc80FDb1adbcf4Ea7b6acFB26197E47F2AA',
164
165
  LiquityV2Withdraw: '0xDcBd59b7095edC5fd29063873Ec5d62F8BB18E9A',
165
- LiquityV2Borrow: '0x092afc8AB25C6d5A2cE8CeAc4801fd8B1eFa5759',
166
- LiquityV2Payback: '0x2B51c21a1af1316Af89f0493b2FF5C5D34D4626f',
166
+ LiquityV2Borrow: '0xb3d3dFf3d68539F6a1bb51e56B7dC8d515aE8978',
167
+ LiquityV2Payback: '0x8F5DB82611bA21CAC95DA8938896d690f66a2143',
168
+ LiquityV2LegacyPayback: '0x2B51c21a1af1316Af89f0493b2FF5C5D34D4626f',
167
169
  LiquityV2Claim: '0x1b5a0c2573A1692bB183cC5d6f506e108c0599FC',
168
- LiquityV2Adjust: '0x6063CaD05DBf1c15f643C0F483bc5ce749501d3C',
170
+ LiquityV2Adjust: '0xFA2CcD23446b05b8C5A25478D4251599c8c1967E',
169
171
  LiquityV2AdjustInterestRate: '0x685f0237D8b85B2018278E975a481b0650dE0b54',
170
172
  LiquityV2SPDeposit: '0x1556711572a53c89912AE185f3a6Dba9FF365Bf3',
171
173
  LiquityV2SPWithdraw: '0x237eaB8D7f9bBeaF8D27dB9797EB835e4062B8C2',
172
174
  LiquityV2SPClaimColl: '0x3f783de20C3095bcB999AEA999aF4DF184b6630f',
173
- LiquityV2AdjustZombieTrove: '0xDaB6aA000B0EBAa653A2715cb3847976bf614272',
175
+ LiquityV2AdjustZombieTrove: '0x3D7C092048DE8D7f50587df294cd7cB58d429758',
174
176
  // b.protocol
175
177
  BprotocolLiquitySPDeposit: '0x5A0436c7559e37da8cD24B0f66C155a0a2fd6309',
176
178
  BprotocolLiquitySPWithdraw: '0x20Ece7CB4463bB1DbA4C4fA800E321A05dfB028B',
@@ -282,7 +284,7 @@ export const actionAddresses = {
282
284
  EtherFiStake: '0xcadB650B6a60C89f7847Cba555A7eeCC220EA2e8',
283
285
  EtherFiWrap: '0x086464be5c73f66cfbe6b64ec23aa5a86749ef58',
284
286
  EtherFiUnwrap: '0x6Eb09948DDf9332d628d156950b9B1C0c091e8D8',
285
- KingClaim: '0x483816678e2348bf87f88b0f4eb6a923017de0d6',
287
+ KingClaim: '0xd4C4D1Ef0e79389173EBc247972F355c6f2FEC76',
286
288
  // fluid
287
289
  FluidVaultT1Open: '0x372404335C05C2493Ff156Ef60cC0B286f6f2971',
288
290
  FluidVaultT1Adjust: '0x8f1443c9F24843D14fa6b302A55C59468ED7D28B',
@@ -151,10 +151,12 @@ declare const actionAddressesAllChains: {
151
151
  LiquityAdjust: string;
152
152
  LiquityV2Open: string;
153
153
  LiquityV2Close: string;
154
+ LiquityV2LegacyClose: string;
154
155
  LiquityV2Supply: string;
155
156
  LiquityV2Withdraw: string;
156
157
  LiquityV2Borrow: string;
157
158
  LiquityV2Payback: string;
159
+ LiquityV2LegacyPayback: string;
158
160
  LiquityV2Claim: string;
159
161
  LiquityV2Adjust: string;
160
162
  LiquityV2AdjustInterestRate: string;
@@ -424,10 +426,12 @@ declare const actionAddressesAllChains: {
424
426
  LiquityAdjust?: undefined;
425
427
  LiquityV2Open?: undefined;
426
428
  LiquityV2Close?: undefined;
429
+ LiquityV2LegacyClose?: undefined;
427
430
  LiquityV2Supply?: undefined;
428
431
  LiquityV2Withdraw?: undefined;
429
432
  LiquityV2Borrow?: undefined;
430
433
  LiquityV2Payback?: undefined;
434
+ LiquityV2LegacyPayback?: undefined;
431
435
  LiquityV2Claim?: undefined;
432
436
  LiquityV2Adjust?: undefined;
433
437
  LiquityV2AdjustInterestRate?: undefined;
@@ -701,10 +705,12 @@ declare const actionAddressesAllChains: {
701
705
  LiquityAdjust?: undefined;
702
706
  LiquityV2Open?: undefined;
703
707
  LiquityV2Close?: undefined;
708
+ LiquityV2LegacyClose?: undefined;
704
709
  LiquityV2Supply?: undefined;
705
710
  LiquityV2Withdraw?: undefined;
706
711
  LiquityV2Borrow?: undefined;
707
712
  LiquityV2Payback?: undefined;
713
+ LiquityV2LegacyPayback?: undefined;
708
714
  LiquityV2Claim?: undefined;
709
715
  LiquityV2Adjust?: undefined;
710
716
  LiquityV2AdjustInterestRate?: undefined;
@@ -961,10 +967,12 @@ declare const actionAddressesAllChains: {
961
967
  LiquityAdjust?: undefined;
962
968
  LiquityV2Open?: undefined;
963
969
  LiquityV2Close?: undefined;
970
+ LiquityV2LegacyClose?: undefined;
964
971
  LiquityV2Supply?: undefined;
965
972
  LiquityV2Withdraw?: undefined;
966
973
  LiquityV2Borrow?: undefined;
967
974
  LiquityV2Payback?: undefined;
975
+ LiquityV2LegacyPayback?: undefined;
968
976
  LiquityV2Claim?: undefined;
969
977
  LiquityV2Adjust?: undefined;
970
978
  LiquityV2AdjustInterestRate?: undefined;
@@ -1197,10 +1205,12 @@ declare const actionAddresses: (chainId?: null) => {
1197
1205
  LiquityAdjust: string;
1198
1206
  LiquityV2Open: string;
1199
1207
  LiquityV2Close: string;
1208
+ LiquityV2LegacyClose: string;
1200
1209
  LiquityV2Supply: string;
1201
1210
  LiquityV2Withdraw: string;
1202
1211
  LiquityV2Borrow: string;
1203
1212
  LiquityV2Payback: string;
1213
+ LiquityV2LegacyPayback: string;
1204
1214
  LiquityV2Claim: string;
1205
1215
  LiquityV2Adjust: string;
1206
1216
  LiquityV2AdjustInterestRate: string;
@@ -1470,10 +1480,12 @@ declare const actionAddresses: (chainId?: null) => {
1470
1480
  LiquityAdjust?: undefined;
1471
1481
  LiquityV2Open?: undefined;
1472
1482
  LiquityV2Close?: undefined;
1483
+ LiquityV2LegacyClose?: undefined;
1473
1484
  LiquityV2Supply?: undefined;
1474
1485
  LiquityV2Withdraw?: undefined;
1475
1486
  LiquityV2Borrow?: undefined;
1476
1487
  LiquityV2Payback?: undefined;
1488
+ LiquityV2LegacyPayback?: undefined;
1477
1489
  LiquityV2Claim?: undefined;
1478
1490
  LiquityV2Adjust?: undefined;
1479
1491
  LiquityV2AdjustInterestRate?: undefined;
@@ -1747,10 +1759,12 @@ declare const actionAddresses: (chainId?: null) => {
1747
1759
  LiquityAdjust?: undefined;
1748
1760
  LiquityV2Open?: undefined;
1749
1761
  LiquityV2Close?: undefined;
1762
+ LiquityV2LegacyClose?: undefined;
1750
1763
  LiquityV2Supply?: undefined;
1751
1764
  LiquityV2Withdraw?: undefined;
1752
1765
  LiquityV2Borrow?: undefined;
1753
1766
  LiquityV2Payback?: undefined;
1767
+ LiquityV2LegacyPayback?: undefined;
1754
1768
  LiquityV2Claim?: undefined;
1755
1769
  LiquityV2Adjust?: undefined;
1756
1770
  LiquityV2AdjustInterestRate?: undefined;
@@ -2007,10 +2021,12 @@ declare const actionAddresses: (chainId?: null) => {
2007
2021
  LiquityAdjust?: undefined;
2008
2022
  LiquityV2Open?: undefined;
2009
2023
  LiquityV2Close?: undefined;
2024
+ LiquityV2LegacyClose?: undefined;
2010
2025
  LiquityV2Supply?: undefined;
2011
2026
  LiquityV2Withdraw?: undefined;
2012
2027
  LiquityV2Borrow?: undefined;
2013
2028
  LiquityV2Payback?: undefined;
2029
+ LiquityV2LegacyPayback?: undefined;
2014
2030
  LiquityV2Claim?: undefined;
2015
2031
  LiquityV2Adjust?: undefined;
2016
2032
  LiquityV2AdjustInterestRate?: undefined;
@@ -2386,10 +2402,12 @@ declare const _default: {
2386
2402
  LiquityAdjust: string;
2387
2403
  LiquityV2Open: string;
2388
2404
  LiquityV2Close: string;
2405
+ LiquityV2LegacyClose: string;
2389
2406
  LiquityV2Supply: string;
2390
2407
  LiquityV2Withdraw: string;
2391
2408
  LiquityV2Borrow: string;
2392
2409
  LiquityV2Payback: string;
2410
+ LiquityV2LegacyPayback: string;
2393
2411
  LiquityV2Claim: string;
2394
2412
  LiquityV2Adjust: string;
2395
2413
  LiquityV2AdjustInterestRate: string;
@@ -2659,10 +2677,12 @@ declare const _default: {
2659
2677
  LiquityAdjust?: undefined;
2660
2678
  LiquityV2Open?: undefined;
2661
2679
  LiquityV2Close?: undefined;
2680
+ LiquityV2LegacyClose?: undefined;
2662
2681
  LiquityV2Supply?: undefined;
2663
2682
  LiquityV2Withdraw?: undefined;
2664
2683
  LiquityV2Borrow?: undefined;
2665
2684
  LiquityV2Payback?: undefined;
2685
+ LiquityV2LegacyPayback?: undefined;
2666
2686
  LiquityV2Claim?: undefined;
2667
2687
  LiquityV2Adjust?: undefined;
2668
2688
  LiquityV2AdjustInterestRate?: undefined;
@@ -2936,10 +2956,12 @@ declare const _default: {
2936
2956
  LiquityAdjust?: undefined;
2937
2957
  LiquityV2Open?: undefined;
2938
2958
  LiquityV2Close?: undefined;
2959
+ LiquityV2LegacyClose?: undefined;
2939
2960
  LiquityV2Supply?: undefined;
2940
2961
  LiquityV2Withdraw?: undefined;
2941
2962
  LiquityV2Borrow?: undefined;
2942
2963
  LiquityV2Payback?: undefined;
2964
+ LiquityV2LegacyPayback?: undefined;
2943
2965
  LiquityV2Claim?: undefined;
2944
2966
  LiquityV2Adjust?: undefined;
2945
2967
  LiquityV2AdjustInterestRate?: undefined;
@@ -3196,10 +3218,12 @@ declare const _default: {
3196
3218
  LiquityAdjust?: undefined;
3197
3219
  LiquityV2Open?: undefined;
3198
3220
  LiquityV2Close?: undefined;
3221
+ LiquityV2LegacyClose?: undefined;
3199
3222
  LiquityV2Supply?: undefined;
3200
3223
  LiquityV2Withdraw?: undefined;
3201
3224
  LiquityV2Borrow?: undefined;
3202
3225
  LiquityV2Payback?: undefined;
3226
+ LiquityV2LegacyPayback?: undefined;
3203
3227
  LiquityV2Claim?: undefined;
3204
3228
  LiquityV2Adjust?: undefined;
3205
3229
  LiquityV2AdjustInterestRate?: undefined;
@@ -3432,10 +3456,12 @@ declare const _default: {
3432
3456
  LiquityAdjust: string;
3433
3457
  LiquityV2Open: string;
3434
3458
  LiquityV2Close: string;
3459
+ LiquityV2LegacyClose: string;
3435
3460
  LiquityV2Supply: string;
3436
3461
  LiquityV2Withdraw: string;
3437
3462
  LiquityV2Borrow: string;
3438
3463
  LiquityV2Payback: string;
3464
+ LiquityV2LegacyPayback: string;
3439
3465
  LiquityV2Claim: string;
3440
3466
  LiquityV2Adjust: string;
3441
3467
  LiquityV2AdjustInterestRate: string;
@@ -3705,10 +3731,12 @@ declare const _default: {
3705
3731
  LiquityAdjust?: undefined;
3706
3732
  LiquityV2Open?: undefined;
3707
3733
  LiquityV2Close?: undefined;
3734
+ LiquityV2LegacyClose?: undefined;
3708
3735
  LiquityV2Supply?: undefined;
3709
3736
  LiquityV2Withdraw?: undefined;
3710
3737
  LiquityV2Borrow?: undefined;
3711
3738
  LiquityV2Payback?: undefined;
3739
+ LiquityV2LegacyPayback?: undefined;
3712
3740
  LiquityV2Claim?: undefined;
3713
3741
  LiquityV2Adjust?: undefined;
3714
3742
  LiquityV2AdjustInterestRate?: undefined;
@@ -3982,10 +4010,12 @@ declare const _default: {
3982
4010
  LiquityAdjust?: undefined;
3983
4011
  LiquityV2Open?: undefined;
3984
4012
  LiquityV2Close?: undefined;
4013
+ LiquityV2LegacyClose?: undefined;
3985
4014
  LiquityV2Supply?: undefined;
3986
4015
  LiquityV2Withdraw?: undefined;
3987
4016
  LiquityV2Borrow?: undefined;
3988
4017
  LiquityV2Payback?: undefined;
4018
+ LiquityV2LegacyPayback?: undefined;
3989
4019
  LiquityV2Claim?: undefined;
3990
4020
  LiquityV2Adjust?: undefined;
3991
4021
  LiquityV2AdjustInterestRate?: undefined;
@@ -4242,10 +4272,12 @@ declare const _default: {
4242
4272
  LiquityAdjust?: undefined;
4243
4273
  LiquityV2Open?: undefined;
4244
4274
  LiquityV2Close?: undefined;
4275
+ LiquityV2LegacyClose?: undefined;
4245
4276
  LiquityV2Supply?: undefined;
4246
4277
  LiquityV2Withdraw?: undefined;
4247
4278
  LiquityV2Borrow?: undefined;
4248
4279
  LiquityV2Payback?: undefined;
4280
+ LiquityV2LegacyPayback?: undefined;
4249
4281
  LiquityV2Claim?: undefined;
4250
4282
  LiquityV2Adjust?: undefined;
4251
4283
  LiquityV2AdjustInterestRate?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.2.26",
3
+ "version": "1.2.27-dev-1",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -23,7 +23,7 @@
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
25
  "@defisaver/eslint-config": "^1.0.0",
26
- "@defisaver/tokens": "^1.6.3",
26
+ "@defisaver/tokens": "^1.6.4-dev-1",
27
27
  "@ethersproject/address": "^5.0.10",
28
28
  "@ethersproject/solidity": "^5.0.9",
29
29
  "@types/web3-eth-abi": "^1.2.2",
@@ -0,0 +1,53 @@
1
+ import { getAssetInfo } from '@defisaver/tokens';
2
+ import { Action } from '../../Action';
3
+ import { requireAddress } from '../../utils/general';
4
+ import { getAddr } from '../../addresses';
5
+ import { EthAddress } from '../../types';
6
+
7
+ /**
8
+ * LiquityV2LegacyCloseAction - Closes trove
9
+ *
10
+ * @category LiquityV2
11
+ */
12
+ export class LiquityV2LegacyCloseAction extends Action {
13
+ /**
14
+ * @param market liquity address registry for the market
15
+ * @param from address from which to take the BOLD Legacy
16
+ * @param to address to which to send the collateralToken and WETH gas compensation
17
+ * @param troveId id of the trove to close
18
+ */
19
+ constructor(
20
+ market: EthAddress,
21
+ from: EthAddress,
22
+ to: EthAddress,
23
+ troveId: string,
24
+ ) {
25
+ super(
26
+ 'LiquityV2LegacyClose',
27
+ getAddr('LiquityV2LegacyClose'),
28
+ [
29
+ 'address',
30
+ 'address',
31
+ 'address',
32
+ 'uint256',
33
+ ],
34
+ [
35
+ market,
36
+ from,
37
+ to,
38
+ troveId,
39
+ ],
40
+ );
41
+
42
+ this.mappableArgs = [
43
+ this.args[0],
44
+ this.args[1],
45
+ this.args[2],
46
+ this.args[3],
47
+ ];
48
+ }
49
+
50
+ async getAssetsToApprove() {
51
+ return [{ asset: getAssetInfo('BOLD Legacy').address, owner: this.args[1] }];
52
+ }
53
+ }
@@ -0,0 +1,52 @@
1
+ import { getAssetInfo } from '@defisaver/tokens';
2
+ import { Action } from '../../Action';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256 } from '../../types';
5
+
6
+ /**
7
+ * LiquityV2LegacyPaybackAction - Pays back BOLD to a trove
8
+ *
9
+ * @category LiquityV2
10
+ */
11
+ export class LiquityV2LegacyPaybackAction extends Action {
12
+ /**
13
+ * @param market liquity address registry for the market
14
+ * @param from address from which to take the BOLD Legacy for payback
15
+ * @param troveId id of the trove to pay back to
16
+ * @param amount BOLD amount to pay back
17
+ */
18
+ constructor(
19
+ market: EthAddress,
20
+ from: EthAddress,
21
+ troveId: uint256,
22
+ amount: uint256,
23
+ ) {
24
+ super(
25
+ 'LiquityV2LegacyPayback',
26
+ getAddr('LiquityV2LegacyPayback'),
27
+ [
28
+ 'address',
29
+ 'address',
30
+ 'uint256',
31
+ 'uint256',
32
+ ],
33
+ [
34
+ market,
35
+ from,
36
+ troveId,
37
+ amount,
38
+ ],
39
+ );
40
+
41
+ this.mappableArgs = [
42
+ this.args[0],
43
+ this.args[1],
44
+ this.args[2],
45
+ this.args[3],
46
+ ];
47
+ }
48
+
49
+ async getAssetsToApprove() {
50
+ return [{ asset: getAssetInfo('BOLD Legacy').address, owner: this.args[1] }];
51
+ }
52
+ }
@@ -1,7 +1,9 @@
1
1
  export * from './LiquityV2OpenAction';
2
2
  export * from './LiquityV2CloseAction';
3
+ export * from './LiquityV2LegacyCloseAction';
3
4
  export * from './LiquityV2BorrowAction';
4
5
  export * from './LiquityV2PaybackAction';
6
+ export * from './LiquityV2LegacyPaybackAction';
5
7
  export * from './LiquityV2SupplyAction';
6
8
  export * from './LiquityV2WithdrawAction';
7
9
  export * from './LiquityV2SPDepositAction';
package/src/addresses.ts CHANGED
@@ -177,19 +177,21 @@ export const actionAddresses = {
177
177
  LiquityAdjust: '0x0A398f6B97677192A5d5e7Ea8A937383FFf9304c',
178
178
 
179
179
  // liquity v2
180
- LiquityV2Open: '0x6CEdC0317A9236CdFD800e6a6F41074f01d8229F',
181
- LiquityV2Close: '0xBD97F8fCfdb03ca29F0C9baCA7Cb09c5A51E4adE',
180
+ LiquityV2Open: '0x270A0C7eBd1C0a98FdA613782b51419300AB6322',
181
+ LiquityV2Close: '0x2b10B000292745099Deb15304A247c0816bd8b73',
182
+ LiquityV2LegacyClose: '0xBD97F8fCfdb03ca29F0C9baCA7Cb09c5A51E4adE',
182
183
  LiquityV2Supply: '0x89403Bc80FDb1adbcf4Ea7b6acFB26197E47F2AA',
183
184
  LiquityV2Withdraw: '0xDcBd59b7095edC5fd29063873Ec5d62F8BB18E9A',
184
- LiquityV2Borrow: '0x092afc8AB25C6d5A2cE8CeAc4801fd8B1eFa5759',
185
- LiquityV2Payback: '0x2B51c21a1af1316Af89f0493b2FF5C5D34D4626f',
185
+ LiquityV2Borrow: '0xb3d3dFf3d68539F6a1bb51e56B7dC8d515aE8978',
186
+ LiquityV2Payback: '0x8F5DB82611bA21CAC95DA8938896d690f66a2143',
187
+ LiquityV2LegacyPayback: '0x2B51c21a1af1316Af89f0493b2FF5C5D34D4626f',
186
188
  LiquityV2Claim: '0x1b5a0c2573A1692bB183cC5d6f506e108c0599FC',
187
- LiquityV2Adjust: '0x6063CaD05DBf1c15f643C0F483bc5ce749501d3C',
189
+ LiquityV2Adjust: '0xFA2CcD23446b05b8C5A25478D4251599c8c1967E',
188
190
  LiquityV2AdjustInterestRate: '0x685f0237D8b85B2018278E975a481b0650dE0b54',
189
191
  LiquityV2SPDeposit: '0x1556711572a53c89912AE185f3a6Dba9FF365Bf3',
190
192
  LiquityV2SPWithdraw: '0x237eaB8D7f9bBeaF8D27dB9797EB835e4062B8C2',
191
193
  LiquityV2SPClaimColl: '0x3f783de20C3095bcB999AEA999aF4DF184b6630f',
192
- LiquityV2AdjustZombieTrove: '0xDaB6aA000B0EBAa653A2715cb3847976bf614272',
194
+ LiquityV2AdjustZombieTrove: '0x3D7C092048DE8D7f50587df294cd7cB58d429758',
193
195
 
194
196
  // b.protocol
195
197
  BprotocolLiquitySPDeposit: '0x5A0436c7559e37da8cD24B0f66C155a0a2fd6309',
@@ -325,7 +327,7 @@ export const actionAddresses = {
325
327
  EtherFiWrap: '0x086464be5c73f66cfbe6b64ec23aa5a86749ef58',
326
328
  EtherFiUnwrap: '0x6Eb09948DDf9332d628d156950b9B1C0c091e8D8',
327
329
 
328
- KingClaim: '0x483816678e2348bf87f88b0f4eb6a923017de0d6',
330
+ KingClaim: '0xd4C4D1Ef0e79389173EBc247972F355c6f2FEC76',
329
331
 
330
332
  // fluid
331
333
  FluidVaultT1Open: '0x372404335C05C2493Ff156Ef60cC0B286f6f2971',