Skip to content

Commit

Permalink
Merge pull request #686 from pokt-foundation/stage
Browse files Browse the repository at this point in the history
fix: broken sandbox f-chains
  • Loading branch information
fredteumer authored Nov 22, 2024
2 parents eb49006 + 56079d5 commit 1d25de2
Showing 1 changed file with 46 additions and 51 deletions.
97 changes: 46 additions & 51 deletions app/utils/chainUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,49 @@ export const CHAIN_DOCS_URL: KeyValuePair<string> = {
"zklink-nova-archival": "zklink-nova-api/endpoints/zklink-nova-archival",
}

// evmChains is an array of the relay chain IDs for EVM chains.
// It must be updated whenever a new EVM chain is added to the relay.
//
// The current list of chain IDs on the protocol may be fetched with:
// pocket query params --remoteCLIURL https://pocket-rpc.liquify.com | tail -n +2 | jq '.pocket_params[] | select(.param_key == "pocketcore/SupportedBlockchains")'
export const evmChains = [
"amoy-testnet-archival",
"arbitrum-one",
"arbitrum-sepolia-archival",
"avax-archival",
"avax-dfk",
"avax-mainnet",
"base-mainnet",
"base-testnet",
"blast-archival",
"boba-mainnet",
"bsc-archival",
"bsc-mainnet",
"celo-mainnet",
"eth-archival",
"eth-goerli",
"eth-mainnet",
"eth-trace",
"evmos-mainnet",
"fraxtal-archival",
"fantom-mainnet",
"fuse-mainnet",
"fuse-archival",
"gnosischain-mainnet",
"gnosischain-archival",
"goerli-archival",
"harmony-0",
"holesky-fullnode-testnet",
"iotex-mainnet",
"kava-mainnet",
"kava-mainnet-archival",
"klaytn-mainnet",
"metis-mainnet",
"moonbeam-mainnet",
"moonriver-mainnet",
"oKc-mainnet",
"oasys-mainnet",
"oasys-mainnet-archival",
"opbnb-archival",
"optimism-mainnet",
"optimism-archival",
"optimism-sepolia-archival",
"poly-mainnet",
"poly-archival",
"polygon-mumbai",
"polygon-zkevm-mainnet",
"scroll-mainnet",
"scroll-testnet",
"sepolia",
"sepolia-archival",
"zksync-era-mainnet",
"F003", // avax
"F02A", // zklink
"F02B", // zksync-era
"F004", // avax-dfk
"F005", // base
"F006", // base-testnet
"F008", // blast
"F009", // bsc
"F00A", // boba
"F00B", // celo
"F00C", // eth
"F00D", // eth-holesky-testnet
"F00E", // eth-sepolia-testnet
"F00F", // evmos
"F010", // fantom
"F011", // fraxtal
"F012", // fuse
"F013", // gnosis
"F014", // harmony
"F015", // iotex
"F016", // kaia
"F017", // kava
"F018", // metis
"F019", // moonbeam
"F01A", // moonriver
"F01C", // oasys
"F01D", // optimism
"F01E", // optimism-sepolia-testnet
"F01F", // opbnb
"F021", // polygon
"F022", // polygon-amoy-testnet
"F024", // scroll
"F027", // taiko
"F028", // taiko-hekla-testnet
"F029", // polygon-zkevm
"F002", // arbitrum-sepolia-testnet
"F001", // arbitrum-one
]

export const evmMethods = [
Expand Down Expand Up @@ -146,8 +138,11 @@ export const evmMethods = [
"eth_syncing",
]

// isEvmChain uses the relay chain IDs defined in the evmChains array in this file
// Using the chain ID is more reliable than using the blockchain alias as it is strictly
// one to one.
export const isEvmChain = (chain: Blockchain | null): boolean =>
!!chain && evmChains.includes(chain.blockchain)
!!chain && evmChains.includes(chain.id)

export const getAppEndpointUrl = (
chain: Blockchain | undefined | null,
Expand Down

0 comments on commit 1d25de2

Please sign in to comment.