@defisaver/sdk 0.1.14 → 0.1.17
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/ACTIONS.md +123 -0
- package/package.json +1 -1
- package/src/actions/compound/CompoundPaybackAction.js +1 -0
- package/src/actions/compound/CompoundSupplyAction.js +1 -0
- package/src/actions/curve/CurveClaimFeesAction.js +31 -0
- package/src/actions/curve/CurveDepositAction.js +50 -0
- package/src/actions/curve/CurveGaugeDepositAction.js +36 -0
- package/src/actions/curve/CurveGaugeWithdrawAction.js +28 -0
- package/src/actions/curve/CurveMintCrvAction.js +25 -0
- package/src/actions/curve/CurveSwapAction.js +39 -0
- package/src/actions/curve/CurveWithdrawAction.js +53 -0
- package/src/actions/curve/index.js +19 -0
- package/src/actions/index.js +2 -0
- package/src/addresses.js +1 -0
- package/test/actions/compound/CompoundPaybackAction.js +1 -1
- package/test/actions/compound/CompoundSupplyAction.js +1 -1
package/ACTIONS.md
CHANGED
|
@@ -71,6 +71,20 @@
|
|
|
71
71
|
<dt><a href="#CompoundWithdrawAction">CompoundWithdrawAction</a></dt>
|
|
72
72
|
<dd><p>CompoundWithdrawAction - Withdraw token from an Compound position</p>
|
|
73
73
|
</dd>
|
|
74
|
+
<dt><a href="#CurveClaimFeesAction">CurveClaimFeesAction</a></dt>
|
|
75
|
+
<dd></dd>
|
|
76
|
+
<dt><a href="#CurveDepositAction">CurveDepositAction</a></dt>
|
|
77
|
+
<dd></dd>
|
|
78
|
+
<dt><a href="#CurveGaugeDepositAction">CurveGaugeDepositAction</a></dt>
|
|
79
|
+
<dd></dd>
|
|
80
|
+
<dt><a href="#CurveGaugeWithdrawAction">CurveGaugeWithdrawAction</a></dt>
|
|
81
|
+
<dd></dd>
|
|
82
|
+
<dt><a href="#CurveMintCrvAction">CurveMintCrvAction</a></dt>
|
|
83
|
+
<dd></dd>
|
|
84
|
+
<dt><a href="#CurveSwapAction">CurveSwapAction</a></dt>
|
|
85
|
+
<dd></dd>
|
|
86
|
+
<dt><a href="#CurveWithdrawAction">CurveWithdrawAction</a></dt>
|
|
87
|
+
<dd></dd>
|
|
74
88
|
<dt><a href="#DyDxSupplyAction">DyDxSupplyAction</a></dt>
|
|
75
89
|
<dd><p>DyDxSupplyAction - Supply token to an DyDx position</p>
|
|
76
90
|
</dd>
|
|
@@ -580,6 +594,115 @@ CompoundWithdrawAction - Withdraw token from an Compound position
|
|
|
580
594
|
- amount <code>string</code> - Wei amount in underlying asset decimals (not cAsset) - ie. 18 dec for cETH, not 8
|
|
581
595
|
- to <code>EthAddress</code>
|
|
582
596
|
|
|
597
|
+
<a name="CurveClaimFeesAction"></a>
|
|
598
|
+
|
|
599
|
+
## CurveClaimFeesAction
|
|
600
|
+
**Kind**: global class
|
|
601
|
+
<a name="new_CurveClaimFeesAction_new"></a>
|
|
602
|
+
|
|
603
|
+
### new CurveClaimFeesAction(claimFor, receiver)
|
|
604
|
+
**Params**
|
|
605
|
+
|
|
606
|
+
- claimFor <code>EthAddress</code>
|
|
607
|
+
- receiver <code>EthAddress</code>
|
|
608
|
+
|
|
609
|
+
<a name="CurveDepositAction"></a>
|
|
610
|
+
|
|
611
|
+
## CurveDepositAction
|
|
612
|
+
**Kind**: global class
|
|
613
|
+
<a name="new_CurveDepositAction_new"></a>
|
|
614
|
+
|
|
615
|
+
### new CurveDepositAction(sender, receiver, depositTarget, lpToken, sig, minMintAmount, amounts, tokens, useUnderlying)
|
|
616
|
+
**Params**
|
|
617
|
+
|
|
618
|
+
- sender <code>EthAddress</code>
|
|
619
|
+
- receiver <code>EthAddress</code>
|
|
620
|
+
- depositTarget <code>EthAddress</code>
|
|
621
|
+
- lpToken <code>EthAddress</code>
|
|
622
|
+
- sig <code>bytes4</code>
|
|
623
|
+
- minMintAmount <code>string</code>
|
|
624
|
+
- amounts <code>Array.<string></code>
|
|
625
|
+
- tokens <code>Array.<EthAddress></code>
|
|
626
|
+
- useUnderlying <code>boolean</code>
|
|
627
|
+
|
|
628
|
+
<a name="CurveGaugeDepositAction"></a>
|
|
629
|
+
|
|
630
|
+
## CurveGaugeDepositAction
|
|
631
|
+
**Kind**: global class
|
|
632
|
+
<a name="new_CurveGaugeDepositAction_new"></a>
|
|
633
|
+
|
|
634
|
+
### new CurveGaugeDepositAction(gaugeAddr, lpToken, sender, onBehalfOf, amount)
|
|
635
|
+
**Params**
|
|
636
|
+
|
|
637
|
+
- gaugeAddr <code>EthAddress</code>
|
|
638
|
+
- lpToken <code>EthAddress</code>
|
|
639
|
+
- sender <code>EthAddress</code>
|
|
640
|
+
- onBehalfOf <code>EthAddress</code>
|
|
641
|
+
- amount <code>string</code>
|
|
642
|
+
|
|
643
|
+
<a name="CurveGaugeWithdrawAction"></a>
|
|
644
|
+
|
|
645
|
+
## CurveGaugeWithdrawAction
|
|
646
|
+
**Kind**: global class
|
|
647
|
+
<a name="new_CurveGaugeWithdrawAction_new"></a>
|
|
648
|
+
|
|
649
|
+
### new CurveGaugeWithdrawAction(gaugeAddr, lpToken, receiver, amount)
|
|
650
|
+
**Params**
|
|
651
|
+
|
|
652
|
+
- gaugeAddr <code>EthAddress</code>
|
|
653
|
+
- lpToken <code>EthAddress</code>
|
|
654
|
+
- receiver <code>EthAddress</code>
|
|
655
|
+
- amount <code>string</code>
|
|
656
|
+
|
|
657
|
+
<a name="CurveMintCrvAction"></a>
|
|
658
|
+
|
|
659
|
+
## CurveMintCrvAction
|
|
660
|
+
**Kind**: global class
|
|
661
|
+
<a name="new_CurveMintCrvAction_new"></a>
|
|
662
|
+
|
|
663
|
+
### new CurveMintCrvAction(gaugeAddrs, receiver)
|
|
664
|
+
**Params**
|
|
665
|
+
|
|
666
|
+
- gaugeAddrs <code>Array.<EthAddress></code>
|
|
667
|
+
- receiver <code>EthAddress</code>
|
|
668
|
+
|
|
669
|
+
<a name="CurveSwapAction"></a>
|
|
670
|
+
|
|
671
|
+
## CurveSwapAction
|
|
672
|
+
**Kind**: global class
|
|
673
|
+
<a name="new_CurveSwapAction_new"></a>
|
|
674
|
+
|
|
675
|
+
### new CurveSwapAction(sender, receiver, pool, tokenA, tokenB, amount, expected)
|
|
676
|
+
**Params**
|
|
677
|
+
|
|
678
|
+
- sender <code>EthAddress</code>
|
|
679
|
+
- receiver <code>EthAddress</code>
|
|
680
|
+
- pool <code>EthAddress</code>
|
|
681
|
+
- tokenA <code>EthAddress</code>
|
|
682
|
+
- tokenB <code>EthAddress</code>
|
|
683
|
+
- amount <code>string</code>
|
|
684
|
+
- expected <code>string</code>
|
|
685
|
+
|
|
686
|
+
<a name="CurveWithdrawAction"></a>
|
|
687
|
+
|
|
688
|
+
## CurveWithdrawAction
|
|
689
|
+
**Kind**: global class
|
|
690
|
+
<a name="new_CurveWithdrawAction_new"></a>
|
|
691
|
+
|
|
692
|
+
### new CurveWithdrawAction(sender, receiver, depositTarget, lpToken, sig, burnAmount, minAmounts, tokens, withdrawExact, useUnderlying)
|
|
693
|
+
**Params**
|
|
694
|
+
|
|
695
|
+
- sender <code>EthAddress</code>
|
|
696
|
+
- receiver <code>EthAddress</code>
|
|
697
|
+
- depositTarget <code>EthAddress</code>
|
|
698
|
+
- lpToken <code>EthAddress</code>
|
|
699
|
+
- sig <code>bytes4</code>
|
|
700
|
+
- burnAmount <code>string</code>
|
|
701
|
+
- minAmounts <code>Array.<string></code>
|
|
702
|
+
- tokens <code>Array.<EthAddress></code>
|
|
703
|
+
- withdrawExact <code>boolean</code>
|
|
704
|
+
- useUnderlying <code>boolean</code>
|
|
705
|
+
|
|
583
706
|
<a name="DyDxSupplyAction"></a>
|
|
584
707
|
|
|
585
708
|
## DyDxSupplyAction
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ class CompoundPaybackAction extends Action {
|
|
|
19
19
|
async getAssetsToApprove() {
|
|
20
20
|
const asset = getAssetInfoByAddress(this.args[0]);
|
|
21
21
|
if (asset.symbol !== 'cETH') return [{asset: getAssetInfo(asset.symbol.substr(1)).address, owner: this.args[2]}];
|
|
22
|
+
else return [{asset: getAssetInfo('WETH').address, owner: this.args[2]}]
|
|
22
23
|
return [];
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -19,6 +19,7 @@ class CompoundSupplyAction extends Action {
|
|
|
19
19
|
async getAssetsToApprove() {
|
|
20
20
|
const asset = getAssetInfoByAddress(this.args[0]);
|
|
21
21
|
if (asset.symbol !== 'cETH') return [{asset: getAssetInfo(asset.symbol.substr(1)).address, owner: this.args[2]}];
|
|
22
|
+
else return [{asset: getAssetInfo('WETH').address, owner: this.args[2]}]
|
|
22
23
|
return [];
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const { getAssetInfo } = require('@defisaver/tokens');
|
|
2
|
+
const Action = require('../../Action');
|
|
3
|
+
const { requireAddress } = require('../../utils/general');
|
|
4
|
+
const { getAddr } = require('../../addresses');
|
|
5
|
+
|
|
6
|
+
class CurveClaimFeesAction extends Action {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {EthAddress} claimFor
|
|
11
|
+
* @param {EthAddress} receiver
|
|
12
|
+
*/
|
|
13
|
+
constructor(
|
|
14
|
+
claimFor,
|
|
15
|
+
receiver,
|
|
16
|
+
) {
|
|
17
|
+
requireAddress(claimFor);
|
|
18
|
+
requireAddress(receiver);
|
|
19
|
+
super('CurveClaimFeesAction',
|
|
20
|
+
getAddr('CurveClaimFeesAction'),
|
|
21
|
+
[['address', 'address']],
|
|
22
|
+
[[...arguments]]);
|
|
23
|
+
|
|
24
|
+
this.mappableArgs = [
|
|
25
|
+
this.args[0][0],
|
|
26
|
+
this.args[0][1],
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = CurveClaimFeesAction;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { getAssetInfo } = require('@defisaver/tokens');
|
|
2
|
+
const Action = require('../../Action');
|
|
3
|
+
const { requireAddress } = require('../../utils/general');
|
|
4
|
+
const { getAddr } = require('../../addresses');
|
|
5
|
+
|
|
6
|
+
class CurveDepositAction extends Action {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {EthAddress} sender
|
|
10
|
+
* @param {EthAddress} receiver
|
|
11
|
+
* @param {EthAddress} depositTarget
|
|
12
|
+
* @param {EthAddress} lpToken
|
|
13
|
+
* @param {bytes4} sig
|
|
14
|
+
* @param {string} minMintAmount
|
|
15
|
+
* @param {Array<string>} amounts
|
|
16
|
+
* @param {Array<EthAddress>} tokens
|
|
17
|
+
* @param {boolean} useUnderlying
|
|
18
|
+
*/
|
|
19
|
+
constructor(
|
|
20
|
+
sender,
|
|
21
|
+
receiver,
|
|
22
|
+
depositTarget,
|
|
23
|
+
lpToken,
|
|
24
|
+
sig,
|
|
25
|
+
minMintAmount,
|
|
26
|
+
amounts = [],
|
|
27
|
+
tokens = [],
|
|
28
|
+
useUnderlying
|
|
29
|
+
) {
|
|
30
|
+
requireAddress(sender);
|
|
31
|
+
requireAddress(receiver);
|
|
32
|
+
super('CurveDeposit',
|
|
33
|
+
getAddr('CurveDeposit'),
|
|
34
|
+
[['address', 'address', 'address', 'address', 'bytes4', 'uint256', 'uint256[]', 'address[]', 'bool']],
|
|
35
|
+
[[...arguments]]);
|
|
36
|
+
|
|
37
|
+
this.mappableArgs = [
|
|
38
|
+
this.args[0][0],
|
|
39
|
+
this.args[0][1],
|
|
40
|
+
this.args[0][5],
|
|
41
|
+
...this.args[0][6],
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async getAssetsToApprove() {
|
|
46
|
+
return this.args[0][7].map(_asset => Object({ asset: _asset, owner: this.args[0][0] }));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = CurveDepositAction;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const Action = require('../../Action');
|
|
2
|
+
const { requireAddress } = require('../../utils/general');
|
|
3
|
+
const { getAddr } = require('../../addresses');
|
|
4
|
+
|
|
5
|
+
class CurveGaugeDepositAction extends Action {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {EthAddress} gaugeAddr
|
|
10
|
+
* @param {EthAddress} lpToken
|
|
11
|
+
* @param {EthAddress} sender
|
|
12
|
+
* @param {EthAddress} onBehalfOf
|
|
13
|
+
* @param {string} amount
|
|
14
|
+
*/
|
|
15
|
+
constructor(gaugeAddr, lpToken, sender, onBehalfOf, amount) {
|
|
16
|
+
requireAddress(sender);
|
|
17
|
+
requireAddress(onBehalfOf);
|
|
18
|
+
super('CurveGaugeDeposit',
|
|
19
|
+
getAddr('CurveGaugeDeposit'),
|
|
20
|
+
[['address', 'address', 'address', 'address', 'uint256']],
|
|
21
|
+
[[...arguments]],
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
this.mappableArgs = [
|
|
25
|
+
this.args[0][2],
|
|
26
|
+
this.args[0][3],
|
|
27
|
+
this.args[0][4],
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async getAssetsToApprove() {
|
|
32
|
+
return { asset: this.args[0][1], owner: this.args[0][2] };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = CurveGaugeDepositAction;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const Action = require('../../Action');
|
|
2
|
+
const { requireAddress } = require('../../utils/general');
|
|
3
|
+
const { getAddr } = require('../../addresses');
|
|
4
|
+
|
|
5
|
+
class CurveGaugeWithdrawAction extends Action {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {EthAddress} gaugeAddr
|
|
9
|
+
* @param {EthAddress} lpToken
|
|
10
|
+
* @param {EthAddress} receiver
|
|
11
|
+
* @param {string} amount
|
|
12
|
+
*/
|
|
13
|
+
constructor(gaugeAddr, lpToken, receiver, amount) {
|
|
14
|
+
requireAddress(receiver);
|
|
15
|
+
super('CurveGaugeWithdraw',
|
|
16
|
+
getAddr('CurveGaugeWithdraw'),
|
|
17
|
+
[['address', 'address', 'address', 'uint256']],
|
|
18
|
+
[[...arguments]],
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
this.mappableArgs = [
|
|
22
|
+
this.args[0][2],
|
|
23
|
+
this.args[0][3],
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports = CurveGaugeWithdrawAction;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const Action = require('../../Action');
|
|
2
|
+
const { requireAddress } = require('../../utils/general');
|
|
3
|
+
const { getAddr } = require('../../addresses');
|
|
4
|
+
|
|
5
|
+
class CurveMintCrvAction extends Action {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {Array<EthAddress>} gaugeAddrs
|
|
9
|
+
* @param {EthAddress} receiver
|
|
10
|
+
*/
|
|
11
|
+
constructor(gaugeAddrs, receiver) {
|
|
12
|
+
requireAddress(receiver);
|
|
13
|
+
super('CurveMintCrv',
|
|
14
|
+
getAddr('CurveMintCrv'),
|
|
15
|
+
[['address[8]', 'address']],
|
|
16
|
+
[[...arguments]],
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
this.mappableArgs = [
|
|
20
|
+
this.args[0][8],
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = CurveMintCrvAction;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const { getAssetInfo } = require('@defisaver/tokens');
|
|
2
|
+
const Action = require('../../Action');
|
|
3
|
+
const { requireAddress } = require('../../utils/general');
|
|
4
|
+
const { getAddr } = require('../../addresses');
|
|
5
|
+
|
|
6
|
+
class CurveSwapAction extends Action {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {EthAddress} sender
|
|
11
|
+
* @param {EthAddress} receiver
|
|
12
|
+
* @param {EthAddress} pool
|
|
13
|
+
* @param {EthAddress} tokenA
|
|
14
|
+
* @param {EthAddress} tokenB
|
|
15
|
+
* @param {string} amount
|
|
16
|
+
* @param {string} expected
|
|
17
|
+
*/
|
|
18
|
+
constructor(sender, receiver, pool, tokenA, tokenB, amount, expected) {
|
|
19
|
+
requireAddress(sender);
|
|
20
|
+
requireAddress(receiver);
|
|
21
|
+
super('CurveSwap',
|
|
22
|
+
getAddr('CurveSwap'),
|
|
23
|
+
[['address', 'address', 'address', 'address', 'address', 'uint256', 'uint256']],
|
|
24
|
+
[[...arguments]]);
|
|
25
|
+
|
|
26
|
+
this.mappableArgs = [
|
|
27
|
+
this.args[0][0],
|
|
28
|
+
this.args[0][1],
|
|
29
|
+
this.args[0][5],
|
|
30
|
+
this.args[0][6],
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async getAssetsToApprove() {
|
|
35
|
+
return [{ asset: this.args[0][3], owner: this.args[0][0] }];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = CurveSwapAction;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const { getAssetInfo } = require('@defisaver/tokens');
|
|
2
|
+
const Action = require('../../Action');
|
|
3
|
+
const { requireAddress } = require('../../utils/general');
|
|
4
|
+
const { getAddr } = require('../../addresses');
|
|
5
|
+
|
|
6
|
+
class CurveWithdrawAction extends Action {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {EthAddress} sender
|
|
11
|
+
* @param {EthAddress} receiver
|
|
12
|
+
* @param {EthAddress} depositTarget
|
|
13
|
+
* @param {EthAddress} lpToken
|
|
14
|
+
* @param {bytes4} sig
|
|
15
|
+
* @param {string} burnAmount
|
|
16
|
+
* @param {Array<string>} minAmounts
|
|
17
|
+
* @param {Array<EthAddress>} tokens
|
|
18
|
+
* @param {boolean} withdrawExact
|
|
19
|
+
* @param {boolean} useUnderlying
|
|
20
|
+
*/
|
|
21
|
+
constructor(
|
|
22
|
+
sender,
|
|
23
|
+
receiver,
|
|
24
|
+
depositTarget,
|
|
25
|
+
lpToken,
|
|
26
|
+
sig,
|
|
27
|
+
burnAmount,
|
|
28
|
+
minAmounts = [],
|
|
29
|
+
tokens = [],
|
|
30
|
+
withdrawExact,
|
|
31
|
+
useUnderlying
|
|
32
|
+
) {
|
|
33
|
+
requireAddress(sender);
|
|
34
|
+
requireAddress(receiver);
|
|
35
|
+
super('CurveWithdrawAction',
|
|
36
|
+
getAddr('CurveWithdrawAction'),
|
|
37
|
+
[['address', 'address', 'address', 'address', 'bytes4', 'uint256', 'uint256[]', 'address[]', 'bool', 'bool']],
|
|
38
|
+
[[...arguments]]);
|
|
39
|
+
|
|
40
|
+
this.mappableArgs = [
|
|
41
|
+
this.args[0][0],
|
|
42
|
+
this.args[0][1],
|
|
43
|
+
this.args[0][5],
|
|
44
|
+
...this.args[0][6],
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async getAssetsToApprove() {
|
|
49
|
+
return { asset: this.args[0][3], owner: this.args[0][0] };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
module.exports = CurveWithdrawAction;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const CurveSwapAction = require('./CurveSwapAction');
|
|
2
|
+
const CurveDepositAction = require('./CurveDepositAction');
|
|
3
|
+
const CurveWithdrawAction = require('./CurveWithdrawAction');
|
|
4
|
+
|
|
5
|
+
const CurveGaugeDepositAction = require('./CurveGaugeDepositAction');
|
|
6
|
+
const CurveGaugeWithdrawAction = require('./CurveGaugeWithdrawAction');
|
|
7
|
+
const CurveMintCrvAction = require('./CurveMintCrvAction');
|
|
8
|
+
const CurveClaimFeesAction = require('./CurveClaimFeesAction');
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
CurveSwapAction,
|
|
12
|
+
CurveDepositAction,
|
|
13
|
+
CurveWithdrawAction,
|
|
14
|
+
|
|
15
|
+
CurveGaugeDepositAction,
|
|
16
|
+
CurveGaugeWithdrawAction,
|
|
17
|
+
CurveMintCrvAction,
|
|
18
|
+
CurveClaimFeesAction,
|
|
19
|
+
};
|
package/src/actions/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const yearn = require('./yearn');
|
|
|
12
12
|
const lido = require('./lido');
|
|
13
13
|
const insta = require('./insta');
|
|
14
14
|
const balancer = require('./balancer');
|
|
15
|
+
const curve = require('./curve');
|
|
15
16
|
const guni = require('./guni');
|
|
16
17
|
const mstable = require('./mstable');
|
|
17
18
|
const rari = require('./rari');
|
|
@@ -31,6 +32,7 @@ module.exports = {
|
|
|
31
32
|
lido,
|
|
32
33
|
insta,
|
|
33
34
|
balancer,
|
|
35
|
+
curve,
|
|
34
36
|
guni,
|
|
35
37
|
mstable,
|
|
36
38
|
rari,
|
package/src/addresses.js
CHANGED
|
@@ -136,6 +136,7 @@ const otherAddresses = {
|
|
|
136
136
|
UniswapV3PositionManager : '0xC36442b4a4522E871399CD717aBDD847Ab11FE88',
|
|
137
137
|
RaiWethUniV2LPToken : '0x8aE720a71622e824F576b4A8C03031066548A3B1',
|
|
138
138
|
BalancerToken : '0xba100000625a3754423978a60c9317c58a424e3D',
|
|
139
|
+
CrvToken: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
139
140
|
DAI: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
|
140
141
|
}
|
|
141
142
|
|
|
@@ -43,7 +43,7 @@ describe('Action: CompoundPaybackAction', () => {
|
|
|
43
43
|
it('encodeForRecipe', () => encodeForRecipe(action));
|
|
44
44
|
it('getAssetsToApprove', async () => {
|
|
45
45
|
const assetOwnerPairs = await action.getAssetsToApprove();
|
|
46
|
-
assert.lengthOf(assetOwnerPairs,
|
|
46
|
+
assert.lengthOf(assetOwnerPairs, 1);
|
|
47
47
|
})
|
|
48
48
|
it('getEthValue', async () => {
|
|
49
49
|
const ethValue = await action.getEthValue();
|
|
@@ -21,7 +21,7 @@ describe('Action: CompoundSupplyAction', () => {
|
|
|
21
21
|
it('encodeForRecipe', () => encodeForRecipe(action));
|
|
22
22
|
it('getAssetsToApprove', async () => {
|
|
23
23
|
const assetOwnerPairs = await action.getAssetsToApprove();
|
|
24
|
-
assert.lengthOf(assetOwnerPairs,
|
|
24
|
+
assert.lengthOf(assetOwnerPairs, 1);
|
|
25
25
|
})
|
|
26
26
|
it('getEthValue', async () => {
|
|
27
27
|
const ethValue = await action.getEthValue();
|