@defisaver/sdk 1.0.25 → 1.0.26

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,9 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, bytes } from '../../types';
3
+ /**
4
+ *
5
+ * @category CurveUsd
6
+ */
7
+ export declare class CurveUsdLevCreateAction extends Action {
8
+ constructor(controllerAddress: EthAddress, collateralAmount: uint256, debtAmount: uint256, minAmount: uint256, nBands: uint256, from: EthAddress, additionData: bytes);
9
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ /**
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export class CurveUsdLevCreateAction extends Action {
9
+ constructor(controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData) {
10
+ requireAddress(from);
11
+ super('CurveUsdLevCreate', getAddr('CurveUsdLevCreate'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'], [controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData]);
12
+ this.mappableArgs = [
13
+ ...this.args,
14
+ ];
15
+ }
16
+ }
@@ -1,9 +1,9 @@
1
1
  import { Action } from '../../Action';
2
- import { EthAddress, uint256, int256 } from '../../types';
2
+ import { EthAddress, uint256, bytes } from '../../types';
3
3
  /**
4
4
  *
5
5
  * @category CurveUsd
6
6
  */
7
7
  export declare class CurveUsdRepayAction extends Action {
8
- constructor(controllerAddress: EthAddress, collAmount: uint256, to: EthAddress, swapData: int256[]);
8
+ constructor(controllerAddress: EthAddress, collAmount: uint256, to: EthAddress, minAmount: uint256, additionData: bytes);
9
9
  }
@@ -5,8 +5,8 @@ import { getAddr } from '../../addresses';
5
5
  * @category CurveUsd
6
6
  */
7
7
  export class CurveUsdRepayAction extends Action {
8
- constructor(controllerAddress, collAmount, to, swapData) {
9
- super('CurveUsdRepay', getAddr('CurveUsdRepay'), ['address', 'uint256', 'address', 'uint256[]'], [controllerAddress, collAmount, to, swapData]);
8
+ constructor(controllerAddress, collAmount, to, minAmount, additionData) {
9
+ super('CurveUsdRepay', getAddr('CurveUsdRepay'), ['address', 'uint256', 'address', 'uint256', 'bytes'], [controllerAddress, collAmount, to, minAmount, additionData]);
10
10
  this.mappableArgs = [
11
11
  ...this.args,
12
12
  ];
@@ -0,0 +1,19 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ *
5
+ * @category CurveUsd
6
+ */
7
+ export declare class CurveUsdSelfLiquidateAction extends Action {
8
+ /**
9
+ @param controllerAddress Address of the curveusd market controller
10
+ @param minCrvUsdExpected Minimum amount of crvUsd as collateral for the user to have
11
+ @param from Address from which to pull crvUSD if needed
12
+ @param to Address that will receive the crvUSD and collateral asset
13
+ */
14
+ constructor(controllerAddress: EthAddress, minCrvUsdExpected: uint256, from: EthAddress, to: EthAddress);
15
+ getAssetsToApprove(): Promise<{
16
+ owner: any;
17
+ asset: string;
18
+ }[]>;
19
+ }
@@ -0,0 +1,38 @@
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
+ *
15
+ * @category CurveUsd
16
+ */
17
+ export class CurveUsdSelfLiquidateAction extends Action {
18
+ /**
19
+ @param controllerAddress Address of the curveusd market controller
20
+ @param minCrvUsdExpected Minimum amount of crvUsd as collateral for the user to have
21
+ @param from Address from which to pull crvUSD if needed
22
+ @param to Address that will receive the crvUSD and collateral asset
23
+ */
24
+ constructor(controllerAddress, minCrvUsdExpected, from, to) {
25
+ super('CurveUsdSelfLiquidate', getAddr('CurveUsdSelfLiquidate'), ['address', 'uint256', 'address', 'address'], [controllerAddress, minCrvUsdExpected, from, to]);
26
+ this.mappableArgs = [
27
+ ...this.args,
28
+ ];
29
+ }
30
+ getAssetsToApprove() {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ return [{
33
+ owner: this.args[1],
34
+ asset: getAssetInfo('crvUSD').address,
35
+ }];
36
+ });
37
+ }
38
+ }
@@ -0,0 +1,9 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, bytes } from '../../types';
3
+ /**
4
+ *
5
+ * @category CurveUsd
6
+ */
7
+ export declare class CurveUsdSelfLiquidateWithCollAction extends Action {
8
+ constructor(controllerAddress: EthAddress, percentage: uint256, minCrvUsdExpected: uint256, swapAmount: uint256, minAmount: uint256, to: EthAddress, additionData: bytes);
9
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ /**
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export class CurveUsdSelfLiquidateWithCollAction extends Action {
9
+ constructor(controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData) {
10
+ requireAddress(to);
11
+ super('CurveUsdSelfLiquidateWithColl', getAddr('CurveUsdSelfLiquidateWithColl'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'], [controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData]);
12
+ this.mappableArgs = [
13
+ ...this.args,
14
+ ];
15
+ }
16
+ }
@@ -4,3 +4,6 @@ export * from './CurveUsdWithdrawAction';
4
4
  export * from './CurveUsdBorrowAction';
5
5
  export * from './CurveUsdPaybackAction';
6
6
  export * from './CurveUsdRepayAction';
7
+ export * from './CurveUsdSelfLiquidateAction';
8
+ export * from './CurveUsdLevCreateAction';
9
+ export * from './CurveUsdSelfLiquidateWithCollAction';
@@ -4,3 +4,6 @@ export * from './CurveUsdWithdrawAction';
4
4
  export * from './CurveUsdBorrowAction';
5
5
  export * from './CurveUsdPaybackAction';
6
6
  export * from './CurveUsdRepayAction';
7
+ export * from './CurveUsdSelfLiquidateAction';
8
+ export * from './CurveUsdLevCreateAction';
9
+ export * from './CurveUsdSelfLiquidateWithCollAction';
@@ -41,7 +41,7 @@ _FLAction_instances = new WeakSet(), _FLAction_handleArgs = function _FLAction_h
41
41
  if (specificFLAction.constructor.name === 'MakerFlashLoanAction') {
42
42
  argsToReturn[5] = [4];
43
43
  }
44
- if (specificFLAction.constructor.name === 'AaveV3FlashLoanNoFeeAction') {
44
+ if (specificFLAction.constructor.name === 'AaveV3FlashLoanAction') {
45
45
  argsToReturn[5] = [5];
46
46
  }
47
47
  return argsToReturn;
@@ -146,6 +146,7 @@ export declare const actionAddresses: {
146
146
  CurveUsdPayback: string;
147
147
  CurveUsdSupply: string;
148
148
  CurveUsdWithdraw: string;
149
+ CurveUsdSelfLiquidate: string;
149
150
  AaveV3RatioTrigger?: undefined;
150
151
  GasFeeTakerL2?: undefined;
151
152
  AaveV3RatioCheck?: undefined;
@@ -298,6 +299,7 @@ export declare const actionAddresses: {
298
299
  CurveUsdPayback?: undefined;
299
300
  CurveUsdSupply?: undefined;
300
301
  CurveUsdWithdraw?: undefined;
302
+ CurveUsdSelfLiquidate?: undefined;
301
303
  } | {
302
304
  DFSSell: string;
303
305
  WrapEth: string;
@@ -446,6 +448,7 @@ export declare const actionAddresses: {
446
448
  CurveUsdPayback?: undefined;
447
449
  CurveUsdSupply?: undefined;
448
450
  CurveUsdWithdraw?: undefined;
451
+ CurveUsdSelfLiquidate?: undefined;
449
452
  AaveV3RatioTrigger?: undefined;
450
453
  };
451
454
  };
@@ -169,11 +169,12 @@ export const actionAddresses = {
169
169
  CompV3Transfer: '0xeD7450e9C17146476137b77198DFfB17857906c4',
170
170
  CompV3Withdraw: '0x0b0F21EDE32DE4243D9145a899E97FC2366Aec46',
171
171
  // crvUSD
172
- CurveUsdBorrow: '0x1BA4D23c1af6a57257bA54DDb9Dbc009941924a6',
173
- CurveUsdCreate: '0x8Be91C3a8095B7086ea950f4E4AeF16eDe47Df25',
174
- CurveUsdPayback: '0x9BD581efD76DeC4FA4a71B9e583094874fE1d9Ab',
175
- CurveUsdSupply: '0x3eA5d08F8f7d6bA52DAa88c47E349125437e0eEA',
176
- CurveUsdWithdraw: '0xa05Afb6C7f8b7B76B890c0839A4ceC17667Cde29',
172
+ CurveUsdBorrow: '0x6493Aa22802B97d2a1E0bF0248135258113D7358',
173
+ CurveUsdCreate: '0xE934d90FBACBeb3c13Be90061383b419415d5F9B',
174
+ CurveUsdPayback: '0x667E2Ef4371E3Da4aa3e09Cde18c908B10868C38',
175
+ CurveUsdSupply: '0x08e50Dc1a22282A003Cff9AC6ef1A687acfe18c2',
176
+ CurveUsdWithdraw: '0x5Ed2b787D2f76Ff0Ff5c789c9F48b5a8BaeBf56b',
177
+ CurveUsdSelfLiquidate: '0x47E8235A038BcBD979041E974F02b0A4eAe69fC3',
177
178
  },
178
179
  [NETWORKS.optimism.chainId]: {
179
180
  DFSSell: '0xC6c601fcAa870efd26C624F8c65fbc54cBe533b1',
@@ -157,6 +157,7 @@ declare const actionAddressesAllChains: {
157
157
  CurveUsdPayback: string;
158
158
  CurveUsdSupply: string;
159
159
  CurveUsdWithdraw: string;
160
+ CurveUsdSelfLiquidate: string;
160
161
  AaveV3RatioTrigger?: undefined;
161
162
  GasFeeTakerL2?: undefined;
162
163
  AaveV3RatioCheck?: undefined;
@@ -309,6 +310,7 @@ declare const actionAddressesAllChains: {
309
310
  CurveUsdPayback?: undefined;
310
311
  CurveUsdSupply?: undefined;
311
312
  CurveUsdWithdraw?: undefined;
313
+ CurveUsdSelfLiquidate?: undefined;
312
314
  } | {
313
315
  DFSSell: string;
314
316
  WrapEth: string;
@@ -457,6 +459,7 @@ declare const actionAddressesAllChains: {
457
459
  CurveUsdPayback?: undefined;
458
460
  CurveUsdSupply?: undefined;
459
461
  CurveUsdWithdraw?: undefined;
462
+ CurveUsdSelfLiquidate?: undefined;
460
463
  AaveV3RatioTrigger?: undefined;
461
464
  };
462
465
  };
@@ -606,6 +609,7 @@ declare const actionAddresses: (chainId?: null) => {
606
609
  CurveUsdPayback: string;
607
610
  CurveUsdSupply: string;
608
611
  CurveUsdWithdraw: string;
612
+ CurveUsdSelfLiquidate: string;
609
613
  AaveV3RatioTrigger?: undefined;
610
614
  GasFeeTakerL2?: undefined;
611
615
  AaveV3RatioCheck?: undefined;
@@ -758,6 +762,7 @@ declare const actionAddresses: (chainId?: null) => {
758
762
  CurveUsdPayback?: undefined;
759
763
  CurveUsdSupply?: undefined;
760
764
  CurveUsdWithdraw?: undefined;
765
+ CurveUsdSelfLiquidate?: undefined;
761
766
  } | {
762
767
  DFSSell: string;
763
768
  WrapEth: string;
@@ -906,6 +911,7 @@ declare const actionAddresses: (chainId?: null) => {
906
911
  CurveUsdPayback?: undefined;
907
912
  CurveUsdSupply?: undefined;
908
913
  CurveUsdWithdraw?: undefined;
914
+ CurveUsdSelfLiquidate?: undefined;
909
915
  AaveV3RatioTrigger?: undefined;
910
916
  };
911
917
  declare const otherAddressesAllChains: {
@@ -1152,6 +1158,7 @@ declare const _default: {
1152
1158
  CurveUsdPayback: string;
1153
1159
  CurveUsdSupply: string;
1154
1160
  CurveUsdWithdraw: string;
1161
+ CurveUsdSelfLiquidate: string;
1155
1162
  AaveV3RatioTrigger?: undefined;
1156
1163
  GasFeeTakerL2?: undefined;
1157
1164
  AaveV3RatioCheck?: undefined;
@@ -1304,6 +1311,7 @@ declare const _default: {
1304
1311
  CurveUsdPayback?: undefined;
1305
1312
  CurveUsdSupply?: undefined;
1306
1313
  CurveUsdWithdraw?: undefined;
1314
+ CurveUsdSelfLiquidate?: undefined;
1307
1315
  } | {
1308
1316
  DFSSell: string;
1309
1317
  WrapEth: string;
@@ -1452,6 +1460,7 @@ declare const _default: {
1452
1460
  CurveUsdPayback?: undefined;
1453
1461
  CurveUsdSupply?: undefined;
1454
1462
  CurveUsdWithdraw?: undefined;
1463
+ CurveUsdSelfLiquidate?: undefined;
1455
1464
  AaveV3RatioTrigger?: undefined;
1456
1465
  };
1457
1466
  actionAddressesAllChains: {
@@ -1601,6 +1610,7 @@ declare const _default: {
1601
1610
  CurveUsdPayback: string;
1602
1611
  CurveUsdSupply: string;
1603
1612
  CurveUsdWithdraw: string;
1613
+ CurveUsdSelfLiquidate: string;
1604
1614
  AaveV3RatioTrigger?: undefined;
1605
1615
  GasFeeTakerL2?: undefined;
1606
1616
  AaveV3RatioCheck?: undefined;
@@ -1753,6 +1763,7 @@ declare const _default: {
1753
1763
  CurveUsdPayback?: undefined;
1754
1764
  CurveUsdSupply?: undefined;
1755
1765
  CurveUsdWithdraw?: undefined;
1766
+ CurveUsdSelfLiquidate?: undefined;
1756
1767
  } | {
1757
1768
  DFSSell: string;
1758
1769
  WrapEth: string;
@@ -1901,6 +1912,7 @@ declare const _default: {
1901
1912
  CurveUsdPayback?: undefined;
1902
1913
  CurveUsdSupply?: undefined;
1903
1914
  CurveUsdWithdraw?: undefined;
1915
+ CurveUsdSelfLiquidate?: undefined;
1904
1916
  AaveV3RatioTrigger?: undefined;
1905
1917
  };
1906
1918
  };
@@ -7,9 +7,19 @@ export declare const curveusdMarkets: {
7
7
  controllerAddress: string;
8
8
  debtAvailableBlock: number;
9
9
  };
10
+ WBTC: {
11
+ controllerAddress: string;
12
+ debtAvailableBlock: number;
13
+ };
14
+ WETH: {
15
+ controllerAddress: string;
16
+ debtAvailableBlock: number;
17
+ };
10
18
  };
11
19
  export declare const controllerToAssetMap: {
12
20
  '0x8472a9a7632b173c8cf3a86d3afec50c35548e76': string;
13
21
  '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE': string;
22
+ '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67': string;
23
+ '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635': string;
14
24
  };
15
25
  export declare const controllerFactoryAddress = "0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC";
@@ -2,9 +2,13 @@
2
2
  export const curveusdMarkets = {
3
3
  sfrxETH: { controllerAddress: '0x8472a9a7632b173c8cf3a86d3afec50c35548e76', debtAvailableBlock: 17425859 },
4
4
  wstETH: { controllerAddress: '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE', debtAvailableBlock: 17487165 },
5
+ WBTC: { controllerAddress: '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67', debtAvailableBlock: 17563176 },
6
+ WETH: { controllerAddress: '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635', debtAvailableBlock: 17563176 },
5
7
  };
6
8
  export const controllerToAssetMap = {
7
9
  '0x8472a9a7632b173c8cf3a86d3afec50c35548e76': '0xac3E018457B222d93114458476f3E3416Abbe38F',
8
10
  '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE': '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
11
+ '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67': '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
12
+ '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
9
13
  };
10
14
  export const controllerFactoryAddress = '0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -0,0 +1,32 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256, bytes } from '../../types';
5
+
6
+ /**
7
+ *
8
+ * @category CurveUsd
9
+ */
10
+ export class CurveUsdLevCreateAction extends Action {
11
+ constructor(
12
+ controllerAddress: EthAddress,
13
+ collateralAmount: uint256,
14
+ debtAmount: uint256,
15
+ minAmount: uint256,
16
+ nBands: uint256,
17
+ from: EthAddress,
18
+ additionData: bytes,
19
+ ) {
20
+ requireAddress(from);
21
+ super(
22
+ 'CurveUsdLevCreate',
23
+ getAddr('CurveUsdLevCreate'),
24
+ ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'],
25
+ [controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData],
26
+ );
27
+
28
+ this.mappableArgs = [
29
+ ...this.args,
30
+ ];
31
+ }
32
+ }
@@ -1,6 +1,8 @@
1
1
  import { Action } from '../../Action';
2
2
  import { getAddr } from '../../addresses';
3
- import { EthAddress, uint256, int256 } from '../../types';
3
+ import {
4
+ EthAddress, uint256, int256, bytes,
5
+ } from '../../types';
4
6
 
5
7
  /**
6
8
  *
@@ -11,13 +13,14 @@ export class CurveUsdRepayAction extends Action {
11
13
  controllerAddress: EthAddress,
12
14
  collAmount: uint256,
13
15
  to: EthAddress,
14
- swapData: int256[],
16
+ minAmount: uint256,
17
+ additionData: bytes,
15
18
  ) {
16
19
  super(
17
20
  'CurveUsdRepay',
18
21
  getAddr('CurveUsdRepay'),
19
- ['address', 'uint256', 'address', 'uint256[]'],
20
- [controllerAddress, collAmount, to, swapData],
22
+ ['address', 'uint256', 'address', 'uint256', 'bytes'],
23
+ [controllerAddress, collAmount, to, minAmount, additionData],
21
24
  );
22
25
 
23
26
  this.mappableArgs = [
@@ -0,0 +1,41 @@
1
+ import { getAssetInfo } from '@defisaver/tokens';
2
+ import { Action } from '../../Action';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256, int256 } from '../../types';
5
+
6
+ /**
7
+ *
8
+ * @category CurveUsd
9
+ */
10
+ export class CurveUsdSelfLiquidateAction extends Action {
11
+ /**
12
+ @param controllerAddress Address of the curveusd market controller
13
+ @param minCrvUsdExpected Minimum amount of crvUsd as collateral for the user to have
14
+ @param from Address from which to pull crvUSD if needed
15
+ @param to Address that will receive the crvUSD and collateral asset
16
+ */
17
+ constructor(
18
+ controllerAddress: EthAddress,
19
+ minCrvUsdExpected: uint256,
20
+ from: EthAddress,
21
+ to: EthAddress,
22
+ ) {
23
+ super(
24
+ 'CurveUsdSelfLiquidate',
25
+ getAddr('CurveUsdSelfLiquidate'),
26
+ ['address', 'uint256', 'address', 'address'],
27
+ [controllerAddress, minCrvUsdExpected, from, to],
28
+ );
29
+
30
+ this.mappableArgs = [
31
+ ...this.args,
32
+ ];
33
+ }
34
+
35
+ async getAssetsToApprove() {
36
+ return [{
37
+ owner: this.args[1],
38
+ asset: getAssetInfo('crvUSD').address,
39
+ }];
40
+ }
41
+ }
@@ -0,0 +1,32 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256, bytes } from '../../types';
5
+
6
+ /**
7
+ *
8
+ * @category CurveUsd
9
+ */
10
+ export class CurveUsdSelfLiquidateWithCollAction extends Action {
11
+ constructor(
12
+ controllerAddress: EthAddress,
13
+ percentage: uint256,
14
+ minCrvUsdExpected: uint256,
15
+ swapAmount: uint256,
16
+ minAmount: uint256,
17
+ to: EthAddress,
18
+ additionData: bytes,
19
+ ) {
20
+ requireAddress(to);
21
+ super(
22
+ 'CurveUsdSelfLiquidateWithColl',
23
+ getAddr('CurveUsdSelfLiquidateWithColl'),
24
+ ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'],
25
+ [controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData],
26
+ );
27
+
28
+ this.mappableArgs = [
29
+ ...this.args,
30
+ ];
31
+ }
32
+ }
@@ -4,4 +4,7 @@ export * from './CurveUsdWithdrawAction';
4
4
  export * from './CurveUsdBorrowAction';
5
5
  export * from './CurveUsdPaybackAction';
6
6
  export * from './CurveUsdRepayAction';
7
+ export * from './CurveUsdSelfLiquidateAction';
8
+ export * from './CurveUsdLevCreateAction';
9
+ export * from './CurveUsdSelfLiquidateWithCollAction';
7
10
 
@@ -32,7 +32,7 @@ export class FLAction extends Action {
32
32
  if (specificFLAction.constructor.name === 'MakerFlashLoanAction') {
33
33
  argsToReturn[5] = [4];
34
34
  }
35
- if (specificFLAction.constructor.name === 'AaveV3FlashLoanNoFeeAction') {
35
+ if (specificFLAction.constructor.name === 'AaveV3FlashLoanAction') {
36
36
  argsToReturn[5] = [5];
37
37
  }
38
38
  return argsToReturn;
package/src/addresses.ts CHANGED
@@ -202,11 +202,12 @@ export const actionAddresses = {
202
202
  CompV3Withdraw: '0x0b0F21EDE32DE4243D9145a899E97FC2366Aec46',
203
203
 
204
204
  // crvUSD
205
- CurveUsdBorrow: '0x1BA4D23c1af6a57257bA54DDb9Dbc009941924a6',
206
- CurveUsdCreate: '0x8Be91C3a8095B7086ea950f4E4AeF16eDe47Df25',
207
- CurveUsdPayback: '0x9BD581efD76DeC4FA4a71B9e583094874fE1d9Ab',
208
- CurveUsdSupply: '0x3eA5d08F8f7d6bA52DAa88c47E349125437e0eEA',
209
- CurveUsdWithdraw: '0xa05Afb6C7f8b7B76B890c0839A4ceC17667Cde29',
205
+ CurveUsdBorrow: '0x6493Aa22802B97d2a1E0bF0248135258113D7358',
206
+ CurveUsdCreate: '0xE934d90FBACBeb3c13Be90061383b419415d5F9B',
207
+ CurveUsdPayback: '0x667E2Ef4371E3Da4aa3e09Cde18c908B10868C38',
208
+ CurveUsdSupply: '0x08e50Dc1a22282A003Cff9AC6ef1A687acfe18c2',
209
+ CurveUsdWithdraw: '0x5Ed2b787D2f76Ff0Ff5c789c9F48b5a8BaeBf56b',
210
+ CurveUsdSelfLiquidate: '0x47E8235A038BcBD979041E974F02b0A4eAe69fC3',
210
211
  },
211
212
  [NETWORKS.optimism.chainId]: {
212
213
  DFSSell: '0xC6c601fcAa870efd26C624F8c65fbc54cBe533b1',
@@ -2,11 +2,15 @@
2
2
  export const curveusdMarkets = {
3
3
  sfrxETH: { controllerAddress: '0x8472a9a7632b173c8cf3a86d3afec50c35548e76', debtAvailableBlock: 17425859 },
4
4
  wstETH: { controllerAddress: '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE', debtAvailableBlock: 17487165 },
5
+ WBTC: { controllerAddress: '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67', debtAvailableBlock: 17563176 },
6
+ WETH: { controllerAddress: '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635', debtAvailableBlock: 17563176 },
5
7
  };
6
8
 
7
9
  export const controllerToAssetMap = {
8
10
  '0x8472a9a7632b173c8cf3a86d3afec50c35548e76': '0xac3E018457B222d93114458476f3E3416Abbe38F',
9
11
  '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE': '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
12
+ '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67': '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
13
+ '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
10
14
  };
11
15
 
12
16
  export const controllerFactoryAddress = '0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC';
package/umd/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  exports["defisaver-sdk"] = factory(require("web3-eth-abi"), require("web3-utils"), require("decimal.js"), require("@defisaver/tokens"), require("@ethersproject/solidity"), require("@ethersproject/address"), require("axios"));
8
8
  else
9
9
  root["defisaver-sdk"] = factory(root["web3-eth-abi"], root["web3-utils"], root["decimal.js"], root["@defisaver/tokens"], root["@ethersproject/solidity"], root["@ethersproject/address"], root["axios"]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__105__, __WEBPACK_EXTERNAL_MODULE__106__, __WEBPACK_EXTERNAL_MODULE__251__) => {
10
+ })(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__105__, __WEBPACK_EXTERNAL_MODULE__106__, __WEBPACK_EXTERNAL_MODULE__254__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ([
@@ -1413,11 +1413,12 @@ var actionAddresses = {
1413
1413
  CompV3Transfer: '0xeD7450e9C17146476137b77198DFfB17857906c4',
1414
1414
  CompV3Withdraw: '0x0b0F21EDE32DE4243D9145a899E97FC2366Aec46',
1415
1415
  // crvUSD
1416
- CurveUsdBorrow: '0x1BA4D23c1af6a57257bA54DDb9Dbc009941924a6',
1417
- CurveUsdCreate: '0x8Be91C3a8095B7086ea950f4E4AeF16eDe47Df25',
1418
- CurveUsdPayback: '0x9BD581efD76DeC4FA4a71B9e583094874fE1d9Ab',
1419
- CurveUsdSupply: '0x3eA5d08F8f7d6bA52DAa88c47E349125437e0eEA',
1420
- CurveUsdWithdraw: '0xa05Afb6C7f8b7B76B890c0839A4ceC17667Cde29'
1416
+ CurveUsdBorrow: '0x6493Aa22802B97d2a1E0bF0248135258113D7358',
1417
+ CurveUsdCreate: '0xE934d90FBACBeb3c13Be90061383b419415d5F9B',
1418
+ CurveUsdPayback: '0x667E2Ef4371E3Da4aa3e09Cde18c908B10868C38',
1419
+ CurveUsdSupply: '0x08e50Dc1a22282A003Cff9AC6ef1A687acfe18c2',
1420
+ CurveUsdWithdraw: '0x5Ed2b787D2f76Ff0Ff5c789c9F48b5a8BaeBf56b',
1421
+ CurveUsdSelfLiquidate: '0x47E8235A038BcBD979041E974F02b0A4eAe69fC3'
1421
1422
  },
1422
1423
  [_config__WEBPACK_IMPORTED_MODULE_0__.NETWORKS.optimism.chainId]: {
1423
1424
  DFSSell: '0xC6c601fcAa870efd26C624F8c65fbc54cBe533b1',
@@ -4109,7 +4110,7 @@ function _handleArgs2(specificFLAction) {
4109
4110
  if (specificFLAction.constructor.name === 'MakerFlashLoanAction') {
4110
4111
  argsToReturn[5] = [4];
4111
4112
  }
4112
- if (specificFLAction.constructor.name === 'AaveV3FlashLoanNoFeeAction') {
4113
+ if (specificFLAction.constructor.name === 'AaveV3FlashLoanAction') {
4113
4114
  argsToReturn[5] = [5];
4114
4115
  }
4115
4116
  return argsToReturn;
@@ -9096,8 +9097,11 @@ __webpack_require__.r(__webpack_exports__);
9096
9097
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9097
9098
  /* harmony export */ "CurveUsdBorrowAction": () => (/* reexport safe */ _CurveUsdBorrowAction__WEBPACK_IMPORTED_MODULE_3__.CurveUsdBorrowAction),
9098
9099
  /* harmony export */ "CurveUsdCreateAction": () => (/* reexport safe */ _CurveUsdCreateAction__WEBPACK_IMPORTED_MODULE_0__.CurveUsdCreateAction),
9100
+ /* harmony export */ "CurveUsdLevCreateAction": () => (/* reexport safe */ _CurveUsdLevCreateAction__WEBPACK_IMPORTED_MODULE_7__.CurveUsdLevCreateAction),
9099
9101
  /* harmony export */ "CurveUsdPaybackAction": () => (/* reexport safe */ _CurveUsdPaybackAction__WEBPACK_IMPORTED_MODULE_4__.CurveUsdPaybackAction),
9100
9102
  /* harmony export */ "CurveUsdRepayAction": () => (/* reexport safe */ _CurveUsdRepayAction__WEBPACK_IMPORTED_MODULE_5__.CurveUsdRepayAction),
9103
+ /* harmony export */ "CurveUsdSelfLiquidateAction": () => (/* reexport safe */ _CurveUsdSelfLiquidateAction__WEBPACK_IMPORTED_MODULE_6__.CurveUsdSelfLiquidateAction),
9104
+ /* harmony export */ "CurveUsdSelfLiquidateWithCollAction": () => (/* reexport safe */ _CurveUsdSelfLiquidateWithCollAction__WEBPACK_IMPORTED_MODULE_8__.CurveUsdSelfLiquidateWithCollAction),
9101
9105
  /* harmony export */ "CurveUsdSupplyAction": () => (/* reexport safe */ _CurveUsdSupplyAction__WEBPACK_IMPORTED_MODULE_1__.CurveUsdSupplyAction),
9102
9106
  /* harmony export */ "CurveUsdWithdrawAction": () => (/* reexport safe */ _CurveUsdWithdrawAction__WEBPACK_IMPORTED_MODULE_2__.CurveUsdWithdrawAction)
9103
9107
  /* harmony export */ });
@@ -9107,6 +9111,12 @@ __webpack_require__.r(__webpack_exports__);
9107
9111
  /* harmony import */ var _CurveUsdBorrowAction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(232);
9108
9112
  /* harmony import */ var _CurveUsdPaybackAction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(233);
9109
9113
  /* harmony import */ var _CurveUsdRepayAction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(234);
9114
+ /* harmony import */ var _CurveUsdSelfLiquidateAction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
9115
+ /* harmony import */ var _CurveUsdLevCreateAction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(236);
9116
+ /* harmony import */ var _CurveUsdSelfLiquidateWithCollAction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(237);
9117
+
9118
+
9119
+
9110
9120
 
9111
9121
 
9112
9122
 
@@ -9183,11 +9193,21 @@ var curveusdMarkets = {
9183
9193
  wstETH: {
9184
9194
  controllerAddress: '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE',
9185
9195
  debtAvailableBlock: 17487165
9196
+ },
9197
+ WBTC: {
9198
+ controllerAddress: '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67',
9199
+ debtAvailableBlock: 17563176
9200
+ },
9201
+ WETH: {
9202
+ controllerAddress: '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635',
9203
+ debtAvailableBlock: 17563176
9186
9204
  }
9187
9205
  };
9188
9206
  var controllerToAssetMap = {
9189
9207
  '0x8472a9a7632b173c8cf3a86d3afec50c35548e76': '0xac3E018457B222d93114458476f3E3416Abbe38F',
9190
- '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE': '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'
9208
+ '0x100dAa78fC509Db39Ef7D04DE0c1ABD299f4C6CE': '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
9209
+ '0x4e59541306910ad6dc1dac0ac9dfb29bd9f15c67': '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
9210
+ '0xa920de414ea4ab66b97da1bfe9e6eca7d4219635': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
9191
9211
  };
9192
9212
  var controllerFactoryAddress = '0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC';
9193
9213
 
@@ -9363,8 +9383,8 @@ __webpack_require__.r(__webpack_exports__);
9363
9383
  * @category CurveUsd
9364
9384
  */
9365
9385
  class CurveUsdRepayAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9366
- constructor(controllerAddress, collAmount, to, swapData) {
9367
- super('CurveUsdRepay', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('CurveUsdRepay'), ['address', 'uint256', 'address', 'uint256[]'], [controllerAddress, collAmount, to, swapData]);
9386
+ constructor(controllerAddress, collAmount, to, minAmount, additionData) {
9387
+ super('CurveUsdRepay', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('CurveUsdRepay'), ['address', 'uint256', 'address', 'uint256', 'bytes'], [controllerAddress, collAmount, to, minAmount, additionData]);
9368
9388
  this.mappableArgs = [...this.args];
9369
9389
  }
9370
9390
  }
@@ -9373,6 +9393,101 @@ class CurveUsdRepayAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9373
9393
  /* 235 */
9374
9394
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9375
9395
 
9396
+ __webpack_require__.r(__webpack_exports__);
9397
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9398
+ /* harmony export */ "CurveUsdSelfLiquidateAction": () => (/* binding */ CurveUsdSelfLiquidateAction)
9399
+ /* harmony export */ });
9400
+ /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
9401
+ /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_0__);
9402
+ /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
9403
+ /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
9404
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9405
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9406
+
9407
+
9408
+
9409
+ /**
9410
+ *
9411
+ * @category CurveUsd
9412
+ */
9413
+ class CurveUsdSelfLiquidateAction extends _Action__WEBPACK_IMPORTED_MODULE_1__.Action {
9414
+ /**
9415
+ @param controllerAddress Address of the curveusd market controller
9416
+ @param minCrvUsdExpected Minimum amount of crvUsd as collateral for the user to have
9417
+ @param from Address from which to pull crvUSD if needed
9418
+ @param to Address that will receive the crvUSD and collateral asset
9419
+ */
9420
+ constructor(controllerAddress, minCrvUsdExpected, from, to) {
9421
+ super('CurveUsdSelfLiquidate', (0,_addresses__WEBPACK_IMPORTED_MODULE_2__.getAddr)('CurveUsdSelfLiquidate'), ['address', 'uint256', 'address', 'address'], [controllerAddress, minCrvUsdExpected, from, to]);
9422
+ this.mappableArgs = [...this.args];
9423
+ }
9424
+ getAssetsToApprove() {
9425
+ var _this = this;
9426
+ return _asyncToGenerator(function* () {
9427
+ return [{
9428
+ owner: _this.args[1],
9429
+ asset: (0,_defisaver_tokens__WEBPACK_IMPORTED_MODULE_0__.getAssetInfo)('crvUSD').address
9430
+ }];
9431
+ })();
9432
+ }
9433
+ }
9434
+
9435
+ /***/ }),
9436
+ /* 236 */
9437
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9438
+
9439
+ __webpack_require__.r(__webpack_exports__);
9440
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9441
+ /* harmony export */ "CurveUsdLevCreateAction": () => (/* binding */ CurveUsdLevCreateAction)
9442
+ /* harmony export */ });
9443
+ /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
9444
+ /* harmony import */ var _utils_general__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
9445
+ /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
9446
+
9447
+
9448
+
9449
+ /**
9450
+ *
9451
+ * @category CurveUsd
9452
+ */
9453
+ class CurveUsdLevCreateAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9454
+ constructor(controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData) {
9455
+ (0,_utils_general__WEBPACK_IMPORTED_MODULE_1__.requireAddress)(from);
9456
+ super('CurveUsdLevCreate', (0,_addresses__WEBPACK_IMPORTED_MODULE_2__.getAddr)('CurveUsdLevCreate'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'], [controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData]);
9457
+ this.mappableArgs = [...this.args];
9458
+ }
9459
+ }
9460
+
9461
+ /***/ }),
9462
+ /* 237 */
9463
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9464
+
9465
+ __webpack_require__.r(__webpack_exports__);
9466
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9467
+ /* harmony export */ "CurveUsdSelfLiquidateWithCollAction": () => (/* binding */ CurveUsdSelfLiquidateWithCollAction)
9468
+ /* harmony export */ });
9469
+ /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
9470
+ /* harmony import */ var _utils_general__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
9471
+ /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
9472
+
9473
+
9474
+
9475
+ /**
9476
+ *
9477
+ * @category CurveUsd
9478
+ */
9479
+ class CurveUsdSelfLiquidateWithCollAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9480
+ constructor(controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData) {
9481
+ (0,_utils_general__WEBPACK_IMPORTED_MODULE_1__.requireAddress)(to);
9482
+ super('CurveUsdSelfLiquidateWithColl', (0,_addresses__WEBPACK_IMPORTED_MODULE_2__.getAddr)('CurveUsdSelfLiquidateWithColl'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes'], [controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData]);
9483
+ this.mappableArgs = [...this.args];
9484
+ }
9485
+ }
9486
+
9487
+ /***/ }),
9488
+ /* 238 */
9489
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9490
+
9376
9491
  __webpack_require__.r(__webpack_exports__);
9377
9492
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9378
9493
  /* harmony export */ "AaveV3QuotePriceTrigger": () => (/* reexport safe */ _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__.AaveV3QuotePriceTrigger),
@@ -9389,19 +9504,19 @@ __webpack_require__.r(__webpack_exports__);
9389
9504
  /* harmony export */ "TrailingStopTrigger": () => (/* reexport safe */ _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__.TrailingStopTrigger),
9390
9505
  /* harmony export */ "UniV3CurrentTickTrigger": () => (/* reexport safe */ _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__.UniV3CurrentTickTrigger)
9391
9506
  /* harmony export */ });
9392
- /* harmony import */ var _MakerRatioTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(236);
9393
- /* harmony import */ var _ChainLinkPriceTrigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(237);
9394
- /* harmony import */ var _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(238);
9395
- /* harmony import */ var _TimestampTrigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(239);
9396
- /* harmony import */ var _GasPriceTrigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(240);
9397
- /* harmony import */ var _CompoundRatioTrigger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
9398
- /* harmony import */ var _ReflexerRatioTrigger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(242);
9399
- /* harmony import */ var _LiquityRatioTrigger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(243);
9400
- /* harmony import */ var _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(244);
9401
- /* harmony import */ var _CompV3RatioTrigger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(245);
9402
- /* harmony import */ var _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(246);
9403
- /* harmony import */ var _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(247);
9404
- /* harmony import */ var _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(248);
9507
+ /* harmony import */ var _MakerRatioTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
9508
+ /* harmony import */ var _ChainLinkPriceTrigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
9509
+ /* harmony import */ var _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
9510
+ /* harmony import */ var _TimestampTrigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(242);
9511
+ /* harmony import */ var _GasPriceTrigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(243);
9512
+ /* harmony import */ var _CompoundRatioTrigger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(244);
9513
+ /* harmony import */ var _ReflexerRatioTrigger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(245);
9514
+ /* harmony import */ var _LiquityRatioTrigger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(246);
9515
+ /* harmony import */ var _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(247);
9516
+ /* harmony import */ var _CompV3RatioTrigger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(248);
9517
+ /* harmony import */ var _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(249);
9518
+ /* harmony import */ var _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(250);
9519
+ /* harmony import */ var _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(251);
9405
9520
 
9406
9521
 
9407
9522
 
@@ -9417,7 +9532,7 @@ __webpack_require__.r(__webpack_exports__);
9417
9532
 
9418
9533
 
9419
9534
  /***/ }),
9420
- /* 236 */
9535
+ /* 239 */
9421
9536
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9422
9537
 
9423
9538
  __webpack_require__.r(__webpack_exports__);
@@ -9440,7 +9555,7 @@ class MakerRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9440
9555
  }
9441
9556
 
9442
9557
  /***/ }),
9443
- /* 237 */
9558
+ /* 240 */
9444
9559
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9445
9560
 
9446
9561
  __webpack_require__.r(__webpack_exports__);
@@ -9463,7 +9578,7 @@ class ChainLinkPriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
9463
9578
  }
9464
9579
 
9465
9580
  /***/ }),
9466
- /* 238 */
9581
+ /* 241 */
9467
9582
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9468
9583
 
9469
9584
  __webpack_require__.r(__webpack_exports__);
@@ -9486,7 +9601,7 @@ class UniV3CurrentTickTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Actio
9486
9601
  }
9487
9602
 
9488
9603
  /***/ }),
9489
- /* 239 */
9604
+ /* 242 */
9490
9605
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9491
9606
 
9492
9607
  __webpack_require__.r(__webpack_exports__);
@@ -9509,7 +9624,7 @@ class TimestampTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9509
9624
  }
9510
9625
 
9511
9626
  /***/ }),
9512
- /* 240 */
9627
+ /* 243 */
9513
9628
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9514
9629
 
9515
9630
  __webpack_require__.r(__webpack_exports__);
@@ -9532,7 +9647,7 @@ class GasPriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9532
9647
  }
9533
9648
 
9534
9649
  /***/ }),
9535
- /* 241 */
9650
+ /* 244 */
9536
9651
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9537
9652
 
9538
9653
  __webpack_require__.r(__webpack_exports__);
@@ -9555,7 +9670,7 @@ class CompoundRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9555
9670
  }
9556
9671
 
9557
9672
  /***/ }),
9558
- /* 242 */
9673
+ /* 245 */
9559
9674
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9560
9675
 
9561
9676
  __webpack_require__.r(__webpack_exports__);
@@ -9578,7 +9693,7 @@ class ReflexerRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9578
9693
  }
9579
9694
 
9580
9695
  /***/ }),
9581
- /* 243 */
9696
+ /* 246 */
9582
9697
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9583
9698
 
9584
9699
  __webpack_require__.r(__webpack_exports__);
@@ -9601,7 +9716,7 @@ class LiquityRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9601
9716
  }
9602
9717
 
9603
9718
  /***/ }),
9604
- /* 244 */
9719
+ /* 247 */
9605
9720
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9606
9721
 
9607
9722
  __webpack_require__.r(__webpack_exports__);
@@ -9624,7 +9739,7 @@ class AaveV3RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9624
9739
  }
9625
9740
 
9626
9741
  /***/ }),
9627
- /* 245 */
9742
+ /* 248 */
9628
9743
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9629
9744
 
9630
9745
  __webpack_require__.r(__webpack_exports__);
@@ -9647,7 +9762,7 @@ class CompV3RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9647
9762
  }
9648
9763
 
9649
9764
  /***/ }),
9650
- /* 246 */
9765
+ /* 249 */
9651
9766
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9652
9767
 
9653
9768
  __webpack_require__.r(__webpack_exports__);
@@ -9670,7 +9785,7 @@ class TrailingStopTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9670
9785
  }
9671
9786
 
9672
9787
  /***/ }),
9673
- /* 247 */
9788
+ /* 250 */
9674
9789
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9675
9790
 
9676
9791
  __webpack_require__.r(__webpack_exports__);
@@ -9693,7 +9808,7 @@ class CBRebondTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
9693
9808
  }
9694
9809
 
9695
9810
  /***/ }),
9696
- /* 248 */
9811
+ /* 251 */
9697
9812
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9698
9813
 
9699
9814
  __webpack_require__.r(__webpack_exports__);
@@ -9716,7 +9831,7 @@ class AaveV3QuotePriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Actio
9716
9831
  }
9717
9832
 
9718
9833
  /***/ }),
9719
- /* 249 */
9834
+ /* 252 */
9720
9835
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9721
9836
 
9722
9837
  __webpack_require__.r(__webpack_exports__);
@@ -9729,9 +9844,9 @@ __webpack_require__.r(__webpack_exports__);
9729
9844
  /* harmony export */ "uniswapV3LP": () => (/* reexport module object */ _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__),
9730
9845
  /* harmony export */ "zeroExExchange": () => (/* reexport module object */ _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__)
9731
9846
  /* harmony export */ });
9732
- /* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(250);
9847
+ /* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(253);
9733
9848
  /* harmony import */ var _uniswapLP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
9734
- /* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(252);
9849
+ /* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
9735
9850
  /* harmony import */ var _convex_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194);
9736
9851
  /* harmony import */ var _mstableAssetPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
9737
9852
  /* harmony import */ var _curve_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(162);
@@ -9746,7 +9861,7 @@ __webpack_require__.r(__webpack_exports__);
9746
9861
 
9747
9862
 
9748
9863
  /***/ }),
9749
- /* 250 */
9864
+ /* 253 */
9750
9865
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9751
9866
 
9752
9867
  __webpack_require__.r(__webpack_exports__);
@@ -9757,7 +9872,7 @@ __webpack_require__.r(__webpack_exports__);
9757
9872
  /* harmony export */ });
9758
9873
  /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
9759
9874
  /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(decimal_js__WEBPACK_IMPORTED_MODULE_0__);
9760
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
9875
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254);
9761
9876
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
9762
9877
  /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
9763
9878
  /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__);
@@ -9960,20 +10075,20 @@ var createSellAction = /*#__PURE__*/function () {
9960
10075
  }();
9961
10076
 
9962
10077
  /***/ }),
9963
- /* 251 */
10078
+ /* 254 */
9964
10079
  /***/ ((module) => {
9965
10080
 
9966
- module.exports = __WEBPACK_EXTERNAL_MODULE__251__;
10081
+ module.exports = __WEBPACK_EXTERNAL_MODULE__254__;
9967
10082
 
9968
10083
  /***/ }),
9969
- /* 252 */
10084
+ /* 255 */
9970
10085
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9971
10086
 
9972
10087
  __webpack_require__.r(__webpack_exports__);
9973
10088
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9974
10089
  /* harmony export */ "getAssetAddrByTokenId": () => (/* binding */ getAssetAddrByTokenId)
9975
10090
  /* harmony export */ });
9976
- /* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(253);
10091
+ /* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(256);
9977
10092
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9978
10093
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9979
10094
  /**
@@ -9998,7 +10113,7 @@ var getAssetAddrByTokenId = /*#__PURE__*/function () {
9998
10113
  }();
9999
10114
 
10000
10115
  /***/ }),
10001
- /* 253 */
10116
+ /* 256 */
10002
10117
  /***/ ((module) => {
10003
10118
 
10004
10119
  module.exports = JSON.parse('[{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"name":"nonce","type":"uint96"},{"name":"operator","type":"address"},{"name":"token0","type":"address"},{"name":"token1","type":"address"},{"name":"fee","type":"uint24"},{"name":"tickLower","type":"int24"},{"name":"tickUpper","type":"int24"},{"name":"liquidity","type":"uint128"},{"name":"feeGrowthInside0LastX128","type":"uint256"},{"name":"feeGrowthInside1LastX128","type":"uint256"},{"name":"tokensOwed0","type":"uint128"},{"name":"tokensOwed1","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"}]');
@@ -10102,8 +10217,8 @@ __webpack_require__.r(__webpack_exports__);
10102
10217
  /* harmony import */ var _Strategy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
10103
10218
  /* harmony import */ var _DfsWeb3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30);
10104
10219
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
10105
- /* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
10106
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(249);
10220
+ /* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(238);
10221
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(252);
10107
10222
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4);
10108
10223
  /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
10109
10224
  /* Export types here */