Skip to content

Commit 07bdc69

Browse files
committed
feat: 🎸 added support of opBNB
1 parent 4564c9f commit 07bdc69

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

javascript/tokenscript-viewer/src/integration/constants.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export enum ChainID {
3232
CELO = 42220,
3333
CELO_ALFAJORES = 44787,
3434
RISE_SEPOLIA = 11155931,
35+
OP_BNB = 204,
36+
OP_BNB_TESTNET = 5611,
3537
}
3638

3739
export const CHAIN_MAP: ChainMapInterface = {
@@ -43,6 +45,7 @@ export const CHAIN_MAP: ChainMapInterface = {
4345
[ChainID.HOLESKY]: 'holesky',
4446
//[ChainID.KOVAN]: "kovan",
4547
[ChainID.BSC]: "bsc",
48+
[ChainID.BSC_TESTNET]: "bsct",
4649
[ChainID.AMOY]: "amoy",
4750
[ChainID.AVALANCH]: "avalanche",
4851
[ChainID.FANTOM]: "fantom",
@@ -60,6 +63,8 @@ export const CHAIN_MAP: ChainMapInterface = {
6063
[ChainID.CELO]: 'celo',
6164
[ChainID.CELO_ALFAJORES]: 'celo-alfajores',
6265
[ChainID.RISE_SEPOLIA]: 'rise-sepolia',
66+
[ChainID.OP_BNB]: "obnb",
67+
[ChainID.OP_BNB_TESTNET]: "obnbt",
6368
};
6469

6570
export const CHAIN_NAME_MAP: ChainMapInterface = {
@@ -71,6 +76,7 @@ export const CHAIN_NAME_MAP: ChainMapInterface = {
7176
[ChainID.ARBITRUM]: "Arbitrum",
7277
[ChainID.OPTIMISM]: "Optimism",
7378
[ChainID.BSC]: "Binance Smart Chain",
79+
[ChainID.BSC_TESTNET]: "Binance Smart Chain Testnet",
7480
[ChainID.AVALANCH]: "Avalanche",
7581
[ChainID.FANTOM]: "Fantom",
7682
[ChainID.KAIA]: "Kaia",
@@ -87,6 +93,8 @@ export const CHAIN_NAME_MAP: ChainMapInterface = {
8793
[ChainID.CELO]: 'Celo',
8894
[ChainID.CELO_ALFAJORES]: 'Celo (Alfajores Testnet)',
8995
[ChainID.RISE_SEPOLIA]: 'Rise (Sepolia Testnet)',
96+
[ChainID.OP_BNB]: "opBNB Mainnet",
97+
[ChainID.OP_BNB_TESTNET]: "opBNB Testnet",
9098
};
9199

92100
const INFURA_API_KEY = Env.INFURA_API_KEY ?? "9f79b2f9274344af90b8d4e244b580ef"
@@ -234,6 +242,14 @@ export const CHAIN_CONFIG: {[chain: number]: IChainConfig} = {
234242
rpc: 'https://testnet.riselabs.xyz',
235243
explorer: 'https://testnet-explorer.riselabs.xyz/tx/',
236244
},
245+
[ChainID.OP_BNB]: {
246+
rpc: 'https://opbnb-mainnet-rpc.bnbchain.org',
247+
explorer: 'https://opbnb.bscscan.com/tx/'
248+
},
249+
[ChainID.OP_BNB_TESTNET]: {
250+
rpc: 'https://opbnb-testnet-rpc.bnbchain.org',
251+
explorer: 'https://opbnb-testnet.bscscan.com/tx/'
252+
},
237253
}
238254

239255
export const ERC721_ABI_JSON = [

0 commit comments

Comments
 (0)