Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: broken sandbox f-chains #686

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading