@curvefi/api 1.9.1 → 1.13.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/lib/constants/abis/abis-ethereum.d.ts +1 -1
- package/lib/constants/abis/abis-ethereum.js +118 -3
- package/lib/constants/abis/abis-polygon.d.ts +4 -0
- package/lib/constants/abis/abis-polygon.js +146 -0
- package/lib/constants/abis/json/atricrypto3/swap.json +1269 -0
- package/lib/constants/abis/json/atricrypto3/zap.json +239 -0
- package/lib/constants/abis/json/crveth/swap.json +1258 -0
- package/lib/constants/abis/json/eurt/swap.json +845 -0
- package/lib/constants/abis/json/eurtusd/deposit.json +257 -0
- package/lib/constants/abis/json/eurtusd/swap.json +1199 -0
- package/lib/constants/abis/json/paave/rewards.json +657 -0
- package/lib/constants/abis/json/ren-polygon/swap.json +1112 -0
- package/lib/constants/aliases.d.ts +16 -0
- package/lib/constants/aliases.js +19 -0
- package/lib/constants/coins-ethereum.d.ts +31 -0
- package/lib/constants/{coins.js → coins-ethereum.js} +51 -15
- package/lib/constants/coins-polygon.d.ts +31 -0
- package/lib/constants/coins-polygon.js +74 -0
- package/lib/curve.d.ts +23 -7
- package/lib/curve.js +122 -91
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -0
- package/lib/interfaces.d.ts +2 -0
- package/lib/pools.d.ts +2 -0
- package/lib/pools.js +264 -114
- package/lib/utils.js +9 -12
- package/package.json +6 -5
- package/lib/constants/coins.d.ts +0 -25
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const ALIASES_ETHEREUM: {
|
|
2
|
+
crv: string;
|
|
3
|
+
voting_escrow: string;
|
|
4
|
+
gauge_controller: string;
|
|
5
|
+
address_provider: string;
|
|
6
|
+
router: string;
|
|
7
|
+
registry_exchange: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ALIASES_POLYGON: {
|
|
10
|
+
crv: string;
|
|
11
|
+
voting_escrow: string;
|
|
12
|
+
gauge_controller: string;
|
|
13
|
+
address_provider: string;
|
|
14
|
+
router: string;
|
|
15
|
+
registry_exchange: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
|
|
4
|
+
exports.ALIASES_ETHEREUM = {
|
|
5
|
+
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
6
|
+
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
7
|
+
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
8
|
+
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
9
|
+
"router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
|
|
10
|
+
"registry_exchange": "",
|
|
11
|
+
};
|
|
12
|
+
exports.ALIASES_POLYGON = {
|
|
13
|
+
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
14
|
+
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
15
|
+
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
16
|
+
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
17
|
+
"router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
|
|
18
|
+
"registry_exchange": "",
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const BTC_COINS_ETHEREUM: {
|
|
2
|
+
[index: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const BTC_COINS_LOWER_CASE_ETHEREUM: any;
|
|
5
|
+
export declare const ETH_COINS_ETHEREUM: {
|
|
6
|
+
[index: string]: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ETH_COINS_LOWER_CASE_ETHEREUM: any;
|
|
9
|
+
export declare const LINK_COINS_ETHEREUM: {
|
|
10
|
+
[index: string]: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const LINK_COINS_LOWER_CASE_ETHEREUM: any;
|
|
13
|
+
export declare const EUR_COINS_ETHEREUM: {
|
|
14
|
+
[index: string]: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const EUR_COINS_LOWER_CASE_ETHEREUM: any;
|
|
17
|
+
export declare const USD_COINS_ETHEREUM: {
|
|
18
|
+
[index: string]: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const USD_COINS_LOWER_CASE_ETHEREUM: any;
|
|
21
|
+
export declare const COINS_ETHEREUM: {
|
|
22
|
+
[index: string]: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const DECIMALS_ETHEREUM: {
|
|
25
|
+
[index: string]: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const DECIMALS_LOWER_CASE_ETHEREUM: any;
|
|
28
|
+
export declare const cTokensEthereum: string[];
|
|
29
|
+
export declare const yTokensEthereum: string[];
|
|
30
|
+
export declare const ycTokensEthereum: string[];
|
|
31
|
+
export declare const aTokensEthereum: string[];
|
|
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
14
|
+
exports.aTokensEthereum = exports.ycTokensEthereum = exports.yTokensEthereum = exports.cTokensEthereum = exports.DECIMALS_LOWER_CASE_ETHEREUM = exports.DECIMALS_ETHEREUM = exports.COINS_ETHEREUM = exports.USD_COINS_LOWER_CASE_ETHEREUM = exports.USD_COINS_ETHEREUM = exports.EUR_COINS_LOWER_CASE_ETHEREUM = exports.EUR_COINS_ETHEREUM = exports.LINK_COINS_LOWER_CASE_ETHEREUM = exports.LINK_COINS_ETHEREUM = exports.ETH_COINS_LOWER_CASE_ETHEREUM = exports.ETH_COINS_ETHEREUM = exports.BTC_COINS_LOWER_CASE_ETHEREUM = exports.BTC_COINS_ETHEREUM = void 0;
|
|
15
|
+
exports.BTC_COINS_ETHEREUM = {
|
|
16
16
|
sbtccrv: "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3",
|
|
17
17
|
hbtc: "0x0316EB71485b0Ab14103307bf65a021042c6d380",
|
|
18
18
|
renbtc: "0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D",
|
|
@@ -24,8 +24,8 @@ exports.BTC_COINS = {
|
|
|
24
24
|
sbtc: "0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6", // sBTC
|
|
25
25
|
};
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
27
|
+
exports.BTC_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.BTC_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
28
|
+
exports.ETH_COINS_ETHEREUM = {
|
|
29
29
|
steth: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
|
|
30
30
|
eth: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
|
31
31
|
ankreth: "0xE95A203B1a91a908F9B9CE46459d101078c2c3cb",
|
|
@@ -34,18 +34,21 @@ exports.ETH_COINS = {
|
|
|
34
34
|
weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
35
35
|
};
|
|
36
36
|
// @ts-ignore
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
37
|
+
exports.ETH_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.ETH_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
38
|
+
exports.LINK_COINS_ETHEREUM = {
|
|
39
39
|
link: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
|
40
40
|
slink: "0xbBC455cb4F1B9e4bFC4B73970d360c8f032EfEE6", // sLINK
|
|
41
41
|
};
|
|
42
42
|
// @ts-ignore
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
43
|
+
exports.LINK_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.LINK_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
44
|
+
exports.EUR_COINS_ETHEREUM = {
|
|
45
45
|
eurs: "0xdB25f211AB05b1c97D595516F45794528a807ad8",
|
|
46
|
-
seur: "0xD71eCFF9342A5Ced620049e616c5035F1dB98620",
|
|
46
|
+
seur: "0xD71eCFF9342A5Ced620049e616c5035F1dB98620",
|
|
47
|
+
eurt: "0xC581b735A1688071A1746c968e0798D642EDE491", // EURT
|
|
47
48
|
};
|
|
48
|
-
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
exports.EUR_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.EUR_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
51
|
+
exports.USD_COINS_ETHEREUM = {
|
|
49
52
|
ycdai: "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
|
|
50
53
|
ycusdc: "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
|
|
51
54
|
ycusdt: "0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59",
|
|
@@ -87,10 +90,13 @@ exports.USD_COINS = {
|
|
|
87
90
|
alusd: "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",
|
|
88
91
|
mim: "0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",
|
|
89
92
|
'3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
|
|
90
|
-
crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
93
|
+
crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
94
|
+
cvx: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b", // CVX
|
|
91
95
|
};
|
|
92
|
-
|
|
93
|
-
exports.
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
exports.USD_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.USD_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
98
|
+
exports.COINS_ETHEREUM = __assign(__assign(__assign(__assign(__assign(__assign({}, exports.BTC_COINS_ETHEREUM), exports.ETH_COINS_ETHEREUM), exports.LINK_COINS_ETHEREUM), exports.EUR_COINS_ETHEREUM), exports.USD_COINS_ETHEREUM), { snx: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f" });
|
|
99
|
+
exports.DECIMALS_ETHEREUM = {
|
|
94
100
|
"0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3": 18,
|
|
95
101
|
"0x0316EB71485b0Ab14103307bf65a021042c6d380": 18,
|
|
96
102
|
"0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc": 18,
|
|
@@ -112,6 +118,7 @@ exports.DECIMALS = {
|
|
|
112
118
|
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": 18,
|
|
113
119
|
"0xdB25f211AB05b1c97D595516F45794528a807ad8": 2,
|
|
114
120
|
"0xD71eCFF9342A5Ced620049e616c5035F1dB98620": 18,
|
|
121
|
+
"0xC581b735A1688071A1746c968e0798D642EDE491": 6,
|
|
115
122
|
"0x514910771AF9Ca656af840dff83E8264EcF986CA": 18,
|
|
116
123
|
"0xbBC455cb4F1B9e4bFC4B73970d360c8f032EfEE6": 18,
|
|
117
124
|
"0x028171bCA77440897B824Ca71D1c56caC55b68A3": 18,
|
|
@@ -152,7 +159,36 @@ exports.DECIMALS = {
|
|
|
152
159
|
"0xbc6da0fe9ad5f3b0d58160288917aa56653660e9": 18,
|
|
153
160
|
"0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3": 18,
|
|
154
161
|
"0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490": 18,
|
|
155
|
-
"0xD533a949740bb3306d119CC777fa900bA034cd52": 18,
|
|
162
|
+
"0xD533a949740bb3306d119CC777fa900bA034cd52": 18,
|
|
163
|
+
"0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b": 18, // CVX
|
|
156
164
|
};
|
|
157
165
|
// @ts-ignore
|
|
158
|
-
exports.
|
|
166
|
+
exports.DECIMALS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.DECIMALS_ETHEREUM).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
|
|
167
|
+
exports.cTokensEthereum = [
|
|
168
|
+
'0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
|
|
169
|
+
'0x39AA39c021dfbaE8faC545936693aC917d5E7563',
|
|
170
|
+
"0x8e595470ed749b85c6f7669de83eae304c2ec68f",
|
|
171
|
+
"0x48759f220ed983db51fa7a8c0d2aab8f3ce4166a",
|
|
172
|
+
"0x76eb2fe28b36b3ee97f3adae0c69606eedb2a37c", // cyUSDC
|
|
173
|
+
];
|
|
174
|
+
exports.yTokensEthereum = [
|
|
175
|
+
"0xC2cB1040220768554cf699b0d863A3cd4324ce32",
|
|
176
|
+
"0x26EA744E5B887E5205727f55dFBE8685e3b21951",
|
|
177
|
+
"0xE6354ed5bC4b393a5Aad09f21c46E101e692d447",
|
|
178
|
+
"0x16de59092dAE5CcF4A1E6439D611fd0653f0Bd01",
|
|
179
|
+
"0xd6aD7a6750A7593E092a9B218d66C0A814a3436e",
|
|
180
|
+
"0x83f798e925BcD4017Eb265844FDDAbb448f1707D",
|
|
181
|
+
"0x04bC0Ab673d88aE9dbC9DA2380cB6B79C4BCa9aE",
|
|
182
|
+
"0x73a052500105205d34Daf004eAb301916DA8190f", // yTUSD
|
|
183
|
+
];
|
|
184
|
+
exports.ycTokensEthereum = [
|
|
185
|
+
"0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
|
|
186
|
+
"0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
|
|
187
|
+
"0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59", // ycUSDT
|
|
188
|
+
];
|
|
189
|
+
exports.aTokensEthereum = [
|
|
190
|
+
"0x028171bCA77440897B824Ca71D1c56caC55b68A3",
|
|
191
|
+
"0xBcca60bB61934080951369a648Fb03DF4F96263C",
|
|
192
|
+
"0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
|
|
193
|
+
"0x6c5024cd4f8a59110119c56f8933403a539555eb", // sSUSD
|
|
194
|
+
];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const BTC_COINS_POLYGON: {
|
|
2
|
+
[index: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const BTC_COINS_LOWER_CASE_POLYGON: any;
|
|
5
|
+
export declare const ETH_COINS_POLYGON: {
|
|
6
|
+
[index: string]: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ETH_COINS_LOWER_CASE_POLYGON: any;
|
|
9
|
+
export declare const LINK_COINS_POLYGON: {
|
|
10
|
+
[index: string]: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const LINK_COINS_LOWER_CASE_POLYGON: any;
|
|
13
|
+
export declare const EUR_COINS_POLYGON: {
|
|
14
|
+
[index: string]: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const EUR_COINS_LOWER_CASE_POLYGON: any;
|
|
17
|
+
export declare const USD_COINS_POLYGON: {
|
|
18
|
+
[index: string]: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const USD_COINS_LOWER_CASE_POLYGON: any;
|
|
21
|
+
export declare const COINS_POLYGON: {
|
|
22
|
+
[index: string]: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const DECIMALS_POLYGON: {
|
|
25
|
+
[index: string]: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const DECIMALS_LOWER_CASE_POLYGON: any;
|
|
28
|
+
export declare const cTokensPolygon: never[];
|
|
29
|
+
export declare const yTokensPolygon: never[];
|
|
30
|
+
export declare const ycTokensPolygon: never[];
|
|
31
|
+
export declare const aTokensPolygon: string[];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.aTokensPolygon = exports.ycTokensPolygon = exports.yTokensPolygon = exports.cTokensPolygon = exports.DECIMALS_LOWER_CASE_POLYGON = exports.DECIMALS_POLYGON = exports.COINS_POLYGON = exports.USD_COINS_LOWER_CASE_POLYGON = exports.USD_COINS_POLYGON = exports.EUR_COINS_LOWER_CASE_POLYGON = exports.EUR_COINS_POLYGON = exports.LINK_COINS_LOWER_CASE_POLYGON = exports.LINK_COINS_POLYGON = exports.ETH_COINS_LOWER_CASE_POLYGON = exports.ETH_COINS_POLYGON = exports.BTC_COINS_LOWER_CASE_POLYGON = exports.BTC_COINS_POLYGON = void 0;
|
|
15
|
+
exports.BTC_COINS_POLYGON = {
|
|
16
|
+
wbtc: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
|
|
17
|
+
renbtc: "0xDBf31dF14B66535aF65AaC99C32e9eA844e14501",
|
|
18
|
+
amwbtc: "0x5c2ed810328349100A66B82b78a1791B101C9D61", // amWBTC
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
exports.BTC_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.BTC_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
22
|
+
exports.ETH_COINS_POLYGON = {
|
|
23
|
+
weth: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
|
|
24
|
+
amweth: "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", // amWETH
|
|
25
|
+
};
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
exports.ETH_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.ETH_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
28
|
+
exports.LINK_COINS_POLYGON = {};
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
exports.LINK_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.LINK_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
31
|
+
exports.EUR_COINS_POLYGON = {
|
|
32
|
+
eurt: "0x7BDF330f423Ea880FF95fC41A280fD5eCFD3D09f", // EURT
|
|
33
|
+
};
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
exports.EUR_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.EUR_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
36
|
+
exports.USD_COINS_POLYGON = {
|
|
37
|
+
dai: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
|
|
38
|
+
usdc: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
|
|
39
|
+
usdt: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
|
|
40
|
+
amdai: "0x27F8D03b3a2196956ED754baDc28D73be8830A6e",
|
|
41
|
+
amusdc: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F",
|
|
42
|
+
amusdt: "0x60D55F02A771d515e077c9C2403a1ef324885CeC",
|
|
43
|
+
am3crv: "0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171", // am3CRV
|
|
44
|
+
};
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
exports.USD_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.USD_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
47
|
+
exports.COINS_POLYGON = __assign(__assign(__assign(__assign(__assign({}, exports.BTC_COINS_POLYGON), exports.ETH_COINS_POLYGON), exports.LINK_COINS_POLYGON), exports.EUR_COINS_POLYGON), exports.USD_COINS_POLYGON);
|
|
48
|
+
exports.DECIMALS_POLYGON = {
|
|
49
|
+
"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063": 18,
|
|
50
|
+
"0x2791bca1f2de4661ed88a30c99a7a9449aa84174": 6,
|
|
51
|
+
"0xc2132d05d31c914a87c6611c10748aeb04b58e8f": 6,
|
|
52
|
+
"0x27F8D03b3a2196956ED754baDc28D73be8830A6e": 18,
|
|
53
|
+
"0x1a13F4Ca1d028320A707D99520AbFefca3998b7F": 6,
|
|
54
|
+
"0x60D55F02A771d515e077c9C2403a1ef324885CeC": 6,
|
|
55
|
+
"0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171": 18,
|
|
56
|
+
"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": 8,
|
|
57
|
+
"0xDBf31dF14B66535aF65AaC99C32e9eA844e14501": 8,
|
|
58
|
+
"0x5c2ed810328349100A66B82b78a1791B101C9D61": 8,
|
|
59
|
+
"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": 18,
|
|
60
|
+
"0x28424507fefb6f7f8E9D3860F56504E4e5f5f390": 18,
|
|
61
|
+
"0x7BDF330f423Ea880FF95fC41A280fD5eCFD3D09f": 6, // EURT
|
|
62
|
+
};
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
exports.DECIMALS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.DECIMALS_POLYGON).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
|
|
65
|
+
exports.cTokensPolygon = [];
|
|
66
|
+
exports.yTokensPolygon = [];
|
|
67
|
+
exports.ycTokensPolygon = [];
|
|
68
|
+
exports.aTokensPolygon = [
|
|
69
|
+
"0x27F8D03b3a2196956ED754baDc28D73be8830A6e",
|
|
70
|
+
"0x1a13F4Ca1d028320A707D99520AbFefca3998b7F",
|
|
71
|
+
"0x60D55F02A771d515e077c9C2403a1ef324885CeC",
|
|
72
|
+
"0x5c2ed810328349100A66B82b78a1791B101C9D61",
|
|
73
|
+
"0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", // amWETH
|
|
74
|
+
];
|
package/lib/curve.d.ts
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import { ethers, Contract } from "ethers";
|
|
2
2
|
import { Networkish } from "@ethersproject/networks";
|
|
3
|
-
import { Provider as MulticallProvider, Contract as MulticallContract } from '
|
|
4
|
-
|
|
3
|
+
import { Provider as MulticallProvider, Contract as MulticallContract } from 'ethcall';
|
|
4
|
+
import { PoolDataInterface, DictInterface } from "./interfaces";
|
|
5
|
+
export declare let POOLS_DATA: {
|
|
6
|
+
[index: string]: PoolDataInterface;
|
|
7
|
+
};
|
|
8
|
+
export declare let LP_TOKENS: string[];
|
|
9
|
+
export declare let GAUGES: string[];
|
|
10
|
+
export declare let BTC_COINS: DictInterface<string>;
|
|
11
|
+
export declare let BTC_COINS_LOWER_CASE: DictInterface<string>;
|
|
12
|
+
export declare let ETH_COINS: DictInterface<string>;
|
|
13
|
+
export declare let ETH_COINS_LOWER_CASE: DictInterface<string>;
|
|
14
|
+
export declare let LINK_COINS: DictInterface<string>;
|
|
15
|
+
export declare let LINK_COINS_LOWER_CASE: DictInterface<string>;
|
|
16
|
+
export declare let EUR_COINS: DictInterface<string>;
|
|
17
|
+
export declare let EUR_COINS_LOWER_CASE: DictInterface<string>;
|
|
18
|
+
export declare let USD_COINS: DictInterface<string>;
|
|
19
|
+
export declare let USD_COINS_LOWER_CASE: DictInterface<string>;
|
|
20
|
+
export declare let COINS: DictInterface<string>;
|
|
21
|
+
export declare let DECIMALS: DictInterface<number>;
|
|
22
|
+
export declare let DECIMALS_LOWER_CASE: DictInterface<number>;
|
|
23
|
+
export declare let ALIASES: {
|
|
5
24
|
crv: string;
|
|
6
|
-
pool_proxy: string;
|
|
7
|
-
gauge_proxy: string;
|
|
8
25
|
voting_escrow: string;
|
|
9
26
|
gauge_controller: string;
|
|
10
|
-
minter: string;
|
|
11
|
-
fee_distributor: string;
|
|
12
27
|
address_provider: string;
|
|
13
28
|
router: string;
|
|
14
29
|
registry_exchange: string;
|
|
@@ -18,6 +33,7 @@ declare class Curve {
|
|
|
18
33
|
multicallProvider: MulticallProvider;
|
|
19
34
|
signer: ethers.Signer;
|
|
20
35
|
signerAddress: string;
|
|
36
|
+
chainId: number;
|
|
21
37
|
contracts: {
|
|
22
38
|
[index: string]: {
|
|
23
39
|
contract: Contract;
|
|
@@ -38,7 +54,7 @@ declare class Curve {
|
|
|
38
54
|
maxPriorityFeePerGas?: number | ethers.BigNumber;
|
|
39
55
|
};
|
|
40
56
|
constructor();
|
|
41
|
-
init(providerType: 'JsonRpc' | 'Web3' | 'Infura', providerSettings: {
|
|
57
|
+
init(providerType: 'JsonRpc' | 'Web3' | 'Infura' | 'Alchemy', providerSettings: {
|
|
42
58
|
url?: string;
|
|
43
59
|
privateKey?: string;
|
|
44
60
|
} | {
|