Skip to content

Commit

Permalink
update address tools
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Sep 29, 2023
1 parent 59ad552 commit 550f50f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/addresses-tools/src/addresses.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const getScanVariable = ({ customNetworkName }: { customNetworkName?: str
athens: "",
"bitcoin-test": "",
"bsc-localnet": "",
"bsc-mainnet": process.env.BSCSCAN_API_KEY || "",
"bsc-testnet": process.env.BSCSCAN_API_KEY || "",
"eth-localnet": "",
"eth-mainnet": process.env.ETHERSCAN_API_KEY || "",
Expand All @@ -67,6 +68,7 @@ export const getExplorerUrl = ({ customNetworkName }: { customNetworkName?: stri
athens: "",
"bitcoin-test": "",
"bsc-localnet": "",
"bsc-mainnet": "https://bscscan.com/",
"bsc-testnet": "https://testnet.bscscan.com/",
"eth-localnet": "",
"eth-mainnet": "https://etherscan.io/",
Expand All @@ -86,6 +88,7 @@ export const getGasSymbolByNetwork = (networkName: NetworkName): string => {
athens: "ZETA",
"bitcoin-test": "BTC",
"bsc-localnet": "BNB",
"bsc-mainnet": "BNB",
"bsc-testnet": "BNB",
"eth-localnet": "ETH",
"eth-mainnet": "ETH",
Expand Down
6 changes: 6 additions & 0 deletions packages/addresses-tools/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export const getHardhatConfigNetworks = (PRIVATE_KEYS: string[]): NetworksUserCo
gasPrice: 80000000000,
url: "http://localhost:8120",
},
"bsc-mainnet": {
accounts: PRIVATE_KEYS,
gas: 5000000,
gasPrice: 80000000000,
url: `https://rpc.ankr.com/bsc`,
},
"bsc-testnet": {
accounts: PRIVATE_KEYS,
gas: 5000000,
Expand Down
23 changes: 23 additions & 0 deletions packages/addresses/src/addresses.mainnet.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
{
"bsc-mainnet": {
"connector": "",
"crossChainCounter": "",
"crossChainNft": "",
"dai": "",
"multiChainValue": "",
"tss": "",
"tssUpdater": "",
"uniswapV2Router02": "",
"uniswapV3PoolFactory": "",
"uniswapV3Quoter": "",
"uniswapV3Router": "",
"usdc": "",
"weth9": "",
"zetaSwapBtcInbound": "",
"zetaToken": "",
"zetaTokenConsumerUniV2": "",
"immutableCreate2Factory": "",
"multiChainSwapZetaConnector": "",
"multiChainSwap": "",
"uniswapV2Factory": "",
"zetaSwap": ""
},
"eth-mainnet": {
"connector": "",
"crossChainCounter": "",
Expand Down
8 changes: 7 additions & 1 deletion packages/example-contracts/lib/shared/network.constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NetworkName } from "@zetachain/addresses";

type ChainId = 0 | 5 | 97 | 1001 | 1337 | 80001;
type ChainId = 0 | 5 | 56 | 97 | 1001 | 1337 | 80001;

export type NetworkVariables = {
chainId: ChainId;
Expand Down Expand Up @@ -28,6 +28,12 @@ export const networkVariables: Record<NetworkName, NetworkVariables> = {
crossChainId: 0,
crossChainName: ""
},
"bsc-mainnet": {
chainId: 56,
connectorAddress: "",
crossChainId: 5,
crossChainName: "eth-mainnet"
},
"bsc-testnet": {
chainId: 97,
connectorAddress: "0xE626402550fB921E4a47c11568F89dF3496fbEF0",
Expand Down

0 comments on commit 550f50f

Please sign in to comment.