Skip to content

Commit 6f2adcd

Browse files
authored
Merge pull request #318 from curvefi/upd3
Updates batch
2 parents 11a5258 + 5290ae0 commit 6f2adcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+24965
-1311
lines changed

.eslintrc.json

+48-13
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,64 @@
44
},
55
"extends": "airbnb",
66
"parser": "@babel/eslint-parser",
7+
"requireconfigfile": false,
78
"plugins": [
89
"@babel"
910
],
1011
"rules": {
1112
"func-names": 0,
1213
"no-nested-ternary": 0,
13-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
14+
"react/jsx-filename-extension": [
15+
1,
16+
{
17+
"extensions": [
18+
".js",
19+
".jsx"
20+
]
21+
}
22+
],
1423
"max-len": 0,
15-
"arrow-parens": ["error", "always"],
24+
"arrow-parens": [
25+
"error",
26+
"always"
27+
],
1628
"no-underscore-dangle": 0,
1729
"operator-linebreak": 0,
18-
"comma-dangle": ["error", {
19-
"arrays": "always-multiline",
20-
"objects": "always-multiline",
21-
"imports": "always-multiline",
22-
"exports": "always-multiline",
23-
"functions": "never"
24-
}],
25-
"no-use-before-define": ["error", "nofunc"],
26-
"no-empty": ["error", { "allowEmptyCatch": true }],
30+
"comma-dangle": [
31+
"error",
32+
{
33+
"arrays": "always-multiline",
34+
"objects": "always-multiline",
35+
"imports": "always-multiline",
36+
"exports": "always-multiline",
37+
"functions": "never"
38+
}
39+
],
40+
"no-use-before-define": [
41+
"error",
42+
"nofunc"
43+
],
44+
"no-empty": [
45+
"error",
46+
{
47+
"allowEmptyCatch": true
48+
}
49+
],
2750
"react/forbid-prop-types": 0,
28-
"no-mixed-operators": ["error", { "allowSamePrecedence": true }],
29-
"indent": ["error", 2, { "flatTernaryExpressions": true, "SwitchCase": 1 }]
51+
"no-mixed-operators": [
52+
"error",
53+
{
54+
"allowSamePrecedence": true
55+
}
56+
],
57+
"indent": [
58+
"error",
59+
2,
60+
{
61+
"flatTernaryExpressions": false,
62+
"SwitchCase": 1
63+
}
64+
]
3065
},
3166
"settings": {
3267
"import/resolver": {

constants/AppConstants.js

+16
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,24 @@ const BASE_API_DOMAIN = IS_DEV ? 'http://localhost:3000' : 'https://api.curve.fi
55
const REWARD_TOKENS_REPLACE_MAP = {
66
};
77

8+
/**
9+
* Flip to true to force using fallback data for thegraph (fallback data ideally
10+
* needs to be updated ahead of time if issues are predictable, e.g. planned maintenance).
11+
* Fallback data will already be used automatically if any thegraph request is failing,
12+
* so using that flip shouldn't be necessary at all.
13+
*/
14+
const USE_FALLBACK_THEGRAPH_DATA = false;
15+
16+
// Flip to true in order to easily populate thegraph fallback data: each
17+
// place that's querying thegraph will dump its output, prefixed with
18+
// "FALLBACK_THEGRAPH_DATA_POPULATE_MODE" and the filename where to store
19+
// this data, in order to update that filename easily.
20+
const FALLBACK_THEGRAPH_DATA_POPULATE_MODE = false;
21+
822
module.exports = {
923
IS_DEV,
1024
REWARD_TOKENS_REPLACE_MAP,
1125
BASE_API_DOMAIN,
26+
USE_FALLBACK_THEGRAPH_DATA,
27+
FALLBACK_THEGRAPH_DATA_POPULATE_MODE,
1228
};

constants/CoinAddressCoingeckoIdMap.js

+13
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default {
7979
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 'ethereum', // Native ETH
8080
'0xda10009cbd5d07dd0cecc66161fc93d7c9000da1': 'dai',
8181
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8': 'usd-coin',
82+
'0xaf88d065e77c8cC2239327C5EDb3A432268e5831': 'usd-coin',
8283
'0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9': 'tether',
8384
'0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee': 'dai',
8485
'0x625e7708f30ca75bfd92586e17077590c60eb4cd': 'usd-coin',
@@ -130,6 +131,10 @@ export default {
130131
'0x049d68029688eabf473097a2fc38ef61633a3c7a': 'tether', // fUSDT
131132
'0x1e4f97b9f9f913c46f1632781732927b9019c68b': 'curve-dao-token', // CRV
132133
'0xC931f61B1534EB21D8c11B24f3f5Ab2471d4aB50': 'binance-usd', // BUSD
134+
'0x0ac7e2f9f78de2ccc467139d43b6f32473454dd9': 'tether', // sUSDT_BSC, base price for price inferences on eywa facto pools
135+
'0xE35177E61d09bFDb61Ea29db92d19B5E05EdDa8f': 'usd-coin', // sUSDC_BSC, base price for price inferences on eywa facto pools
136+
'0x88486E058865611c939D1077725F293378E7bD75': 'dai', // sDAI_BSC, base price for price inferences on eywa facto pools
137+
'0xC4417bE9c9b3f682fd03224A4B29e01CE34602fE': 'true-usd', // sTUSD_BSC, base price for price inferences on eywa facto pools
133138
},
134139
optimism: {
135140
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 'ethereum', // Native ETH
@@ -175,4 +180,12 @@ export default {
175180
'0x88eeC49252c8cbc039DCdB394c0c2BA2f1637EA0': 'tether',
176181
'0xC16B81Af351BA9e64C1a069E3Ab18c244A1E3049': 'ageur',
177182
},
183+
base: {
184+
'0x4200000000000000000000000000000000000006': 'ethereum',
185+
'0xeb466342c4d449bc9f53a865d5cb90586f405215': 'axlusdc',
186+
'0x50c5725949a6f0c72e6c4a641f24049a917db0cb': 'dai',
187+
'0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93': 'crvusd',
188+
'0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b': 'tbtc',
189+
'0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca': 'bridged-usd-coin-base',
190+
},
178191
};

constants/Web3.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ const DECIMALS_WEI = 1e18;
55
const DECIMALS_GWEI = 1e9;
66
const MAX_UINT256 = BN(2).pow(256).minus(1);
77

8+
const RPC_URL = `https://lb.drpc.org/ogrpc?network=ethereum&dkey=${process.env.DRPC_API_KEY}`;
89
// const RPC_URL = `https://eth.llamarpc.com/rpc/${process.env.LLAMANODES_API_KEY}`;
9-
const RPC_URL = `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_ETHEREUM}`;
10+
// const RPC_URL = `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_ETHEREUM}`;
1011
const RPC_BACKUP_URL = `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_ETHEREUM}`;
1112

1213
const RPC_URL_BSC = 'https://bsc-dataseed.binance.org/';

0 commit comments

Comments
 (0)