Skip to content

Commit

Permalink
Merge pull request #318 from curvefi/upd3
Browse files Browse the repository at this point in the history
Updates batch
  • Loading branch information
philippe-git authored Oct 16, 2023
2 parents 11a5258 + 5290ae0 commit 6f2adcd
Show file tree
Hide file tree
Showing 69 changed files with 24,965 additions and 1,311 deletions.
61 changes: 48 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,64 @@
},
"extends": "airbnb",
"parser": "@babel/eslint-parser",
"requireconfigfile": false,
"plugins": [
"@babel"
],
"rules": {
"func-names": 0,
"no-nested-ternary": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
],
"max-len": 0,
"arrow-parens": ["error", "always"],
"arrow-parens": [
"error",
"always"
],
"no-underscore-dangle": 0,
"operator-linebreak": 0,
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}],
"no-use-before-define": ["error", "nofunc"],
"no-empty": ["error", { "allowEmptyCatch": true }],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"no-use-before-define": [
"error",
"nofunc"
],
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"react/forbid-prop-types": 0,
"no-mixed-operators": ["error", { "allowSamePrecedence": true }],
"indent": ["error", 2, { "flatTernaryExpressions": true, "SwitchCase": 1 }]
"no-mixed-operators": [
"error",
{
"allowSamePrecedence": true
}
],
"indent": [
"error",
2,
{
"flatTernaryExpressions": false,
"SwitchCase": 1
}
]
},
"settings": {
"import/resolver": {
Expand Down
16 changes: 16 additions & 0 deletions constants/AppConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@ const BASE_API_DOMAIN = IS_DEV ? 'http://localhost:3000' : 'https://api.curve.fi
const REWARD_TOKENS_REPLACE_MAP = {
};

/**
* Flip to true to force using fallback data for thegraph (fallback data ideally
* needs to be updated ahead of time if issues are predictable, e.g. planned maintenance).
* Fallback data will already be used automatically if any thegraph request is failing,
* so using that flip shouldn't be necessary at all.
*/
const USE_FALLBACK_THEGRAPH_DATA = false;

// Flip to true in order to easily populate thegraph fallback data: each
// place that's querying thegraph will dump its output, prefixed with
// "FALLBACK_THEGRAPH_DATA_POPULATE_MODE" and the filename where to store
// this data, in order to update that filename easily.
const FALLBACK_THEGRAPH_DATA_POPULATE_MODE = false;

module.exports = {
IS_DEV,
REWARD_TOKENS_REPLACE_MAP,
BASE_API_DOMAIN,
USE_FALLBACK_THEGRAPH_DATA,
FALLBACK_THEGRAPH_DATA_POPULATE_MODE,
};
13 changes: 13 additions & 0 deletions constants/CoinAddressCoingeckoIdMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default {
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 'ethereum', // Native ETH
'0xda10009cbd5d07dd0cecc66161fc93d7c9000da1': 'dai',
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8': 'usd-coin',
'0xaf88d065e77c8cC2239327C5EDb3A432268e5831': 'usd-coin',
'0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9': 'tether',
'0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee': 'dai',
'0x625e7708f30ca75bfd92586e17077590c60eb4cd': 'usd-coin',
Expand Down Expand Up @@ -130,6 +131,10 @@ export default {
'0x049d68029688eabf473097a2fc38ef61633a3c7a': 'tether', // fUSDT
'0x1e4f97b9f9f913c46f1632781732927b9019c68b': 'curve-dao-token', // CRV
'0xC931f61B1534EB21D8c11B24f3f5Ab2471d4aB50': 'binance-usd', // BUSD
'0x0ac7e2f9f78de2ccc467139d43b6f32473454dd9': 'tether', // sUSDT_BSC, base price for price inferences on eywa facto pools
'0xE35177E61d09bFDb61Ea29db92d19B5E05EdDa8f': 'usd-coin', // sUSDC_BSC, base price for price inferences on eywa facto pools
'0x88486E058865611c939D1077725F293378E7bD75': 'dai', // sDAI_BSC, base price for price inferences on eywa facto pools
'0xC4417bE9c9b3f682fd03224A4B29e01CE34602fE': 'true-usd', // sTUSD_BSC, base price for price inferences on eywa facto pools
},
optimism: {
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 'ethereum', // Native ETH
Expand Down Expand Up @@ -175,4 +180,12 @@ export default {
'0x88eeC49252c8cbc039DCdB394c0c2BA2f1637EA0': 'tether',
'0xC16B81Af351BA9e64C1a069E3Ab18c244A1E3049': 'ageur',
},
base: {
'0x4200000000000000000000000000000000000006': 'ethereum',
'0xeb466342c4d449bc9f53a865d5cb90586f405215': 'axlusdc',
'0x50c5725949a6f0c72e6c4a641f24049a917db0cb': 'dai',
'0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93': 'crvusd',
'0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b': 'tbtc',
'0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca': 'bridged-usd-coin-base',
},
};
3 changes: 2 additions & 1 deletion constants/Web3.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const DECIMALS_WEI = 1e18;
const DECIMALS_GWEI = 1e9;
const MAX_UINT256 = BN(2).pow(256).minus(1);

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

const RPC_URL_BSC = 'https://bsc-dataseed.binance.org/';
Expand Down
Loading

0 comments on commit 6f2adcd

Please sign in to comment.