Skip to content

Commit

Permalink
mainet token list
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-foster-wallace committed Jul 28, 2021
1 parent aac082f commit 49ae71a
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/swap/GasReimbursement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ import BigNumber from 'bignumber.js';
import org_eligibleAssetList from '@balancer-labs/assets/lists/eligible.json';
import elegibleBSCTestnet from '@/config/elegible.bcstestnet.json';
const eligibleAssetList={ ...elegibleBSCTestnet, ...org_eligibleAssetList };
import elegibleBSC from '@/config/elegible.bcs.json';
const added_elegibles = process.env.APP_CHAIN_ID == "56"?elegibleBSC:elegibleBSCTestnet;
const eligibleAssetList={ ...added_elegibles, ...org_eligibleAssetList };
export default defineComponent({
props: {
Expand Down
45 changes: 45 additions & 0 deletions src/config/bsc.tokenlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "Balancer",
"tokens":[
{
"address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"chainId": 97,
"name": "WBNB",
"symbol": "WBNB",
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/smartchain/assets/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c/logo.png"
},
{
"address": "0x55d398326f99059fF775485246999027B3197955",
"chainId": 97,
"name": "USDT",
"symbol": "USDT",
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/smartchain/assets/0x55d398326f99059fF775485246999027B3197955/logo.png"
},
{
"address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
"chainId": 97,
"name": "ETH",
"symbol": "ETH",
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/smartchain/assets/0x2170Ed0880ac9A755fd29B2688956BD959F933F8/logo.png"
},
{
"address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
"chainId": 97,
"name": "BUSD",
"symbol": "BUSD",
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/smartchain/assets/0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56/logo.png"
},
{
"address": "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",
"chainId": 97,
"name": "DAI",
"symbol": "DAI",
"decimals": 18,
"logoURI": "https://assets.coingecko.com/coins/images/9956/thumb/dai-multi-collateral-mcd.png?1574218774"
}
]
}
27 changes: 27 additions & 0 deletions src/config/bscmainet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"network": "bsc",
"chainId": 56,
"precision": 2,
"rpcUrl": "https://bsc-dataseed.binance.org/",
"subgraphUrl": "https://api.thegraph.com/subgraphs/name/aaron-foster-wallace/balancer-on-bsc-chapel-a1",
"subgraphBackupUrl": "https://api.thegraph.com/subgraphs/name/aaron-foster-wallace/balancer-on-bsc-chapel-a1",
"addresses": {
"bFactory": "0x1146a66b9f26069e5c8ad88679de6d0a1611c27b",
"bActions": "0x372d3737ef5b78602ac6c25b6592916ebeb0ccef",
"dsProxyRegistry": "0xd755208726d3c886266218f3ef39002bb4f08ba5",
"exchangeProxy": "0x4cf3217b505d63492cd33BEE77F6061836B776b9",
"weth": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"multicall": "0x41263cba59eb80dc200f3e2544eda4ed6a90e76c"
},
"connectors": {
"injected": {
"id": "injected",
"name": "MetaMask"
},
"walletconnect": {
"rpc": {
"97": "https://bsc-dataseed.binance.org/"
}
}
}
}
9 changes: 9 additions & 0 deletions src/config/elegible.bcs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"bsc": {
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c": "uncapped",
"0x55d398326f99059fF775485246999027B3197955": "uncapped",
"0x2170Ed0880ac9A755fd29B2688956BD959F933F8": "uncapped",
"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56": "uncapped",
"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3": "uncapped"
}
}
5 changes: 4 additions & 1 deletion src/utils/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import tokenlist from '@balancer-labs/assets/generated/listed.tokenlist.json';
import config, { AssetMetadata } from '@/config';

import BCSTestnetTokenList from '@/config/bsctestnet.tokenlist.json';
import BCSTokenList from '@/config/bsc.tokenlist.json';


const ETH_LOGO = 'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png';

Expand Down Expand Up @@ -34,7 +36,8 @@ export const listMetadata: Record<string, string> = {

export async function getTokenlist(id: string): Promise<TokenList> {
if (id === DEFAULT_LIST) {
return BCSTestnetTokenList;
if(process.env.APP_CHAIN_ID == "97") return BCSTestnetTokenList;
if (process.env.APP_CHAIN_ID == "56") return BCSTokenList;
}
const listUrl = listMetadata[id];
const response = await fetch(listUrl);
Expand Down

0 comments on commit 49ae71a

Please sign in to comment.