diff --git a/src/components/swap/GasReimbursement.vue b/src/components/swap/GasReimbursement.vue index 707597e..8f571ba 100644 --- a/src/components/swap/GasReimbursement.vue +++ b/src/components/swap/GasReimbursement.vue @@ -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: { diff --git a/src/config/bsc.tokenlist.json b/src/config/bsc.tokenlist.json new file mode 100644 index 0000000..7e1485d --- /dev/null +++ b/src/config/bsc.tokenlist.json @@ -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" + } + ] + } \ No newline at end of file diff --git a/src/config/bscmainet.json b/src/config/bscmainet.json new file mode 100644 index 0000000..3741d25 --- /dev/null +++ b/src/config/bscmainet.json @@ -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/" + } + } + } +} diff --git a/src/config/elegible.bcs.json b/src/config/elegible.bcs.json new file mode 100644 index 0000000..b4f01b9 --- /dev/null +++ b/src/config/elegible.bcs.json @@ -0,0 +1,9 @@ +{ + "bsc": { + "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c": "uncapped", + "0x55d398326f99059fF775485246999027B3197955": "uncapped", + "0x2170Ed0880ac9A755fd29B2688956BD959F933F8": "uncapped", + "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56": "uncapped", + "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3": "uncapped" + } +} \ No newline at end of file diff --git a/src/utils/list.ts b/src/utils/list.ts index 4395aa9..5e97df4 100644 --- a/src/utils/list.ts +++ b/src/utils/list.ts @@ -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'; @@ -34,7 +36,8 @@ export const listMetadata: Record = { export async function getTokenlist(id: string): Promise { 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);