@defisaver/sdk 1.0.35 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/esm/src/actions/curveusd/CurveUsdBorrowAction.d.ts +15 -0
  2. package/esm/src/actions/curveusd/CurveUsdBorrowAction.js +22 -0
  3. package/esm/src/actions/curveusd/CurveUsdCreateAction.d.ts +22 -0
  4. package/esm/src/actions/curveusd/CurveUsdCreateAction.js +44 -0
  5. package/esm/src/actions/curveusd/CurveUsdLevCreateAction.d.ts +9 -0
  6. package/esm/src/actions/curveusd/CurveUsdLevCreateAction.js +16 -0
  7. package/esm/src/actions/curveusd/CurveUsdPaybackAction.d.ts +22 -0
  8. package/esm/src/actions/curveusd/CurveUsdPaybackAction.js +43 -0
  9. package/esm/src/actions/curveusd/CurveUsdRepayAction.d.ts +9 -0
  10. package/esm/src/actions/curveusd/CurveUsdRepayAction.js +14 -0
  11. package/esm/src/actions/curveusd/CurveUsdSelfLiquidateAction.d.ts +19 -0
  12. package/esm/src/actions/curveusd/CurveUsdSelfLiquidateAction.js +38 -0
  13. package/esm/src/actions/curveusd/CurveUsdSelfLiquidateWithCollAction.d.ts +9 -0
  14. package/esm/src/actions/curveusd/CurveUsdSelfLiquidateWithCollAction.js +16 -0
  15. package/esm/src/actions/curveusd/CurveUsdSupplyAction.d.ts +20 -0
  16. package/esm/src/actions/curveusd/CurveUsdSupplyAction.js +40 -0
  17. package/esm/src/actions/curveusd/CurveUsdWithdrawAction.d.ts +15 -0
  18. package/esm/src/actions/curveusd/CurveUsdWithdrawAction.js +22 -0
  19. package/esm/src/actions/curveusd/index.d.ts +9 -0
  20. package/esm/src/actions/curveusd/index.js +9 -0
  21. package/esm/src/actions/flashloan/FLAction.js +1 -1
  22. package/esm/src/actions/index.d.ts +2 -1
  23. package/esm/src/actions/index.js +2 -1
  24. package/esm/src/addresses.d.ts +30 -0
  25. package/esm/src/addresses.js +11 -0
  26. package/esm/src/index.d.ts +120 -0
  27. package/esm/src/types.d.ts +3 -1
  28. package/esm/src/utils/curveusd-utils.d.ts +20 -0
  29. package/esm/src/utils/curveusd-utils.js +12 -0
  30. package/esm/src/utils/index.d.ts +2 -1
  31. package/esm/src/utils/index.js +2 -1
  32. package/package.json +1 -1
  33. package/src/actions/curveusd/CurveUsdBorrowAction.ts +34 -0
  34. package/src/actions/curveusd/CurveUsdCreateAction.ts +49 -0
  35. package/src/actions/curveusd/CurveUsdLevCreateAction.ts +40 -0
  36. package/src/actions/curveusd/CurveUsdPaybackAction.ts +48 -0
  37. package/src/actions/curveusd/CurveUsdRepayAction.ts +36 -0
  38. package/src/actions/curveusd/CurveUsdSelfLiquidateAction.ts +41 -0
  39. package/src/actions/curveusd/CurveUsdSelfLiquidateWithCollAction.ts +40 -0
  40. package/src/actions/curveusd/CurveUsdSupplyAction.ts +44 -0
  41. package/src/actions/curveusd/CurveUsdWithdrawAction.ts +34 -0
  42. package/src/actions/curveusd/index.ts +10 -0
  43. package/src/actions/flashloan/FLAction.ts +1 -1
  44. package/src/actions/index.ts +2 -0
  45. package/src/addresses.ts +12 -0
  46. package/src/types.ts +3 -1
  47. package/src/utils/curveusd-utils.ts +15 -0
  48. package/src/utils/index.ts +2 -0
  49. package/umd/index.js +448 -41
  50. package/yarn-error.log +3976 -0
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * CurveUsdBorrowAction - Action that borrows crvUSD from proxy curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export declare class CurveUsdBorrowAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address to - Address that will receive the borrowed crvUSD, will default to proxy
12
+ * uint256 debtAmount - Amount of crvUSD to borrow
13
+ */
14
+ constructor(controllerAddress: EthAddress, to: EthAddress, debtAmount: uint256);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * CurveUsdBorrowAction - Action that borrows crvUSD from proxy curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export class CurveUsdBorrowAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address to - Address that will receive the borrowed crvUSD, will default to proxy
12
+ * uint256 debtAmount - Amount of crvUSD to borrow
13
+ */
14
+ /// @dev debtAmount must be non-zero
15
+ /// @dev if debtAmount == uintMax will borrow as much as the collateral will support
16
+ constructor(controllerAddress, to, debtAmount) {
17
+ super('CurveUsdBorrow', getAddr('CurveUsdBorrow'), ['address', 'address', 'uint256'], [controllerAddress, to, debtAmount]);
18
+ this.mappableArgs = [
19
+ ...this.args,
20
+ ];
21
+ }
22
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * CurveUsdCreateAction - Action that creates a curveusd position on behalf of proxy
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export declare class CurveUsdCreateAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address from - Address from which to pull collateral asset, will default to proxy
12
+ * address to - Address that will receive the borrowed crvUSD, will default to proxy
13
+ * uint256 collateralAmount - Amount of collateral asset to supply
14
+ * uint256 debtAmount - Amount of crvUSD to borrow
15
+ * uint256 nBands - Number of bands in which the collateral will be supplied
16
+ */
17
+ constructor(controllerAddress: EthAddress, from: EthAddress, to: EthAddress, collateralAmount: uint256, debtAmount: uint256, nBands: uint256);
18
+ getAssetsToApprove(): Promise<{
19
+ owner: any;
20
+ asset: string;
21
+ }[]>;
22
+ }
@@ -0,0 +1,44 @@
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 { Action } from '../../Action';
11
+ import { requireAddress } from '../../utils/general';
12
+ import { getAddr } from '../../addresses';
13
+ import { controllerToAssetMap } from '../../utils/curveusd-utils';
14
+ /**
15
+ * CurveUsdCreateAction - Action that creates a curveusd position on behalf of proxy
16
+ *
17
+ * @category CurveUsd
18
+ */
19
+ export class CurveUsdCreateAction extends Action {
20
+ /**
21
+ * address controllerAddress - Address of the curveusd market controller
22
+ * address from - Address from which to pull collateral asset, will default to proxy
23
+ * address to - Address that will receive the borrowed crvUSD, will default to proxy
24
+ * uint256 collateralAmount - Amount of collateral asset to supply
25
+ * uint256 debtAmount - Amount of crvUSD to borrow
26
+ * uint256 nBands - Number of bands in which the collateral will be supplied
27
+ */
28
+ /// @dev both collateralAmount and debtAmount must be non-zero and can be maxUint
29
+ constructor(controllerAddress, from, to, collateralAmount, debtAmount, nBands) {
30
+ requireAddress(to);
31
+ super('CurveUsdCreate', getAddr('CurveUsdCreate'), ['address', 'address', 'address', 'uint256', 'uint256', 'uint256'], [controllerAddress, from, to, collateralAmount, debtAmount, nBands]);
32
+ this.mappableArgs = [
33
+ ...this.args,
34
+ ];
35
+ }
36
+ getAssetsToApprove() {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ return [{
39
+ owner: this.args[1],
40
+ asset: controllerToAssetMap[this.args[0]],
41
+ }];
42
+ });
43
+ }
44
+ }
@@ -0,0 +1,9 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, uint32, 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, gasUsed: uint32, dfsFeeDivider: uint32, useSteth: Boolean);
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, gasUsed, dfsFeeDivider, useSteth) {
10
+ requireAddress(from);
11
+ super('CurveUsdLevCreate', getAddr('CurveUsdLevCreate'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes', 'uint32', 'uint32', 'bool'], [controllerAddress, collateralAmount, debtAmount, minAmount, nBands, from, additionData, gasUsed, dfsFeeDivider, useSteth]);
12
+ this.mappableArgs = [
13
+ ...this.args,
14
+ ];
15
+ }
16
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, int256 } from '../../types';
3
+ /**
4
+ * CurveUsdPaybackAction - Action that pays back crvUSD to a curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export declare class CurveUsdPaybackAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address from - Address from which to pull crvUSD, will default to proxy
12
+ * address onBehalfOf - Address for which we are paying back debt, will default to proxy
13
+ * address to - Address that will receive the crvUSD and collateral asset if close, will default to proxy
14
+ * uint256 debtAmount - Amount of crvUSD to payback
15
+ * int256 maxActiveBand - Don't allow active band to be higher than this (to prevent front-running the repay)
16
+ */
17
+ constructor(controllerAddress: EthAddress, from: EthAddress, onBehalfOf: EthAddress, to: EthAddress, debtAmount: uint256, maxActiveBand: int256);
18
+ getAssetsToApprove(): Promise<{
19
+ owner: any;
20
+ asset: string;
21
+ }[]>;
22
+ }
@@ -0,0 +1,43 @@
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
+ * CurveUsdPaybackAction - Action that pays back crvUSD to a curveusd position
15
+ *
16
+ * @category CurveUsd
17
+ */
18
+ export class CurveUsdPaybackAction extends Action {
19
+ /**
20
+ * address controllerAddress - Address of the curveusd market controller
21
+ * address from - Address from which to pull crvUSD, will default to proxy
22
+ * address onBehalfOf - Address for which we are paying back debt, will default to proxy
23
+ * address to - Address that will receive the crvUSD and collateral asset if close, will default to proxy
24
+ * uint256 debtAmount - Amount of crvUSD to payback
25
+ * int256 maxActiveBand - Don't allow active band to be higher than this (to prevent front-running the repay)
26
+ */
27
+ /// @dev debtAmount must be non-zero
28
+ /// @dev if debtAmount >= debt will repay whole debt and close the position, transfering collateral
29
+ constructor(controllerAddress, from, onBehalfOf, to, debtAmount, maxActiveBand) {
30
+ super('CurveUsdPayback', getAddr('CurveUsdPayback'), ['address', 'address', 'address', 'address', 'uint256', 'int256'], [controllerAddress, from, onBehalfOf, to, debtAmount, maxActiveBand]);
31
+ this.mappableArgs = [
32
+ ...this.args,
33
+ ];
34
+ }
35
+ getAssetsToApprove() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ return [{
38
+ owner: this.args[1],
39
+ asset: getAssetInfo('crvUSD').address,
40
+ }];
41
+ });
42
+ }
43
+ }
@@ -0,0 +1,9 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, uint32, bytes } from '../../types';
3
+ /**
4
+ *
5
+ * @category CurveUsd
6
+ */
7
+ export declare class CurveUsdRepayAction extends Action {
8
+ constructor(controllerAddress: EthAddress, collAmount: uint256, to: EthAddress, minAmount: uint256, additionData: bytes, gasUsed: uint32, dfsFeeDivider: uint32, useSteth: Boolean);
9
+ }
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ *
5
+ * @category CurveUsd
6
+ */
7
+ export class CurveUsdRepayAction extends Action {
8
+ constructor(controllerAddress, collAmount, to, minAmount, additionData, gasUsed, dfsFeeDivider, useSteth) {
9
+ super('CurveUsdRepay', getAddr('CurveUsdRepay'), ['address', 'uint256', 'address', 'uint256', 'bytes', 'uint32', 'uint32', 'bool'], [controllerAddress, collAmount, to, minAmount, additionData, gasUsed, dfsFeeDivider, useSteth]);
10
+ this.mappableArgs = [
11
+ ...this.args,
12
+ ];
13
+ }
14
+ }
@@ -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, uint32, 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, gasUsed: uint32, dfsFeeDivider: uint32, useSteth: Boolean);
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, gasUsed, dfsFeeDivider, useSteth) {
10
+ requireAddress(to);
11
+ super('CurveUsdSelfLiquidateWithColl', getAddr('CurveUsdSelfLiquidateWithColl'), ['address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'bytes', 'uint32', 'uint32', 'bool'], [controllerAddress, percentage, minCrvUsdExpected, swapAmount, minAmount, to, additionData, gasUsed, dfsFeeDivider, useSteth]);
12
+ this.mappableArgs = [
13
+ ...this.args,
14
+ ];
15
+ }
16
+ }
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * CurveUsdSupplyAction - Action that supplies collateral to a curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export declare class CurveUsdSupplyAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address from - Address from which to pull collateral asset, will default to proxy
12
+ * address onBehalfOf - Address for which we are supplying, will default to proxy
13
+ * uint256 collateralAmount - Amount of collateral asset to supply
14
+ */
15
+ constructor(controllerAddress: EthAddress, from: EthAddress, onBehalfOf: EthAddress, collateralAmount: uint256);
16
+ getAssetsToApprove(): Promise<{
17
+ owner: any;
18
+ asset: string;
19
+ }[]>;
20
+ }
@@ -0,0 +1,40 @@
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 { Action } from '../../Action';
11
+ import { getAddr } from '../../addresses';
12
+ import { controllerToAssetMap } from '../../utils/curveusd-utils';
13
+ /**
14
+ * CurveUsdSupplyAction - Action that supplies collateral to a curveusd position
15
+ *
16
+ * @category CurveUsd
17
+ */
18
+ export class CurveUsdSupplyAction extends Action {
19
+ /**
20
+ * address controllerAddress - Address of the curveusd market controller
21
+ * address from - Address from which to pull collateral asset, will default to proxy
22
+ * address onBehalfOf - Address for which we are supplying, will default to proxy
23
+ * uint256 collateralAmount - Amount of collateral asset to supply
24
+ */
25
+ /// @dev collateralAmount must be non-zero, can be maxUint
26
+ constructor(controllerAddress, from, onBehalfOf, collateralAmount) {
27
+ super('CurveUsdSupply', getAddr('CurveUsdSupply'), ['address', 'address', 'address', 'uint256'], [controllerAddress, from, onBehalfOf, collateralAmount]);
28
+ this.mappableArgs = [
29
+ ...this.args,
30
+ ];
31
+ }
32
+ getAssetsToApprove() {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return [{
35
+ owner: this.args[1],
36
+ asset: controllerToAssetMap[this.args[0]],
37
+ }];
38
+ });
39
+ }
40
+ }
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * CurveUsdWithdrawAction - Action that withdraws collateral from proxy curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export declare class CurveUsdWithdrawAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address to - Address that will receive the withdrawn collateral, will default to proxy
12
+ * uint256 collateralAmount - Amount of collateral to withdraw
13
+ */
14
+ constructor(controllerAddress: EthAddress, to: EthAddress, collateralAmount: uint256);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * CurveUsdWithdrawAction - Action that withdraws collateral from proxy curveusd position
5
+ *
6
+ * @category CurveUsd
7
+ */
8
+ export class CurveUsdWithdrawAction extends Action {
9
+ /**
10
+ * address controllerAddress - Address of the curveusd market controller
11
+ * address to - Address that will receive the withdrawn collateral, will default to proxy
12
+ * uint256 collateralAmount - Amount of collateral to withdraw
13
+ */
14
+ /// @dev collateralAmount must be non-zero
15
+ /// @dev if collateralAmount == uintMax will withdraw as much as the debt will allow
16
+ constructor(controllerAddress, to, collateralAmount) {
17
+ super('CurveUsdWithdraw', getAddr('CurveUsdWithdraw'), ['address', 'address', 'uint256'], [controllerAddress, to, collateralAmount]);
18
+ this.mappableArgs = [
19
+ ...this.args,
20
+ ];
21
+ }
22
+ }
@@ -0,0 +1,9 @@
1
+ export * from './CurveUsdCreateAction';
2
+ export * from './CurveUsdSupplyAction';
3
+ export * from './CurveUsdWithdrawAction';
4
+ export * from './CurveUsdBorrowAction';
5
+ export * from './CurveUsdPaybackAction';
6
+ export * from './CurveUsdRepayAction';
7
+ export * from './CurveUsdSelfLiquidateAction';
8
+ export * from './CurveUsdLevCreateAction';
9
+ export * from './CurveUsdSelfLiquidateWithCollAction';
@@ -0,0 +1,9 @@
1
+ export * from './CurveUsdCreateAction';
2
+ export * from './CurveUsdSupplyAction';
3
+ export * from './CurveUsdWithdrawAction';
4
+ export * from './CurveUsdBorrowAction';
5
+ export * from './CurveUsdPaybackAction';
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;
@@ -23,4 +23,5 @@ import * as chickenBonds from './chickenBonds';
23
23
  import * as compoundV3 from './compoundV3';
24
24
  import * as morpho from './morpho';
25
25
  import * as bprotocol from './bprotocol';
26
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, };
26
+ import * as curveusd from './curveusd';
27
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, curveusd, };
@@ -23,4 +23,5 @@ import * as chickenBonds from './chickenBonds';
23
23
  import * as compoundV3 from './compoundV3';
24
24
  import * as morpho from './morpho';
25
25
  import * as bprotocol from './bprotocol';
26
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, };
26
+ import * as curveusd from './curveusd';
27
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, curveusd, };
@@ -144,6 +144,16 @@ export declare const actionAddresses: {
144
144
  CompV3Supply: string;
145
145
  CompV3Transfer: string;
146
146
  CompV3Withdraw: string;
147
+ CurveUsdBorrow: string;
148
+ CurveUsdCreate: string;
149
+ CurveUsdPayback: string;
150
+ CurveUsdSupply: string;
151
+ CurveUsdWithdraw: string;
152
+ CurveUsdLevCreate: string;
153
+ CurveUsdRepay: string;
154
+ CurveUsdSwapper: string;
155
+ CurveUsdSelfLiquidate: string;
156
+ CurveUsdSelfLiquidateWithColl: string;
147
157
  AaveV3RatioTrigger?: undefined;
148
158
  GasFeeTakerL2?: undefined;
149
159
  AaveV3RatioCheck?: undefined;
@@ -294,6 +304,16 @@ export declare const actionAddresses: {
294
304
  CompV3Supply?: undefined;
295
305
  CompV3Transfer?: undefined;
296
306
  CompV3Withdraw?: undefined;
307
+ CurveUsdBorrow?: undefined;
308
+ CurveUsdCreate?: undefined;
309
+ CurveUsdPayback?: undefined;
310
+ CurveUsdSupply?: undefined;
311
+ CurveUsdWithdraw?: undefined;
312
+ CurveUsdLevCreate?: undefined;
313
+ CurveUsdRepay?: undefined;
314
+ CurveUsdSwapper?: undefined;
315
+ CurveUsdSelfLiquidate?: undefined;
316
+ CurveUsdSelfLiquidateWithColl?: undefined;
297
317
  } | {
298
318
  DFSSell: string;
299
319
  WrapEth: string;
@@ -440,6 +460,16 @@ export declare const actionAddresses: {
440
460
  CompV3Supply?: undefined;
441
461
  CompV3Transfer?: undefined;
442
462
  CompV3Withdraw?: undefined;
463
+ CurveUsdBorrow?: undefined;
464
+ CurveUsdCreate?: undefined;
465
+ CurveUsdPayback?: undefined;
466
+ CurveUsdSupply?: undefined;
467
+ CurveUsdWithdraw?: undefined;
468
+ CurveUsdLevCreate?: undefined;
469
+ CurveUsdRepay?: undefined;
470
+ CurveUsdSwapper?: undefined;
471
+ CurveUsdSelfLiquidate?: undefined;
472
+ CurveUsdSelfLiquidateWithColl?: undefined;
443
473
  AaveV3RatioTrigger?: undefined;
444
474
  };
445
475
  };
@@ -171,6 +171,17 @@ export const actionAddresses = {
171
171
  CompV3Supply: '0xaF36Eca43bb26468078B8163fe5Bc1fCFc292095',
172
172
  CompV3Transfer: '0xeD7450e9C17146476137b77198DFfB17857906c4',
173
173
  CompV3Withdraw: '0x0b0F21EDE32DE4243D9145a899E97FC2366Aec46',
174
+ // crvUSD
175
+ CurveUsdBorrow: '0x2512A976227a82Ef0F6bDdb463cBcD5B732596BF',
176
+ CurveUsdCreate: '0x715B40970dac1cfAf0bB85C4Fe64921b44b3f73e',
177
+ CurveUsdPayback: '0xbcAd628159ab0f3d7F391dBb4c3553aFCD61CA80',
178
+ CurveUsdSupply: '0xa55B3CE5ae7E59002f53b2153ABe326823ccCDE2',
179
+ CurveUsdWithdraw: '0x54B8D984fc79B000D7B6F6E0f52CD054E965120f',
180
+ CurveUsdLevCreate: '0x8B5ACd4ce0a43327aaDfc5c42be029898e242393',
181
+ CurveUsdRepay: '0xDaDFC60207C17be005ECf2B03f3B31885D22F908',
182
+ CurveUsdSwapper: '0xFa2dfE6AF842e3184D305a85d09cfcf220ed4CBd',
183
+ CurveUsdSelfLiquidate: '0xd90d8a4955DfE9D4f45F7f60595313B0925ee1da',
184
+ CurveUsdSelfLiquidateWithColl: '0x6d02300C1A68c63C60AFD713b744bA750aB33aB0',
174
185
  },
175
186
  [NETWORKS.optimism.chainId]: {
176
187
  DFSSell: '0xC6c601fcAa870efd26C624F8c65fbc54cBe533b1',