Skip to content

Instantly share code, notes, and snippets.

@apinanyogaratnam
Last active May 3, 2022 08:53
Show Gist options
  • Save apinanyogaratnam/b5a13501d51c54792998fda455c5fecf to your computer and use it in GitHub Desktop.
Save apinanyogaratnam/b5a13501d51c54792998fda455c5fecf to your computer and use it in GitHub Desktop.
All RCP connections for working with the MetaMask API
const networks = {
polygon: {
chainId: `0x${Number(137).toString(16)}`,
chainName: "Polygon Mainnet",
nativeCurrency: {
name: "MATIC",
symbol: "MATIC",
decimals: 18
},
rpcUrls: ["https://polygon-rpc.com/"],
blockExplorerUrls: ["https://polygonscan.com/"]
},
bsc: {
chainId: `0x${Number(56).toString(16)}`,
chainName: "Binance Smart Chain Mainnet",
nativeCurrency: {
name: "Binance Chain Native Token",
symbol: "BNB",
decimals: 18
},
rpcUrls: [
"https://bsc-dataseed1.binance.org",
"https://bsc-dataseed2.binance.org",
"https://bsc-dataseed3.binance.org",
"https://bsc-dataseed4.binance.org",
"https://bsc-dataseed1.defibit.io",
"https://bsc-dataseed2.defibit.io",
"https://bsc-dataseed3.defibit.io",
"https://bsc-dataseed4.defibit.io",
"https://bsc-dataseed1.ninicoin.io",
"https://bsc-dataseed2.ninicoin.io",
"https://bsc-dataseed3.ninicoin.io",
"https://bsc-dataseed4.ninicoin.io",
"wss://bsc-ws-node.nariox.org"
],
blockExplorerUrls: ["https://bscscan.com"]
},
rinkeby: {
chainId: `0x${Number(4).toString(16)}`,
chainName: 'Rinkeby Test Network',
nativeCurrency: {
name: 'Rinkeby Ether',
symbol: 'ETH',
decimals: 18
},
rpcUrls: ['https://rinkeby-light.eth.linkpool.io/'],
blockExplorerUrls: ['https://rinkeby.etherscan.io/']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment