@defisaver/sdk 1.0.4 → 1.0.5
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/curve/CurveDepositAction.js +1 -1
- package/esm/src/actions/curve/CurveWithdrawAction.d.ts +10 -9
- package/esm/src/actions/curve/CurveWithdrawAction.js +11 -10
- package/esm/src/addresses.js +1 -1
- package/esm/src/utils/curve-utils.d.ts +1 -1
- package/esm/src/utils/curve-utils.js +1 -1
- package/package-lock.json +8791 -0
- package/package.json +5 -3
- package/src/actions/curve/CurveDepositAction.ts +2 -2
- package/src/actions/curve/CurveWithdrawAction.ts +21 -19
- package/src/addresses.ts +1 -1
- package/src/utils/curve-utils.ts +2 -1
- package/umd/index.js +16 -15
|
@@ -54,7 +54,7 @@ export class CurveDepositAction extends Action {
|
|
|
54
54
|
receiver,
|
|
55
55
|
depositTarget,
|
|
56
56
|
minMintAmount,
|
|
57
|
-
makeFlags(depositTargetType, explicitUnderlying, 0),
|
|
57
|
+
makeFlags(depositTargetType, explicitUnderlying, 0, 0),
|
|
58
58
|
amounts,
|
|
59
59
|
]);
|
|
60
60
|
this.tokensForApproval = tokensForApproval;
|
|
@@ -6,15 +6,16 @@ import { EthAddress, uint256 } from '../../types';
|
|
|
6
6
|
export declare class CurveWithdrawAction extends Action {
|
|
7
7
|
lpToken: EthAddress;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
* @param sender
|
|
10
|
+
* @param receiver
|
|
11
|
+
* @param poolAddr
|
|
12
|
+
* @param burnAmount
|
|
13
|
+
* @param useUnderlying
|
|
14
|
+
* @param withdrawExact
|
|
15
|
+
* @param minAmounts
|
|
16
|
+
* @param removeOneCoin
|
|
17
|
+
*/
|
|
18
|
+
constructor(sender: EthAddress, receiver: EthAddress, poolAddr: EthAddress, burnAmount: uint256, useUnderlying: boolean, withdrawExact: boolean, removeOneCoin: boolean, minAmounts?: Array<uint256>);
|
|
18
19
|
getAssetsToApprove(): Promise<{
|
|
19
20
|
asset: string;
|
|
20
21
|
owner: any;
|
|
@@ -16,15 +16,16 @@ import { poolInfo, makeFlags } from '../../utils/curve-utils';
|
|
|
16
16
|
*/
|
|
17
17
|
export class CurveWithdrawAction extends Action {
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
* @param sender
|
|
20
|
+
* @param receiver
|
|
21
|
+
* @param poolAddr
|
|
22
|
+
* @param burnAmount
|
|
23
|
+
* @param useUnderlying
|
|
24
|
+
* @param withdrawExact
|
|
25
|
+
* @param minAmounts
|
|
26
|
+
* @param removeOneCoin
|
|
27
|
+
*/
|
|
28
|
+
constructor(sender, receiver, poolAddr, burnAmount, useUnderlying, withdrawExact, removeOneCoin, minAmounts = []) {
|
|
28
29
|
requireAddress(sender);
|
|
29
30
|
requireAddress(receiver);
|
|
30
31
|
let depositTarget;
|
|
@@ -51,7 +52,7 @@ export class CurveWithdrawAction extends Action {
|
|
|
51
52
|
receiver,
|
|
52
53
|
depositTarget,
|
|
53
54
|
burnAmount,
|
|
54
|
-
makeFlags(depositTargetType, explicitUnderlying, withdrawExact),
|
|
55
|
+
makeFlags(depositTargetType, explicitUnderlying, withdrawExact, removeOneCoin),
|
|
55
56
|
minAmounts,
|
|
56
57
|
]);
|
|
57
58
|
this.lpToken = pool.lpToken;
|
package/esm/src/addresses.js
CHANGED
|
@@ -109,7 +109,7 @@ export const actionAddresses = {
|
|
|
109
109
|
CurveStethPoolDeposit: '0x5Ae5870dC0C780e9eb68bE7a223eCd7F3BDad12B',
|
|
110
110
|
CurveStethPoolWithdraw: '0x4089731d843Ce52699Fe64F68556aBbD95D70D00',
|
|
111
111
|
CurveDeposit: '0x160225c24300bD9fAA03Bc007D5e72bDbbcA9257',
|
|
112
|
-
CurveWithdraw: '
|
|
112
|
+
CurveWithdraw: '0xb6Be5c486dD65c2cb18A388671b348E62307F0B3',
|
|
113
113
|
// Euler
|
|
114
114
|
FLEuler: '0x66DC6444CdC099153f89332e0d4C87af5C966A75',
|
|
115
115
|
TrailingStopTrigger: '0x0000000000000000000000000000000000000000',
|
|
@@ -4,4 +4,4 @@ export { poolInfo };
|
|
|
4
4
|
* Make Flags
|
|
5
5
|
*
|
|
6
6
|
* */
|
|
7
|
-
export declare const makeFlags: (depositTargetType: any, explicitUnderlying: any, withdrawExact: any) => number;
|
|
7
|
+
export declare const makeFlags: (depositTargetType: any, explicitUnderlying: any, withdrawExact: any, removeOneCoin: any) => number;
|
|
@@ -4,4 +4,4 @@ export { poolInfo };
|
|
|
4
4
|
* Make Flags
|
|
5
5
|
*
|
|
6
6
|
* */
|
|
7
|
-
export const makeFlags = (depositTargetType, explicitUnderlying, withdrawExact) => depositTargetType | explicitUnderlying << 2 | withdrawExact << 3;
|
|
7
|
+
export const makeFlags = (depositTargetType, explicitUnderlying, withdrawExact, removeOneCoin) => depositTargetType | explicitUnderlying << 2 | withdrawExact << 3 | removeOneCoin << 4;
|