@curvefi/api 1.8.3 → 1.11.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 +0 -6
- package/lib/boosting.js +2 -2
- package/lib/constants/abis/abis-ethereum.d.ts +1 -1
- package/lib/constants/abis/abis-ethereum.js +97 -5
- 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/{registry.json → eurt/swap.json} +402 -497
- 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/registry_exchange.json +0 -37
- package/lib/constants/abis/json/ren-polygon/swap.json +1112 -0
- package/lib/constants/abis/json/tricrypto2/deposit.json +0 -79
- 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} +47 -13
- package/lib/constants/coins-polygon.d.ts +31 -0
- package/lib/constants/coins-polygon.js +74 -0
- package/lib/curve.d.ts +23 -6
- package/lib/curve.js +137 -80
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/interfaces.d.ts +2 -0
- package/lib/pools.d.ts +2 -11
- package/lib/pools.js +584 -440
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +34 -15
- package/package.json +6 -5
- package/lib/constants/coins.d.ts +0 -25
|
@@ -35,52 +35,6 @@
|
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
-
{
|
|
39
|
-
"stateMutability": "payable",
|
|
40
|
-
"type": "function",
|
|
41
|
-
"name": "add_liquidity",
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"name": "_amounts",
|
|
45
|
-
"type": "uint256[3]"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "_min_mint_amount",
|
|
49
|
-
"type": "uint256"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"name": "_receiver",
|
|
53
|
-
"type": "address"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"outputs": [
|
|
57
|
-
{
|
|
58
|
-
"name": "",
|
|
59
|
-
"type": "uint256"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"stateMutability": "nonpayable",
|
|
65
|
-
"type": "function",
|
|
66
|
-
"name": "remove_liquidity",
|
|
67
|
-
"inputs": [
|
|
68
|
-
{
|
|
69
|
-
"name": "_amount",
|
|
70
|
-
"type": "uint256"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "_min_amounts",
|
|
74
|
-
"type": "uint256[3]"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"outputs": [
|
|
78
|
-
{
|
|
79
|
-
"name": "",
|
|
80
|
-
"type": "uint256[3]"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
38
|
{
|
|
85
39
|
"stateMutability": "nonpayable",
|
|
86
40
|
"type": "function",
|
|
@@ -93,10 +47,6 @@
|
|
|
93
47
|
{
|
|
94
48
|
"name": "_min_amounts",
|
|
95
49
|
"type": "uint256[3]"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"name": "_receiver",
|
|
99
|
-
"type": "address"
|
|
100
50
|
}
|
|
101
51
|
],
|
|
102
52
|
"outputs": [
|
|
@@ -131,35 +81,6 @@
|
|
|
131
81
|
}
|
|
132
82
|
]
|
|
133
83
|
},
|
|
134
|
-
{
|
|
135
|
-
"stateMutability": "nonpayable",
|
|
136
|
-
"type": "function",
|
|
137
|
-
"name": "remove_liquidity_one_coin",
|
|
138
|
-
"inputs": [
|
|
139
|
-
{
|
|
140
|
-
"name": "_token_amount",
|
|
141
|
-
"type": "uint256"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"name": "i",
|
|
145
|
-
"type": "uint256"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "_min_amount",
|
|
149
|
-
"type": "uint256"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"name": "_receiver",
|
|
153
|
-
"type": "address"
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"outputs": [
|
|
157
|
-
{
|
|
158
|
-
"name": "",
|
|
159
|
-
"type": "uint256"
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
},
|
|
163
84
|
{
|
|
164
85
|
"stateMutability": "view",
|
|
165
86
|
"type": "function",
|
|
@@ -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",
|
|
@@ -89,8 +92,10 @@ exports.USD_COINS = {
|
|
|
89
92
|
'3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
|
|
90
93
|
crv: "0xD533a949740bb3306d119CC777fa900bA034cd52", // CRV
|
|
91
94
|
};
|
|
92
|
-
|
|
93
|
-
exports.
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
exports.USD_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.USD_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
|
|
97
|
+
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" });
|
|
98
|
+
exports.DECIMALS_ETHEREUM = {
|
|
94
99
|
"0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3": 18,
|
|
95
100
|
"0x0316EB71485b0Ab14103307bf65a021042c6d380": 18,
|
|
96
101
|
"0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc": 18,
|
|
@@ -112,6 +117,7 @@ exports.DECIMALS = {
|
|
|
112
117
|
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": 18,
|
|
113
118
|
"0xdB25f211AB05b1c97D595516F45794528a807ad8": 2,
|
|
114
119
|
"0xD71eCFF9342A5Ced620049e616c5035F1dB98620": 18,
|
|
120
|
+
"0xC581b735A1688071A1746c968e0798D642EDE491": 6,
|
|
115
121
|
"0x514910771AF9Ca656af840dff83E8264EcF986CA": 18,
|
|
116
122
|
"0xbBC455cb4F1B9e4bFC4B73970d360c8f032EfEE6": 18,
|
|
117
123
|
"0x028171bCA77440897B824Ca71D1c56caC55b68A3": 18,
|
|
@@ -155,4 +161,32 @@ exports.DECIMALS = {
|
|
|
155
161
|
"0xD533a949740bb3306d119CC777fa900bA034cd52": 18, // CRV
|
|
156
162
|
};
|
|
157
163
|
// @ts-ignore
|
|
158
|
-
exports.
|
|
164
|
+
exports.DECIMALS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.DECIMALS_ETHEREUM).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
|
|
165
|
+
exports.cTokensEthereum = [
|
|
166
|
+
'0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
|
|
167
|
+
'0x39AA39c021dfbaE8faC545936693aC917d5E7563',
|
|
168
|
+
"0x8e595470ed749b85c6f7669de83eae304c2ec68f",
|
|
169
|
+
"0x48759f220ed983db51fa7a8c0d2aab8f3ce4166a",
|
|
170
|
+
"0x76eb2fe28b36b3ee97f3adae0c69606eedb2a37c", // cyUSDC
|
|
171
|
+
];
|
|
172
|
+
exports.yTokensEthereum = [
|
|
173
|
+
"0xC2cB1040220768554cf699b0d863A3cd4324ce32",
|
|
174
|
+
"0x26EA744E5B887E5205727f55dFBE8685e3b21951",
|
|
175
|
+
"0xE6354ed5bC4b393a5Aad09f21c46E101e692d447",
|
|
176
|
+
"0x16de59092dAE5CcF4A1E6439D611fd0653f0Bd01",
|
|
177
|
+
"0xd6aD7a6750A7593E092a9B218d66C0A814a3436e",
|
|
178
|
+
"0x83f798e925BcD4017Eb265844FDDAbb448f1707D",
|
|
179
|
+
"0x04bC0Ab673d88aE9dbC9DA2380cB6B79C4BCa9aE",
|
|
180
|
+
"0x73a052500105205d34Daf004eAb301916DA8190f", // yTUSD
|
|
181
|
+
];
|
|
182
|
+
exports.ycTokensEthereum = [
|
|
183
|
+
"0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
|
|
184
|
+
"0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
|
|
185
|
+
"0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59", // ycUSDT
|
|
186
|
+
];
|
|
187
|
+
exports.aTokensEthereum = [
|
|
188
|
+
"0x028171bCA77440897B824Ca71D1c56caC55b68A3",
|
|
189
|
+
"0xBcca60bB61934080951369a648Fb03DF4F96263C",
|
|
190
|
+
"0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
|
|
191
|
+
"0x6c5024cd4f8a59110119c56f8933403a539555eb", // sSUSD
|
|
192
|
+
];
|
|
@@ -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,22 +1,39 @@
|
|
|
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;
|
|
29
|
+
registry_exchange: string;
|
|
14
30
|
};
|
|
15
31
|
declare class Curve {
|
|
16
32
|
provider: ethers.providers.Web3Provider | ethers.providers.JsonRpcProvider;
|
|
17
33
|
multicallProvider: MulticallProvider;
|
|
18
34
|
signer: ethers.Signer;
|
|
19
35
|
signerAddress: string;
|
|
36
|
+
chainId: number;
|
|
20
37
|
contracts: {
|
|
21
38
|
[index: string]: {
|
|
22
39
|
contract: Contract;
|