@defisaver/sdk 1.1.0 → 1.1.2-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/src/actions/llamalend/LlamaLendBoostAction.d.ts +8 -0
- package/esm/src/actions/llamalend/LlamaLendBoostAction.js +18 -0
- package/esm/src/actions/llamalend/LlamaLendCreateAction.d.ts +2 -2
- package/esm/src/actions/llamalend/LlamaLendCreateAction.js +2 -3
- package/esm/src/actions/llamalend/LlamaLendGetDebtAction.d.ts +8 -0
- package/esm/src/actions/llamalend/LlamaLendGetDebtAction.js +13 -0
- package/esm/src/actions/llamalend/LlamaLendLevCreateAction.d.ts +12 -0
- package/esm/src/actions/llamalend/LlamaLendLevCreateAction.js +41 -0
- package/esm/src/actions/llamalend/LlamaLendPaybackAction.d.ts +2 -10
- package/esm/src/actions/llamalend/LlamaLendPaybackAction.js +2 -11
- package/esm/src/actions/llamalend/LlamaLendRepayAction.d.ts +8 -0
- package/esm/src/actions/llamalend/LlamaLendRepayAction.js +20 -0
- package/esm/src/actions/llamalend/LlamaLendSelfLiquidateAction.d.ts +2 -2
- package/esm/src/actions/llamalend/LlamaLendSelfLiquidateAction.js +2 -3
- package/esm/src/actions/llamalend/LlamaLendSelfLiquidateWithCollAction.d.ts +8 -0
- package/esm/src/actions/llamalend/LlamaLendSelfLiquidateWithCollAction.js +25 -0
- package/esm/src/actions/llamalend/LlamaLendSupplyAction.d.ts +2 -2
- package/esm/src/actions/llamalend/LlamaLendSupplyAction.js +2 -3
- package/esm/src/actions/llamalend/index.d.ts +5 -0
- package/esm/src/actions/llamalend/index.js +5 -0
- package/esm/src/actions/reflexer/ReflexerWithdrawStuckFunds.d.ts +14 -0
- package/esm/src/actions/reflexer/ReflexerWithdrawStuckFunds.js +18 -0
- package/esm/src/actions/reflexer/index.d.ts +1 -0
- package/esm/src/actions/reflexer/index.js +1 -0
- package/esm/src/addresses.d.ts +31 -7
- package/esm/src/addresses.js +20 -1
- package/esm/src/index.d.ts +124 -28
- package/esm/src/utils/index.d.ts +1 -2
- package/esm/src/utils/index.js +1 -2
- package/package.json +1 -1
- package/src/actions/llamalend/LlamaLendBoostAction.ts +26 -0
- package/src/actions/llamalend/LlamaLendCreateAction.ts +3 -2
- package/src/actions/llamalend/LlamaLendGetDebtAction.ts +21 -0
- package/src/actions/llamalend/LlamaLendLevCreateAction.ts +39 -0
- package/src/actions/llamalend/LlamaLendPaybackAction.ts +2 -10
- package/src/actions/llamalend/LlamaLendRepayAction.ts +28 -0
- package/src/actions/llamalend/LlamaLendSelfLiquidateAction.ts +3 -2
- package/src/actions/llamalend/LlamaLendSelfLiquidateWithCollAction.ts +33 -0
- package/src/actions/llamalend/LlamaLendSupplyAction.ts +2 -2
- package/src/actions/llamalend/index.ts +6 -1
- package/src/actions/reflexer/ReflexerWithdrawStuckFunds.ts +20 -0
- package/src/actions/reflexer/index.ts +2 -1
- package/src/addresses.ts +21 -1
- package/src/utils/index.ts +0 -2
- package/umd/index.js +594 -450
- package/esm/src/utils/llamalend-utils.d.ts +0 -10
- package/esm/src/utils/llamalend-utils.js +0 -10
- package/src/utils/llamalend-utils.ts +0 -11
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export declare class LlamaLendBoostAction extends Action {
|
|
7
|
+
constructor(controller: EthAddress, controllerId: uint256, exchangeOrder: Array<any>, gasUsed: uint32);
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export class LlamaLendBoostAction extends Action {
|
|
7
|
+
constructor(controller, controllerId, exchangeOrder, gasUsed) {
|
|
8
|
+
super('LlamaLendBoost', getAddr('LlamaLendBoost'), [
|
|
9
|
+
'address',
|
|
10
|
+
'uint256',
|
|
11
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
12
|
+
'uint32',
|
|
13
|
+
], [controller, controllerId, exchangeOrder, gasUsed]);
|
|
14
|
+
this.mappableArgs = [
|
|
15
|
+
this.args[0],
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -14,9 +14,9 @@ export declare class LlamaLendCreateAction extends Action {
|
|
|
14
14
|
* uint256 debtAmount - Amount of debt asset to borrow
|
|
15
15
|
* uint256 nBands - Number of bands in which the collateral will be supplied
|
|
16
16
|
*/
|
|
17
|
-
constructor(controllerAddress: EthAddress, from: EthAddress, to: EthAddress, collateralAmount: uint256, debtAmount: uint256, nBands: uint256);
|
|
17
|
+
constructor(controllerAddress: EthAddress, from: EthAddress, to: EthAddress, collateralAmount: uint256, debtAmount: uint256, nBands: uint256, debtAsset: EthAddress);
|
|
18
18
|
getAssetsToApprove(): Promise<{
|
|
19
19
|
owner: any;
|
|
20
|
-
asset:
|
|
20
|
+
asset: any;
|
|
21
21
|
}[]>;
|
|
22
22
|
}
|
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Action } from '../../Action';
|
|
11
11
|
import { requireAddress } from '../../utils/general';
|
|
12
12
|
import { getAddr } from '../../addresses';
|
|
13
|
-
import { controllerToCollateralAssetMap } from '../../utils/llamalend-utils';
|
|
14
13
|
/**
|
|
15
14
|
* LlamaLendCreateAction - Action that creates a llamalend position on behalf of proxy
|
|
16
15
|
*
|
|
@@ -26,7 +25,7 @@ export class LlamaLendCreateAction extends Action {
|
|
|
26
25
|
* uint256 nBands - Number of bands in which the collateral will be supplied
|
|
27
26
|
*/
|
|
28
27
|
/// @dev both collateralAmount and debtAmount must be non-zero and can be maxUint
|
|
29
|
-
constructor(controllerAddress, from, to, collateralAmount, debtAmount, nBands) {
|
|
28
|
+
constructor(controllerAddress, from, to, collateralAmount, debtAmount, nBands, debtAsset) {
|
|
30
29
|
requireAddress(to);
|
|
31
30
|
super('LlamaLendCreate', getAddr('LlamaLendCreate'), ['address', 'address', 'address', 'uint256', 'uint256', 'uint256'], [controllerAddress, from, to, collateralAmount, debtAmount, nBands]);
|
|
32
31
|
this.mappableArgs = [
|
|
@@ -37,7 +36,7 @@ export class LlamaLendCreateAction extends Action {
|
|
|
37
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
37
|
return [{
|
|
39
38
|
owner: this.args[1],
|
|
40
|
-
asset:
|
|
39
|
+
asset: this.args[6],
|
|
41
40
|
}];
|
|
42
41
|
});
|
|
43
42
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export class LlamaLendGetDebtAction extends Action {
|
|
7
|
+
constructor(controllerAddr, debtor) {
|
|
8
|
+
super('LlamaLendGetDebt', getAddr('LlamaLendGetDebt'), [
|
|
9
|
+
'address',
|
|
10
|
+
'address',
|
|
11
|
+
], [controllerAddr, debtor]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export declare class LlamaLendLevCreateAction extends Action {
|
|
7
|
+
constructor(controller: EthAddress, controllerId: uint256, from: EthAddress, collAmount: uint256, nBands: uint256, exchangeOrder: Array<any>, gasUsed: uint32);
|
|
8
|
+
getAssetsToApprove(): Promise<{
|
|
9
|
+
owner: any;
|
|
10
|
+
asset: any;
|
|
11
|
+
}[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* @category LlamaLend
|
|
14
|
+
*/
|
|
15
|
+
export class LlamaLendLevCreateAction extends Action {
|
|
16
|
+
constructor(controller, controllerId, from, collAmount, nBands, exchangeOrder, gasUsed) {
|
|
17
|
+
super('LlamaLendLevCreate', getAddr('LlamaLendLevCreate'), [
|
|
18
|
+
'address',
|
|
19
|
+
'uint256',
|
|
20
|
+
'address',
|
|
21
|
+
'uint256',
|
|
22
|
+
'uint256',
|
|
23
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
24
|
+
'uint32',
|
|
25
|
+
], [controller, controllerId, from, collAmount, nBands, exchangeOrder, gasUsed]);
|
|
26
|
+
this.mappableArgs = [
|
|
27
|
+
this.args[0],
|
|
28
|
+
this.args[1],
|
|
29
|
+
this.args[2],
|
|
30
|
+
this.args[3],
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
getAssetsToApprove() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return [{
|
|
36
|
+
owner: this.args[1],
|
|
37
|
+
asset: this.args[5][1],
|
|
38
|
+
}];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -6,17 +6,9 @@ import { EthAddress, uint256, int256 } from '../../types';
|
|
|
6
6
|
* @category LlamaLend
|
|
7
7
|
*/
|
|
8
8
|
export declare class LlamaLendPaybackAction extends Action {
|
|
9
|
-
|
|
10
|
-
* address controllerAddress - Address of the llamalend market controller
|
|
11
|
-
* address from - Address from which to pull debt asset, 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 debt asset and collateral asset if close, will default to proxy
|
|
14
|
-
* uint256 debtAmount - Amount of debt asset 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);
|
|
9
|
+
constructor(controllerAddress: EthAddress, from: EthAddress, onBehalfOf: EthAddress, to: EthAddress, debtAmount: uint256, maxActiveBand: int256, debtAsset: EthAddress);
|
|
18
10
|
getAssetsToApprove(): Promise<{
|
|
19
11
|
owner: any;
|
|
20
|
-
asset:
|
|
12
|
+
asset: any;
|
|
21
13
|
}[]>;
|
|
22
14
|
}
|
|
@@ -9,24 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Action } from '../../Action';
|
|
11
11
|
import { getAddr } from '../../addresses';
|
|
12
|
-
import { controllerToDebtAssetMap } from '../../utils/llamalend-utils';
|
|
13
12
|
/**
|
|
14
13
|
* LlamaLendPaybackAction - Action that pays back debt asset to a llamalend position
|
|
15
14
|
*
|
|
16
15
|
* @category LlamaLend
|
|
17
16
|
*/
|
|
18
17
|
export class LlamaLendPaybackAction extends Action {
|
|
19
|
-
/**
|
|
20
|
-
* address controllerAddress - Address of the llamalend market controller
|
|
21
|
-
* address from - Address from which to pull debt asset, 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 debt asset and collateral asset if close, will default to proxy
|
|
24
|
-
* uint256 debtAmount - Amount of debt asset to payback
|
|
25
|
-
* int256 maxActiveBand - Don't allow active band to be higher than this (to prevent front-running the repay)
|
|
26
|
-
*/
|
|
27
18
|
/// @dev debtAmount must be non-zero
|
|
28
19
|
/// @dev if debtAmount >= debt will repay whole debt and close the position, transfering collateral
|
|
29
|
-
constructor(controllerAddress, from, onBehalfOf, to, debtAmount, maxActiveBand) {
|
|
20
|
+
constructor(controllerAddress, from, onBehalfOf, to, debtAmount, maxActiveBand, debtAsset) {
|
|
30
21
|
super('LlamaLendPayback', getAddr('LlamaLendPayback'), ['address', 'address', 'address', 'address', 'uint256', 'int256'], [controllerAddress, from, onBehalfOf, to, debtAmount, maxActiveBand]);
|
|
31
22
|
this.mappableArgs = [
|
|
32
23
|
...this.args,
|
|
@@ -36,7 +27,7 @@ export class LlamaLendPaybackAction extends Action {
|
|
|
36
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
28
|
return [{
|
|
38
29
|
owner: this.args[1],
|
|
39
|
-
asset:
|
|
30
|
+
asset: this.args[6],
|
|
40
31
|
}];
|
|
41
32
|
});
|
|
42
33
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export declare class LlamaLendRepayAction extends Action {
|
|
7
|
+
constructor(controller: EthAddress, controllerId: uint256, exchangeOrder: Array<any>, to: EthAddress, gasUsed: uint32);
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export class LlamaLendRepayAction extends Action {
|
|
7
|
+
constructor(controller, controllerId, exchangeOrder, to, gasUsed) {
|
|
8
|
+
super('LlamaLendRepay', getAddr('LlamaLendRepay'), [
|
|
9
|
+
'address',
|
|
10
|
+
'uint256',
|
|
11
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
12
|
+
'address',
|
|
13
|
+
'uint32',
|
|
14
|
+
], [controller, controllerId, exchangeOrder, to, gasUsed]);
|
|
15
|
+
this.mappableArgs = [
|
|
16
|
+
this.args[0],
|
|
17
|
+
this.args[2],
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -11,9 +11,9 @@ export declare class LlamaLendSelfLiquidateAction extends Action {
|
|
|
11
11
|
@param from Address from which to pull debt asset if needed
|
|
12
12
|
@param to Address that will receive the debt asset and collateral asset
|
|
13
13
|
*/
|
|
14
|
-
constructor(controllerAddress: EthAddress, minDebtAssetExpected: uint256, from: EthAddress, to: EthAddress);
|
|
14
|
+
constructor(controllerAddress: EthAddress, minDebtAssetExpected: uint256, from: EthAddress, to: EthAddress, debtAsset: EthAddress);
|
|
15
15
|
getAssetsToApprove(): Promise<{
|
|
16
16
|
owner: any;
|
|
17
|
-
asset:
|
|
17
|
+
asset: any;
|
|
18
18
|
}[]>;
|
|
19
19
|
}
|
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Action } from '../../Action';
|
|
11
11
|
import { getAddr } from '../../addresses';
|
|
12
|
-
import { controllerToDebtAssetMap } from '../../utils/llamalend-utils';
|
|
13
12
|
/**
|
|
14
13
|
*
|
|
15
14
|
* @category LlamaLend
|
|
@@ -21,7 +20,7 @@ export class LlamaLendSelfLiquidateAction extends Action {
|
|
|
21
20
|
@param from Address from which to pull debt asset if needed
|
|
22
21
|
@param to Address that will receive the debt asset and collateral asset
|
|
23
22
|
*/
|
|
24
|
-
constructor(controllerAddress, minDebtAssetExpected, from, to) {
|
|
23
|
+
constructor(controllerAddress, minDebtAssetExpected, from, to, debtAsset) {
|
|
25
24
|
super('LlamaLendSelfLiquidate', getAddr('LlamaLendSelfLiquidate'), ['address', 'uint256', 'address', 'address'], [controllerAddress, minDebtAssetExpected, from, to]);
|
|
26
25
|
this.mappableArgs = [
|
|
27
26
|
...this.args,
|
|
@@ -31,7 +30,7 @@ export class LlamaLendSelfLiquidateAction extends Action {
|
|
|
31
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
31
|
return [{
|
|
33
32
|
owner: this.args[2],
|
|
34
|
-
asset:
|
|
33
|
+
asset: this.args[4],
|
|
35
34
|
}];
|
|
36
35
|
});
|
|
37
36
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export declare class LlamaLendSelfLiquidateWithCollAction extends Action {
|
|
7
|
+
constructor(controller: EthAddress, controllerId: uint256, percentage: uint256, minCrvUsdExpected: uint256, exchangeOrder: Array<any>, to: EthAddress, sellAllCollateral: boolean, gasUsed: uint32);
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category LlamaLend
|
|
5
|
+
*/
|
|
6
|
+
export class LlamaLendSelfLiquidateWithCollAction extends Action {
|
|
7
|
+
constructor(controller, controllerId, percentage, minCrvUsdExpected, exchangeOrder, to, sellAllCollateral, gasUsed) {
|
|
8
|
+
super('LlamaLendSelfLiquidateWithColl', getAddr('LlamaLendSelfLiquidateWithColl'), [
|
|
9
|
+
'address',
|
|
10
|
+
'uint256',
|
|
11
|
+
'uint256',
|
|
12
|
+
'uint256',
|
|
13
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
14
|
+
'address',
|
|
15
|
+
'bool',
|
|
16
|
+
'uint32',
|
|
17
|
+
], [controller, controllerId, percentage, minCrvUsdExpected, exchangeOrder, to, sellAllCollateral, gasUsed]);
|
|
18
|
+
this.mappableArgs = [
|
|
19
|
+
this.args[0],
|
|
20
|
+
this.args[1],
|
|
21
|
+
this.args[2],
|
|
22
|
+
this.args[4],
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -12,9 +12,9 @@ export declare class LlamaLendSupplyAction extends Action {
|
|
|
12
12
|
* address onBehalfOf - Address for which we are supplying, will default to proxy
|
|
13
13
|
* uint256 collateralAmount - Amount of collateral asset to supply
|
|
14
14
|
*/
|
|
15
|
-
constructor(controllerAddress: EthAddress, from: EthAddress, onBehalfOf: EthAddress, collateralAmount: uint256);
|
|
15
|
+
constructor(controllerAddress: EthAddress, from: EthAddress, onBehalfOf: EthAddress, collateralAmount: uint256, collAsset: EthAddress);
|
|
16
16
|
getAssetsToApprove(): Promise<{
|
|
17
17
|
owner: any;
|
|
18
|
-
asset:
|
|
18
|
+
asset: any;
|
|
19
19
|
}[]>;
|
|
20
20
|
}
|
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Action } from '../../Action';
|
|
11
11
|
import { getAddr } from '../../addresses';
|
|
12
|
-
import { controllerToCollateralAssetMap } from '../../utils/llamalend-utils';
|
|
13
12
|
/**
|
|
14
13
|
* LlamaLendSupplyAction - Action that supplies collateral to a llamalend position
|
|
15
14
|
*
|
|
@@ -23,7 +22,7 @@ export class LlamaLendSupplyAction extends Action {
|
|
|
23
22
|
* uint256 collateralAmount - Amount of collateral asset to supply
|
|
24
23
|
*/
|
|
25
24
|
/// @dev collateralAmount must be non-zero, can be maxUint
|
|
26
|
-
constructor(controllerAddress, from, onBehalfOf, collateralAmount) {
|
|
25
|
+
constructor(controllerAddress, from, onBehalfOf, collateralAmount, collAsset) {
|
|
27
26
|
super('LlamaLendSupply', getAddr('LlamaLendSupply'), ['address', 'address', 'address', 'uint256'], [controllerAddress, from, onBehalfOf, collateralAmount]);
|
|
28
27
|
this.mappableArgs = [
|
|
29
28
|
...this.args,
|
|
@@ -33,7 +32,7 @@ export class LlamaLendSupplyAction extends Action {
|
|
|
33
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
33
|
return [{
|
|
35
34
|
owner: this.args[1],
|
|
36
|
-
asset:
|
|
35
|
+
asset: this.args[4],
|
|
37
36
|
}];
|
|
38
37
|
});
|
|
39
38
|
}
|
|
@@ -4,3 +4,8 @@ export * from './LlamaLendSupplyAction';
|
|
|
4
4
|
export * from './LlamaLendCreateAction';
|
|
5
5
|
export * from './LlamaLendPaybackAction';
|
|
6
6
|
export * from './LlamaLendSelfLiquidateAction';
|
|
7
|
+
export * from './LlamaLendGetDebtAction';
|
|
8
|
+
export * from './LlamaLendLevCreateAction';
|
|
9
|
+
export * from './LlamaLendBoostAction';
|
|
10
|
+
export * from './LlamaLendRepayAction';
|
|
11
|
+
export * from './LlamaLendSelfLiquidateWithCollAction';
|
|
@@ -4,3 +4,8 @@ export * from './LlamaLendSupplyAction';
|
|
|
4
4
|
export * from './LlamaLendCreateAction';
|
|
5
5
|
export * from './LlamaLendPaybackAction';
|
|
6
6
|
export * from './LlamaLendSelfLiquidateAction';
|
|
7
|
+
export * from './LlamaLendGetDebtAction';
|
|
8
|
+
export * from './LlamaLendLevCreateAction';
|
|
9
|
+
export * from './LlamaLendBoostAction';
|
|
10
|
+
export * from './LlamaLendRepayAction';
|
|
11
|
+
export * from './LlamaLendSelfLiquidateWithCollAction';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerWithdrawStuckFunds - Withdraw stuck funds from a reflexer safe
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerWithdrawStuckFunds extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safeId - The id of the reflexer safe
|
|
11
|
+
* @param to - address where RAI will be sent to
|
|
12
|
+
*/
|
|
13
|
+
constructor(safeId: uint256, to: EthAddress);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* ReflexerWithdrawStuckFunds - Withdraw stuck funds from a reflexer safe
|
|
6
|
+
*
|
|
7
|
+
* @category Reflexer
|
|
8
|
+
*/
|
|
9
|
+
export class ReflexerWithdrawStuckFunds extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param safeId - The id of the reflexer safe
|
|
12
|
+
* @param to - address where RAI will be sent to
|
|
13
|
+
*/
|
|
14
|
+
constructor(safeId, to) {
|
|
15
|
+
requireAddress(to);
|
|
16
|
+
super('ReflexerWithdrawStuckFunds', getAddr('ReflexerWithdrawStuckFunds'), ['uint256', 'address'], [safeId, to]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -6,3 +6,4 @@ export * from './ReflexerWithdrawAction';
|
|
|
6
6
|
export * from './ReflexerNativeUniV2SaviourDepositAction';
|
|
7
7
|
export * from './ReflexerNativeUniV2SaviourWithdrawAction';
|
|
8
8
|
export * from './ReflexerNativeUniV2SaviourGetReservesAction';
|
|
9
|
+
export * from './ReflexerWithdrawStuckFunds';
|
|
@@ -6,3 +6,4 @@ export * from './ReflexerWithdrawAction';
|
|
|
6
6
|
export * from './ReflexerNativeUniV2SaviourDepositAction';
|
|
7
7
|
export * from './ReflexerNativeUniV2SaviourWithdrawAction';
|
|
8
8
|
export * from './ReflexerNativeUniV2SaviourGetReservesAction';
|
|
9
|
+
export * from './ReflexerWithdrawStuckFunds';
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare const actionAddresses: {
|
|
|
36
36
|
ReflexerPayback: string;
|
|
37
37
|
ReflexerGenerate: string;
|
|
38
38
|
ReflexerOpen: string;
|
|
39
|
+
ReflexerWithdrawStuckFunds: string;
|
|
39
40
|
ReflexerNativeUniV2SaviourDeposit: string;
|
|
40
41
|
ReflexerNativeUniV2SaviourGetReserves: string;
|
|
41
42
|
ReflexerNativeUniV2SaviourWithdraw: string;
|
|
@@ -199,6 +200,11 @@ export declare const actionAddresses: {
|
|
|
199
200
|
LlamaLendWithdraw: string;
|
|
200
201
|
LlamaLendPayback: string;
|
|
201
202
|
LlamaLendSelfLiquidate: string;
|
|
203
|
+
LlamaLendGetDebt: string;
|
|
204
|
+
LlamaLendBoost: string;
|
|
205
|
+
LlamaLendRepay: string;
|
|
206
|
+
LlamaLendLevCreate: string;
|
|
207
|
+
LlamaLendSelfLiquidateWithColl: string;
|
|
202
208
|
MerklClaim: string;
|
|
203
209
|
AaveV3DelegateCredit?: undefined;
|
|
204
210
|
AaveV3RatioTrigger?: undefined;
|
|
@@ -263,6 +269,7 @@ export declare const actionAddresses: {
|
|
|
263
269
|
ReflexerPayback?: undefined;
|
|
264
270
|
ReflexerGenerate?: undefined;
|
|
265
271
|
ReflexerOpen?: undefined;
|
|
272
|
+
ReflexerWithdrawStuckFunds?: undefined;
|
|
266
273
|
ReflexerNativeUniV2SaviourDeposit?: undefined;
|
|
267
274
|
ReflexerNativeUniV2SaviourGetReserves?: undefined;
|
|
268
275
|
ReflexerNativeUniV2SaviourWithdraw?: undefined;
|
|
@@ -407,6 +414,11 @@ export declare const actionAddresses: {
|
|
|
407
414
|
LlamaLendWithdraw?: undefined;
|
|
408
415
|
LlamaLendPayback?: undefined;
|
|
409
416
|
LlamaLendSelfLiquidate?: undefined;
|
|
417
|
+
LlamaLendGetDebt?: undefined;
|
|
418
|
+
LlamaLendBoost?: undefined;
|
|
419
|
+
LlamaLendRepay?: undefined;
|
|
420
|
+
LlamaLendLevCreate?: undefined;
|
|
421
|
+
LlamaLendSelfLiquidateWithColl?: undefined;
|
|
410
422
|
MerklClaim?: undefined;
|
|
411
423
|
} | {
|
|
412
424
|
DFSSell: string;
|
|
@@ -430,6 +442,7 @@ export declare const actionAddresses: {
|
|
|
430
442
|
AaveV3Supply: string;
|
|
431
443
|
AaveV3SwapBorrowRateMode: string;
|
|
432
444
|
AaveV3Withdraw: string;
|
|
445
|
+
AaveV3ClaimRewards: string;
|
|
433
446
|
CompV3Allow: string;
|
|
434
447
|
CompV3Borrow: string;
|
|
435
448
|
CompV3Claim: string;
|
|
@@ -449,6 +462,17 @@ export declare const actionAddresses: {
|
|
|
449
462
|
UniSupplyV3: string;
|
|
450
463
|
UniWithdrawV3: string;
|
|
451
464
|
UniCreatePoolV3: string;
|
|
465
|
+
LlamaLendCreate: string;
|
|
466
|
+
LlamaLendSupply: string;
|
|
467
|
+
LlamaLendBorrow: string;
|
|
468
|
+
LlamaLendWithdraw: string;
|
|
469
|
+
LlamaLendPayback: string;
|
|
470
|
+
LlamaLendSelfLiquidate: string;
|
|
471
|
+
LlamaLendGetDebt: string;
|
|
472
|
+
LlamaLendBoost: string;
|
|
473
|
+
LlamaLendRepay: string;
|
|
474
|
+
LlamaLendLevCreate: string;
|
|
475
|
+
LlamaLendSelfLiquidateWithColl: string;
|
|
452
476
|
AutomationV2Unsub?: undefined;
|
|
453
477
|
UpdateSub?: undefined;
|
|
454
478
|
TransferNFT?: undefined;
|
|
@@ -471,6 +495,7 @@ export declare const actionAddresses: {
|
|
|
471
495
|
ReflexerPayback?: undefined;
|
|
472
496
|
ReflexerGenerate?: undefined;
|
|
473
497
|
ReflexerOpen?: undefined;
|
|
498
|
+
ReflexerWithdrawStuckFunds?: undefined;
|
|
474
499
|
ReflexerNativeUniV2SaviourDeposit?: undefined;
|
|
475
500
|
ReflexerNativeUniV2SaviourGetReserves?: undefined;
|
|
476
501
|
ReflexerNativeUniV2SaviourWithdraw?: undefined;
|
|
@@ -482,7 +507,6 @@ export declare const actionAddresses: {
|
|
|
482
507
|
AaveUnstake?: undefined;
|
|
483
508
|
AaveClaimAAVE?: undefined;
|
|
484
509
|
AaveClaimStkAave?: undefined;
|
|
485
|
-
AaveV3ClaimRewards?: undefined;
|
|
486
510
|
AaveV3View?: undefined;
|
|
487
511
|
LSVWithdraw?: undefined;
|
|
488
512
|
LSVBorrow?: undefined;
|
|
@@ -603,12 +627,6 @@ export declare const actionAddresses: {
|
|
|
603
627
|
MorphoBluePayback?: undefined;
|
|
604
628
|
MorphoBlueSetAuth?: undefined;
|
|
605
629
|
MorphoBlueSetAuthWithSig?: undefined;
|
|
606
|
-
LlamaLendCreate?: undefined;
|
|
607
|
-
LlamaLendSupply?: undefined;
|
|
608
|
-
LlamaLendBorrow?: undefined;
|
|
609
|
-
LlamaLendWithdraw?: undefined;
|
|
610
|
-
LlamaLendPayback?: undefined;
|
|
611
|
-
LlamaLendSelfLiquidate?: undefined;
|
|
612
630
|
MerklClaim?: undefined;
|
|
613
631
|
AaveV3DelegateCredit?: undefined;
|
|
614
632
|
AaveV3RatioTrigger?: undefined;
|
|
@@ -670,6 +688,7 @@ export declare const actionAddresses: {
|
|
|
670
688
|
ReflexerPayback?: undefined;
|
|
671
689
|
ReflexerGenerate?: undefined;
|
|
672
690
|
ReflexerOpen?: undefined;
|
|
691
|
+
ReflexerWithdrawStuckFunds?: undefined;
|
|
673
692
|
ReflexerNativeUniV2SaviourDeposit?: undefined;
|
|
674
693
|
ReflexerNativeUniV2SaviourGetReserves?: undefined;
|
|
675
694
|
ReflexerNativeUniV2SaviourWithdraw?: undefined;
|
|
@@ -811,6 +830,11 @@ export declare const actionAddresses: {
|
|
|
811
830
|
LlamaLendWithdraw?: undefined;
|
|
812
831
|
LlamaLendPayback?: undefined;
|
|
813
832
|
LlamaLendSelfLiquidate?: undefined;
|
|
833
|
+
LlamaLendGetDebt?: undefined;
|
|
834
|
+
LlamaLendBoost?: undefined;
|
|
835
|
+
LlamaLendRepay?: undefined;
|
|
836
|
+
LlamaLendLevCreate?: undefined;
|
|
837
|
+
LlamaLendSelfLiquidateWithColl?: undefined;
|
|
814
838
|
MerklClaim?: undefined;
|
|
815
839
|
AaveV3DelegateCredit?: undefined;
|
|
816
840
|
AaveV3RatioTrigger?: undefined;
|
package/esm/src/addresses.js
CHANGED
|
@@ -37,9 +37,10 @@ export const actionAddresses = {
|
|
|
37
37
|
// reflexer
|
|
38
38
|
ReflexerSupply: '0xd7a36CD4ce7CCc2F1376Dc5C48BaC84380A4f698',
|
|
39
39
|
ReflexerWithdraw: '0xD8a14d447AB6789F3bf1Eb763b6306db3FC3d666',
|
|
40
|
-
ReflexerPayback: '
|
|
40
|
+
ReflexerPayback: '0xdAa3963798C2E3F5c16AAcc9114fc727C450d0cb',
|
|
41
41
|
ReflexerGenerate: '0x8e8Fd178A5FAE3A29F9CB1A06aBBBCFd5B83beb7',
|
|
42
42
|
ReflexerOpen: '0x4704a7cBd4d913d1233765B70531D601b4384011',
|
|
43
|
+
ReflexerWithdrawStuckFunds: '0x64759d064aaA1f9Ac7A458520Aad06128Da9b7b8',
|
|
43
44
|
// not deployed as currently not used
|
|
44
45
|
ReflexerNativeUniV2SaviourDeposit: '0x0000000000000000000000000000000000000000',
|
|
45
46
|
ReflexerNativeUniV2SaviourGetReserves: '0x0000000000000000000000000000000000000000',
|
|
@@ -230,6 +231,11 @@ export const actionAddresses = {
|
|
|
230
231
|
LlamaLendWithdraw: '0x2593Da3c4110C531541424e9e847cd7905894C52',
|
|
231
232
|
LlamaLendPayback: '0x5b506b7a0117dbcd086632575da599bb603eb602',
|
|
232
233
|
LlamaLendSelfLiquidate: '0xe4944e0e46177300fa4c351ef72b95b9655e8394',
|
|
234
|
+
LlamaLendGetDebt: '0x5625ea9fcd930d5f131b0261ec4dcaf279fea4ed',
|
|
235
|
+
LlamaLendBoost: '0xa21c1ce7318c6d38a10de44c2cd5d80514437d85',
|
|
236
|
+
LlamaLendRepay: '0x57693f72E628A3F7323D31De35Bd158493Aa9CC0',
|
|
237
|
+
LlamaLendLevCreate: '0x534b704a62385cfe5EEB8d9605419743d4fe105E',
|
|
238
|
+
LlamaLendSelfLiquidateWithColl: '0xc20460aabdb89e55c2d29067e031d170f2fb10e5',
|
|
233
239
|
MerklClaim: '0xE88036F3F0D7e216D63726356cA2bC334e305fe5',
|
|
234
240
|
},
|
|
235
241
|
[NETWORKS.optimism.chainId]: {
|
|
@@ -299,6 +305,7 @@ export const actionAddresses = {
|
|
|
299
305
|
AaveV3Supply: '0xF159c79077001E2a2C1a178BE68DB7F69a6Da486',
|
|
300
306
|
AaveV3SwapBorrowRateMode: '0x738042389A8d6B0F6D6ab009c42dfF84ebB737C0',
|
|
301
307
|
AaveV3Withdraw: '0xbf492F869DdB1A18BB4F41b6c3059D9f882Fe7ff',
|
|
308
|
+
AaveV3ClaimRewards: '0x3a4d72Ed2a47a409a82ba61f0fca1C749Ea8aB66',
|
|
302
309
|
// CompV3
|
|
303
310
|
CompV3Allow: '0x0380E8e13CdE0499c720999930CaA07A5744887c',
|
|
304
311
|
CompV3Borrow: '0x1C0eCc794fDA7c29aBd19E0b2F7dA166C237d616',
|
|
@@ -321,6 +328,18 @@ export const actionAddresses = {
|
|
|
321
328
|
UniSupplyV3: '0x55675C6041A33EE9BDd796Edaa0f098AC7F3534f',
|
|
322
329
|
UniWithdrawV3: '0xa004c22eFd0CD87847DE83Ce9ab92af5382c2efe',
|
|
323
330
|
UniCreatePoolV3: '0x334Ab3C12a4c0315566fd9308880Dad71F838Dc5',
|
|
331
|
+
// llamalend
|
|
332
|
+
LlamaLendCreate: '0xaf14226ad0d782c71d3acf94ad02d6a39c89ec79',
|
|
333
|
+
LlamaLendSupply: '0x8f0814709d6d8b7c4b3021f7cb80e08476bc6959',
|
|
334
|
+
LlamaLendBorrow: '0x4948135f8b3a8f3b51fbd1050f5d0f755accb8e7',
|
|
335
|
+
LlamaLendWithdraw: '0xd7a80e7a2296d75cd1eebc2f0de0cebd14fbe117',
|
|
336
|
+
LlamaLendPayback: '0x21e05ffb9cf729630b5a9c2f01ff3b41f38be48c',
|
|
337
|
+
LlamaLendSelfLiquidate: '0xc9fd91f932d903023e887e4e4af0a298e10529a8',
|
|
338
|
+
LlamaLendGetDebt: '0x81c01f08b8fc4487501c88404ed17ebc17764f9c',
|
|
339
|
+
LlamaLendBoost: '0xc52a3af27696f8cf999463f3455e23440a376f8d',
|
|
340
|
+
LlamaLendRepay: '0x320fdfa922ee33c1cc8a042ada855c9dfe9bed06',
|
|
341
|
+
LlamaLendLevCreate: '0xe5cbdcbe494246c21851eea0642ff0791f95cc86',
|
|
342
|
+
LlamaLendSelfLiquidateWithColl: '0x4faef2cd1680ea00f9398a0525c536b2466a887b',
|
|
324
343
|
},
|
|
325
344
|
[NETWORKS.base.chainId]: {
|
|
326
345
|
// Basic
|