@curvefi/api 1.16.1 → 1.18.0
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/README.md +98 -0
- package/lib/constants/abis/abis-ethereum.js +6 -6
- package/lib/constants/abis/json/deposit_and_stake.json +51 -0
- package/lib/constants/abis/json/factory-v2/DepositZapMetaBtcPolygon.json +197 -0
- package/lib/constants/abis/json/factory-v2/DepositZapMetaUsdPolygon.json +197 -0
- package/lib/constants/abis/json/factory-v2/MetaBTC.json +919 -0
- package/lib/constants/abis/json/factory-v2/MetaBTCBalances.json +932 -0
- package/lib/constants/abis/json/factory-v2/MetaBTCBalancesRen.json +932 -0
- package/lib/constants/abis/json/factory-v2/MetaBTCRen.json +919 -0
- package/lib/constants/abis/json/factory-v2/MetaUSD.json +919 -0
- package/lib/constants/abis/json/factory-v2/MetaUSDBalances.json +932 -0
- package/lib/constants/abis/json/factory-v2/Plain2Balances.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain2Basic.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain2ETH.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain2Optimized.json +844 -0
- package/lib/constants/abis/json/factory-v2/Plain3Balances.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain3Basic.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain3ETH.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain3Optimized.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain4Balances.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain4Basic.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain4ETH.json +845 -0
- package/lib/constants/abis/json/factory-v2/Plain4Optimized.json +845 -0
- package/lib/constants/abis/json/factory.json +1063 -0
- package/lib/constants/aliases.d.ts +4 -0
- package/lib/constants/aliases.js +4 -0
- package/lib/constants/coins-polygon.js +3 -2
- package/lib/curve.d.ts +4 -0
- package/lib/curve.js +44 -0
- package/lib/factory.d.ts +32 -0
- package/lib/factory.js +607 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +15 -0
- package/lib/interfaces.d.ts +15 -1
- package/lib/pools.d.ts +22 -0
- package/lib/pools.js +462 -69
- package/lib/utils.d.ts +8 -1
- package/lib/utils.js +121 -8
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -717,3 +717,101 @@ console.log(await pool.gaugeClaimableRewards());
|
|
|
717
717
|
// ]
|
|
718
718
|
await pool.gaugeClaimRewards();
|
|
719
719
|
```
|
|
720
|
+
|
|
721
|
+
## Deposit&Stake
|
|
722
|
+
Add liquidity and deposit into gauge in one transaction.
|
|
723
|
+
|
|
724
|
+
### Underlying
|
|
725
|
+
```ts
|
|
726
|
+
(async () => {
|
|
727
|
+
const pool = new curve.Pool('compound');
|
|
728
|
+
const amounts = ['1000', '1000'];
|
|
729
|
+
|
|
730
|
+
console.log(await pool.underlyingCoinBalances());
|
|
731
|
+
// { DAI: '10000.0', USDC: '10000.0' }
|
|
732
|
+
console.log(await pool.lpTokenBalances());
|
|
733
|
+
// { lpToken: '0.0', gauge: '0.0' }
|
|
734
|
+
|
|
735
|
+
console.log(await pool.depositAndStakeExpected(amounts));
|
|
736
|
+
// 1820.604572902286288394
|
|
737
|
+
console.log(await pool.depositAndStakeSlippage(amounts));
|
|
738
|
+
// -0.0000036435051742755193
|
|
739
|
+
|
|
740
|
+
console.log(await pool.depositAndStakeIsApproved(amounts));
|
|
741
|
+
// false
|
|
742
|
+
|
|
743
|
+
await pool.depositAndStakeApprove(amounts);
|
|
744
|
+
await pool.depositAndStake(amounts);
|
|
745
|
+
|
|
746
|
+
console.log(await pool.underlyingCoinBalances());
|
|
747
|
+
// { DAI: '9000.0', USDC: '9000.0' }
|
|
748
|
+
console.log(await pool.lpTokenBalances());
|
|
749
|
+
// { lpToken: '0.0', gauge: '1820.556829935710883568' }
|
|
750
|
+
})();
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
### Wrapped
|
|
754
|
+
```ts
|
|
755
|
+
(async () => {
|
|
756
|
+
const pool = new curve.Pool('compound');
|
|
757
|
+
const amounts = ['1000', '1000'];
|
|
758
|
+
|
|
759
|
+
console.log(await pool.coinBalances());
|
|
760
|
+
// { cDAI: '10000.0', cUSDC: '10000.0' }
|
|
761
|
+
console.log(await pool.lpTokenBalances());
|
|
762
|
+
// { lpToken: '0.0', gauge: '1820.556829935710883568' }
|
|
763
|
+
|
|
764
|
+
console.log(await pool.depositAndStakeWrappedExpected(amounts));
|
|
765
|
+
// 40.328408669183101673
|
|
766
|
+
console.log(await pool.depositAndStakeWrappedSlippage(amounts));
|
|
767
|
+
// -0.0020519915272297325
|
|
768
|
+
|
|
769
|
+
console.log(await pool.depositAndStakeWrappedIsApproved(amounts));
|
|
770
|
+
// false
|
|
771
|
+
|
|
772
|
+
await pool.depositAndStakeWrappedApprove(amounts);
|
|
773
|
+
await pool.depositAndStakeWrapped(amounts);
|
|
774
|
+
|
|
775
|
+
console.log(await pool.coinBalances());
|
|
776
|
+
// { cDAI: '9000.0', cUSDC: '9000.0' }
|
|
777
|
+
console.log(await pool.lpTokenBalances());
|
|
778
|
+
// { lpToken: '0.0', gauge: '1860.884096082215274556' }
|
|
779
|
+
})();
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
## Factory
|
|
783
|
+
All the methods above can be used for factory pools. It's only needed to fetch them.
|
|
784
|
+
|
|
785
|
+
### Stable factory pools
|
|
786
|
+
```ts
|
|
787
|
+
import curve from "@curvefi/api";
|
|
788
|
+
|
|
789
|
+
(async () => {
|
|
790
|
+
await curve.init('JsonRpc', {}, { chainId: 1 });
|
|
791
|
+
await curve.fetchFactoryPools();
|
|
792
|
+
|
|
793
|
+
const factoryPools = curve.getFactoryPoolList();
|
|
794
|
+
// [
|
|
795
|
+
// 'ibEUR+sEUR', 'ibKRW+sKRW', 'ibEUR+sEUR-2', 'crvCRVsCRV',
|
|
796
|
+
// 'jGBP+TGBP', '2CRV', 'crvCRV', 'ibbtc/sbtcCRV',
|
|
797
|
+
// 'OUSD3CRV', 'aUSDC+aDAI', 'FEI3CRV3CRV', 'GrapeFUSD3CRV',
|
|
798
|
+
// 'SifuETH3CRV', 'RC_INV3CRV', 'RC_xRULER3CRV', 'RC_xCOVER3CRV',
|
|
799
|
+
// 'nUSD3CRV', 'cvxcrv', 'USDM3CRV', 'mEUR',
|
|
800
|
+
// 'waUSD3CRV', 'waBTC/sbtcCRV', 'DOLA3POOL3CRV', 'ibJPY+sJPY',
|
|
801
|
+
// 'ibAUD+sAUD', 'ibGBP+sGBP', 'ibCHF+sCHF', 'OPEN MATIC',
|
|
802
|
+
// 'EURN/EURT', 'sdCRV', 'BTCpx/sbtcCRV', 'PWRD3CRV3CRV',
|
|
803
|
+
// 'sansUSDT', 'alETH+ETH', '17PctCypt3CRV', '17PctCypt3CRV-2',
|
|
804
|
+
// 'tbtc2/sbtcCRV', 'kusd3pool3CRV', 'tusd3pool3CRV', 'PWRD3CRV',
|
|
805
|
+
// 'fUSD3CRV', 'TPD3CRV', 'DEI3CRV', 'MIM-UST',
|
|
806
|
+
// 'ETH/vETH2', 'QBITWELLS3CRV', 'QWell13CRV', 'bveCVX-CVX',
|
|
807
|
+
// 'UST_whv23CRV', 'DSU+3Crv3CRV', 'DSU3CRV', 'aETHb',
|
|
808
|
+
// 'D3', 'aMATICb', 'pax-usdp3CRV', 'ibbtc/sbtcCRV-2',
|
|
809
|
+
// 'fxEUR_CRV', 'ORK/sbtcCRV', 'agEUR/sEUR', 'ibZAR+ZARP',
|
|
810
|
+
// '3DYDX3CRV', '3EURpool', 'tWETH+WETH', 'XSTUSD3CRV',
|
|
811
|
+
// 'XIM3CRV3CRV', 'XIM3CRV', 'RAMP rUSD3CRV', 'bhome3CRV',
|
|
812
|
+
// 'JPYC+ibJPY', 'UST-FRAX', 'FEIPCV-1', 'bentcvx',
|
|
813
|
+
// 'USX3CRV3CRV', 'ag+ib-EUR', 'tFRAX+FRAX', 'ELONXSWAP3CRV',
|
|
814
|
+
// 'BEAN3CRV', 'USDV3CRV', 'PARUSDC3CRV', 'baoUSD-3CRV'
|
|
815
|
+
// ]
|
|
816
|
+
|
|
817
|
+
})()
|
|
@@ -1233,7 +1233,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1233
1233
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1234
1234
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1235
1235
|
],
|
|
1236
|
-
|
|
1236
|
+
is_meta_factory: true,
|
|
1237
1237
|
gauge_abi: gauge_v2_json_1.default,
|
|
1238
1238
|
},
|
|
1239
1239
|
frax: {
|
|
@@ -1278,7 +1278,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1278
1278
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1279
1279
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1280
1280
|
],
|
|
1281
|
-
|
|
1281
|
+
is_meta_factory: true,
|
|
1282
1282
|
sCurveRewards_abi: rewards_json_2.default,
|
|
1283
1283
|
sCurveRewards_address: '0xBBbAf1adf4d39B2843928CCa1E65564e5ce99ccC',
|
|
1284
1284
|
reward_tokens: ['0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0'],
|
|
@@ -1326,7 +1326,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1326
1326
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1327
1327
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1328
1328
|
],
|
|
1329
|
-
|
|
1329
|
+
is_meta_factory: true,
|
|
1330
1330
|
sCurveRewards_abi: rewards_json_2.default,
|
|
1331
1331
|
sCurveRewards_address: '0xeb31da939878d1d780fdbcc244531c0fb80a2cf3',
|
|
1332
1332
|
reward_tokens: ['0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d'],
|
|
@@ -1374,7 +1374,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1374
1374
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1375
1375
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1376
1376
|
],
|
|
1377
|
-
|
|
1377
|
+
is_meta_factory: true,
|
|
1378
1378
|
gauge_abi: gauge_v2_json_1.default,
|
|
1379
1379
|
},
|
|
1380
1380
|
reth: {
|
|
@@ -1447,7 +1447,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1447
1447
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1448
1448
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1449
1449
|
],
|
|
1450
|
-
|
|
1450
|
+
is_meta_factory: true,
|
|
1451
1451
|
sCurveRewards_abi: rewards_json_2.default,
|
|
1452
1452
|
sCurveRewards_address: '0xb76256d1091e93976c61449d6e500d9f46d827d4',
|
|
1453
1453
|
reward_tokens: ['0xdbdb4d16eda451d0503b854cf79d55697f90c8df'],
|
|
@@ -1495,7 +1495,7 @@ exports.POOLS_DATA_ETHEREUM = {
|
|
|
1495
1495
|
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1496
1496
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1497
1497
|
],
|
|
1498
|
-
|
|
1498
|
+
is_meta_factory: true,
|
|
1499
1499
|
sCurveRewards_abi: rewards_json_2.default,
|
|
1500
1500
|
sCurveRewards_address: '0xb76256d1091e93976c61449d6e500d9f46d827d4',
|
|
1501
1501
|
reward_tokens: ['0x090185f2135308BaD17527004364eBcC2D37e5F6'],
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"stateMutability": "payable",
|
|
4
|
+
"type": "function",
|
|
5
|
+
"name": "deposit_and_stake",
|
|
6
|
+
"inputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "deposit",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "lp_token",
|
|
13
|
+
"type": "address"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "gauge",
|
|
17
|
+
"type": "address"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "n_coins",
|
|
21
|
+
"type": "uint256"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "coins",
|
|
25
|
+
"type": "address[5]"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "amounts",
|
|
29
|
+
"type": "uint256[5]"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "min_mint_amount",
|
|
33
|
+
"type": "uint256"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "use_underlying",
|
|
37
|
+
"type": "bool"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "pool",
|
|
41
|
+
"type": "address"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"outputs": [],
|
|
45
|
+
"gas": "409532"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"stateMutability": "payable",
|
|
49
|
+
"type": "fallback"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"stateMutability": "nonpayable",
|
|
4
|
+
"type": "constructor",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": []
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"stateMutability": "nonpayable",
|
|
10
|
+
"type": "function",
|
|
11
|
+
"name": "add_liquidity",
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "_pool",
|
|
15
|
+
"type": "address"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "_deposit_amounts",
|
|
19
|
+
"type": "uint256[3]"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "_min_mint_amount",
|
|
23
|
+
"type": "uint256"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"outputs": [
|
|
27
|
+
{
|
|
28
|
+
"name": "",
|
|
29
|
+
"type": "uint256"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"stateMutability": "nonpayable",
|
|
35
|
+
"type": "function",
|
|
36
|
+
"name": "remove_liquidity",
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "_pool",
|
|
40
|
+
"type": "address"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "_burn_amount",
|
|
44
|
+
"type": "uint256"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "_min_amounts",
|
|
48
|
+
"type": "uint256[3]"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"outputs": [
|
|
52
|
+
{
|
|
53
|
+
"name": "",
|
|
54
|
+
"type": "uint256[3]"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"stateMutability": "nonpayable",
|
|
60
|
+
"type": "function",
|
|
61
|
+
"name": "remove_liquidity_one_coin",
|
|
62
|
+
"inputs": [
|
|
63
|
+
{
|
|
64
|
+
"name": "_pool",
|
|
65
|
+
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "_burn_amount",
|
|
69
|
+
"type": "uint256"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "i",
|
|
73
|
+
"type": "int128"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "_min_amount",
|
|
77
|
+
"type": "uint256"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"outputs": [
|
|
81
|
+
{
|
|
82
|
+
"name": "",
|
|
83
|
+
"type": "uint256"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"stateMutability": "nonpayable",
|
|
89
|
+
"type": "function",
|
|
90
|
+
"name": "remove_liquidity_imbalance",
|
|
91
|
+
"inputs": [
|
|
92
|
+
{
|
|
93
|
+
"name": "_pool",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "_amounts",
|
|
98
|
+
"type": "uint256[3]"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "_max_burn_amount",
|
|
102
|
+
"type": "uint256"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"outputs": [
|
|
106
|
+
{
|
|
107
|
+
"name": "",
|
|
108
|
+
"type": "uint256"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"stateMutability": "view",
|
|
114
|
+
"type": "function",
|
|
115
|
+
"name": "calc_withdraw_one_coin",
|
|
116
|
+
"inputs": [
|
|
117
|
+
{
|
|
118
|
+
"name": "_pool",
|
|
119
|
+
"type": "address"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "_token_amount",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "i",
|
|
127
|
+
"type": "int128"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"outputs": [
|
|
131
|
+
{
|
|
132
|
+
"name": "",
|
|
133
|
+
"type": "uint256"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"gas": "5753"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"stateMutability": "view",
|
|
140
|
+
"type": "function",
|
|
141
|
+
"name": "calc_token_amount",
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"name": "_pool",
|
|
145
|
+
"type": "address"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "_amounts",
|
|
149
|
+
"type": "uint256[3]"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "_is_deposit",
|
|
153
|
+
"type": "bool"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"outputs": [
|
|
157
|
+
{
|
|
158
|
+
"name": "",
|
|
159
|
+
"type": "uint256"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"gas": "6289"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"stateMutability": "nonpayable",
|
|
166
|
+
"type": "function",
|
|
167
|
+
"name": "exchange_underlying",
|
|
168
|
+
"inputs": [
|
|
169
|
+
{
|
|
170
|
+
"name": "_pool",
|
|
171
|
+
"type": "address"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "_i",
|
|
175
|
+
"type": "int128"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "_j",
|
|
179
|
+
"type": "int128"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "_dx",
|
|
183
|
+
"type": "uint256"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "_min_dy",
|
|
187
|
+
"type": "uint256"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"outputs": [
|
|
191
|
+
{
|
|
192
|
+
"name": "",
|
|
193
|
+
"type": "uint256"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"stateMutability": "nonpayable",
|
|
4
|
+
"type": "constructor",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": []
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"stateMutability": "nonpayable",
|
|
10
|
+
"type": "function",
|
|
11
|
+
"name": "add_liquidity",
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "_pool",
|
|
15
|
+
"type": "address"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "_deposit_amounts",
|
|
19
|
+
"type": "uint256[4]"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "_min_mint_amount",
|
|
23
|
+
"type": "uint256"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"outputs": [
|
|
27
|
+
{
|
|
28
|
+
"name": "",
|
|
29
|
+
"type": "uint256"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"stateMutability": "nonpayable",
|
|
35
|
+
"type": "function",
|
|
36
|
+
"name": "remove_liquidity",
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "_pool",
|
|
40
|
+
"type": "address"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "_burn_amount",
|
|
44
|
+
"type": "uint256"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "_min_amounts",
|
|
48
|
+
"type": "uint256[4]"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"outputs": [
|
|
52
|
+
{
|
|
53
|
+
"name": "",
|
|
54
|
+
"type": "uint256[4]"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"stateMutability": "nonpayable",
|
|
60
|
+
"type": "function",
|
|
61
|
+
"name": "remove_liquidity_one_coin",
|
|
62
|
+
"inputs": [
|
|
63
|
+
{
|
|
64
|
+
"name": "_pool",
|
|
65
|
+
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "_burn_amount",
|
|
69
|
+
"type": "uint256"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "i",
|
|
73
|
+
"type": "int128"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "_min_amount",
|
|
77
|
+
"type": "uint256"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"outputs": [
|
|
81
|
+
{
|
|
82
|
+
"name": "",
|
|
83
|
+
"type": "uint256"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"stateMutability": "nonpayable",
|
|
89
|
+
"type": "function",
|
|
90
|
+
"name": "remove_liquidity_imbalance",
|
|
91
|
+
"inputs": [
|
|
92
|
+
{
|
|
93
|
+
"name": "_pool",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "_amounts",
|
|
98
|
+
"type": "uint256[4]"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "_max_burn_amount",
|
|
102
|
+
"type": "uint256"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"outputs": [
|
|
106
|
+
{
|
|
107
|
+
"name": "",
|
|
108
|
+
"type": "uint256"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"stateMutability": "view",
|
|
114
|
+
"type": "function",
|
|
115
|
+
"name": "calc_withdraw_one_coin",
|
|
116
|
+
"inputs": [
|
|
117
|
+
{
|
|
118
|
+
"name": "_pool",
|
|
119
|
+
"type": "address"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "_token_amount",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "i",
|
|
127
|
+
"type": "int128"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"outputs": [
|
|
131
|
+
{
|
|
132
|
+
"name": "",
|
|
133
|
+
"type": "uint256"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"gas": "5753"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"stateMutability": "view",
|
|
140
|
+
"type": "function",
|
|
141
|
+
"name": "calc_token_amount",
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"name": "_pool",
|
|
145
|
+
"type": "address"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "_amounts",
|
|
149
|
+
"type": "uint256[4]"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "_is_deposit",
|
|
153
|
+
"type": "bool"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"outputs": [
|
|
157
|
+
{
|
|
158
|
+
"name": "",
|
|
159
|
+
"type": "uint256"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"gas": "6666"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"stateMutability": "nonpayable",
|
|
166
|
+
"type": "function",
|
|
167
|
+
"name": "exchange_underlying",
|
|
168
|
+
"inputs": [
|
|
169
|
+
{
|
|
170
|
+
"name": "_pool",
|
|
171
|
+
"type": "address"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "_i",
|
|
175
|
+
"type": "int128"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "_j",
|
|
179
|
+
"type": "int128"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "_dx",
|
|
183
|
+
"type": "uint256"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "_min_dy",
|
|
187
|
+
"type": "uint256"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"outputs": [
|
|
191
|
+
{
|
|
192
|
+
"name": "",
|
|
193
|
+
"type": "uint256"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|