@curvefi/api 1.24.4 → 1.25.1
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/lib/constants/abis/abis-ethereum.js +145 -5
- package/lib/constants/abis/json/2pool/swap.json +1065 -0
- package/lib/constants/abis/json/4pool/swap.json +951 -0
- package/lib/constants/abis/json/eursusd/swap.json +1199 -0
- package/lib/constants/abis/json/gauge_v5.json +958 -0
- package/lib/constants/abis/json/rai/deposit.json +228 -0
- package/lib/constants/abis/json/rai/swap.json +1039 -0
- package/lib/constants/coins-ethereum.js +4 -0
- package/lib/curve.js +1 -0
- package/lib/pools.js +2 -2
- package/package.json +12 -3
|
@@ -90,6 +90,8 @@ exports.USD_COINS_ETHEREUM = {
|
|
|
90
90
|
busd: "0x4Fabb145d64652a948d72533023f6E7A623C7C53",
|
|
91
91
|
alusd: "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",
|
|
92
92
|
mim: "0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",
|
|
93
|
+
rai: "0x03ab458634910aad20ef5f1c8ee96f1d6ac54919",
|
|
94
|
+
wormholeust: "0xa693B19d2931d498c5B318dF961919BB4aee87a5",
|
|
93
95
|
'3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
|
|
94
96
|
crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
95
97
|
cvx: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b", // CVX
|
|
@@ -165,6 +167,8 @@ exports.DECIMALS_ETHEREUM = {
|
|
|
165
167
|
"0x68749665ff8d2d112fa859aa293f07a622782f38": 6,
|
|
166
168
|
"0x090185f2135308bad17527004364ebcc2d37e5f6": 18,
|
|
167
169
|
"0xCdF7028ceAB81fA0C6971208e83fa7872994beE5": 18,
|
|
170
|
+
"0xa693B19d2931d498c5B318dF961919BB4aee87a5": 6,
|
|
171
|
+
"0x03ab458634910aad20ef5f1c8ee96f1d6ac54919": 18,
|
|
168
172
|
// --- REWARD TOKENS ---
|
|
169
173
|
"0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2": 18,
|
|
170
174
|
"0x8762db106B2c2A0bccB3A80d1Ed41273552616E8": 18,
|
package/lib/curve.js
CHANGED
|
@@ -119,6 +119,7 @@ var Curve = /** @class */ (function () {
|
|
|
119
119
|
return __generator(this, function (_o) {
|
|
120
120
|
switch (_o.label) {
|
|
121
121
|
case 0:
|
|
122
|
+
this.contracts = {};
|
|
122
123
|
// JsonRpc provider
|
|
123
124
|
if (providerType.toLowerCase() === 'JsonRpc'.toLowerCase()) {
|
|
124
125
|
providerSettings = providerSettings;
|
package/lib/pools.js
CHANGED
|
@@ -2842,7 +2842,7 @@ var Pool = /** @class */ (function () {
|
|
|
2842
2842
|
switch (_a.label) {
|
|
2843
2843
|
case 0:
|
|
2844
2844
|
contract = curve_1.curve.contracts[this.swap].contract;
|
|
2845
|
-
if (!(["eurtusd", "xautusd", "crveth", "cvxeth", "spelleth", "teth"].includes(this.id) || this.isCryptoFactory)) return [3 /*break*/, 2];
|
|
2845
|
+
if (!(["eurtusd", "eursusd", "xautusd", "crveth", "cvxeth", "spelleth", "teth"].includes(this.id) || this.isCryptoFactory)) return [3 /*break*/, 2];
|
|
2846
2846
|
return [4 /*yield*/, contract.calc_token_amount(_amounts, curve_1.curve.constantOptions)];
|
|
2847
2847
|
case 1: return [2 /*return*/, _a.sent()];
|
|
2848
2848
|
case 2: return [4 /*yield*/, contract.calc_token_amount(_amounts, isDeposit, curve_1.curve.constantOptions)];
|
|
@@ -2863,7 +2863,7 @@ var Pool = /** @class */ (function () {
|
|
|
2863
2863
|
return [4 /*yield*/, contract.calc_token_amount(this.swap, _amounts, isDeposit, curve_1.curve.constantOptions)];
|
|
2864
2864
|
case 1: return [2 /*return*/, _a.sent()];
|
|
2865
2865
|
case 2:
|
|
2866
|
-
if (!["eurtusd", "xautusd"].includes(this.id)) return [3 /*break*/, 4];
|
|
2866
|
+
if (!["eurtusd", "eursusd", "xautusd"].includes(this.id)) return [3 /*break*/, 4];
|
|
2867
2867
|
return [4 /*yield*/, contract.calc_token_amount(_amounts, curve_1.curve.constantOptions)];
|
|
2868
2868
|
case 3: return [2 /*return*/, _a.sent()];
|
|
2869
2869
|
case 4: return [4 /*yield*/, contract.calc_token_amount(_amounts, isDeposit, curve_1.curve.constantOptions)];
|
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curvefi/api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.1",
|
|
4
4
|
"description": "JavaScript library for curve.fi",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
+
"author": "Macket",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"private": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/curvefi/curve-js.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/curvefi/curve-js/issues"
|
|
15
|
+
},
|
|
6
16
|
"scripts": {
|
|
7
17
|
"build": "rm -rf lib && tsc -p tsconfig.build.json"
|
|
8
18
|
},
|
|
9
|
-
"author": "Macket",
|
|
10
|
-
"license": "ISC",
|
|
11
19
|
"devDependencies": {
|
|
12
20
|
"@types/chai": "^4.2.18",
|
|
13
21
|
"@types/memoizee": "^0.4.7",
|
|
@@ -23,6 +31,7 @@
|
|
|
23
31
|
"vue-eslint-parser": "^7.6.0"
|
|
24
32
|
},
|
|
25
33
|
"dependencies": {
|
|
34
|
+
"@ethersproject/networks": "^5.5.0",
|
|
26
35
|
"axios": "^0.21.1",
|
|
27
36
|
"bignumber.js": "^9.0.1",
|
|
28
37
|
"ethcall": "^4.2.5",
|