Cross-Chain EVM Requests
All our API methods are supported for cross-chain calls. You only need to specify the chain parameter. For example, this request will query block info on Polygon:
import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";
evmApi.block.getBlock({
blockNumberOrHash: "33000000",
chain: EvmChain.POLYGON,
});
If no chain is specified, it will, by default, be set to the defaultEvmApiChain, which is set in your config (defaults to "Ethereum mainnet").
Change the Default Chain
To change the default chain, you can specify defaultEvmApiChain in your config:
import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";
Moralis.start({
apiKey: "YOUR_API_KEY",
defaultEvmApiChain: EvmChain.POLYGON,
});
Moralis.EvmApi.block.getBlock({
blockNumberOrHash: "33000000",
});
Supported EVM Chains
Supported Chains
See the table below for all supported RPC Nodes. For wider chains we support across all products, check the full list of supported chains.
| Name | Type | Chain ID | chain Query Parameters |
|---|---|---|---|
Ethereum Mainnet | Mainnet | 0x1 (1) |
|
Ethereum Sepolia | Testnet | 0xaa36a7 (11155111) |
|
Ethereum Holesky | Testnet | 0x4268 (17000) |
|
Polygon Mainnet | Mainnet | 0x89 (137) |
|
Polygon Amoy | Testnet | 0x13882 (80002) |
|
Binance Smart Chain Mainnet | Mainnet | 0x38 (56) |
|
Binance Smart Chain Testnet | Testnet | 0x61 (97) |
|
Arbitrum | Mainnet | 0xa4b1 (42161) |
|
Base | Mainnet | 0x2105 (8453) |
|
Base Sepolia | Testnet | 0x14a34 (84532) |
|
Optimism | Mainnet | 0xa (10) |
|
Linea | Mainnet | 0xe708 (59144) |
|
Linea Sepolia | Testnet | 0xe705 (59141) |
|
Avalanche | Mainnet | 0xa86a (43114) |
|
Fantom Mainnet | Mainnet | 0xfa (250) |
|
Cronos Mainnet | Mainnet | 0x19 (25) |
|
Gnosis | Mainnet | 0x64 (100) |
|
Gnosis Chiado | Testnet | 0x27d8 (10200) |
|
Chiliz Mainnet | Mainnet | 0x15b38 (88888) |
|
Chiliz Testnet | Testnet | 0x15b32 (88882) |
|
Moonbeam | Mainnet | 0x504 (1284) |
|
Moonriver | Testnet | 0x505 (1285) |
|
Moonbase | Testnet | 0x507 (1287) |
|
New Flow | Mainnet | 0x2eb (747) |
|
New Flow Testnet | Testnet | 0x221 (545) |
|
New Ronin | Mainnet | 0x7e4 (2020) |
|
New Ronin Saigon Testnet | Testnet | 0x7e5 (2021) |
|
New Lisk | Mainnet | 0x46f (1135) |
|
New Lisk Sepolia Testnet | Testnet | 0x106a (4202) |
|
New Pulsechain | Mainnet | 0x171 (369) |
|
New Sei | Mainnet | 0x531 (1329) |
|
New Sei Testnet | Testnet | 0x530 (1328) |
|
New Monad | Mainnet | 0x8f (143) |
|
Solana
Change the Default Network
We have two networks for the Solana API, which you can configure similarly. You can specify the mainnet or devnet:
import Moralis from "moralis";
import { SolNetwork } from "@moralisweb3/common-sol-utils";
Moralis.start({
apiKey: "YOUR_API_KEY",
defaultSolNetwork: SolNetwork.DEVNET,
});
Moralis.SolApi.account.getBalance({
address: "ADDRESS",
});
Supported Solana Networks
| Name | SolNetwork | Type |
|---|---|---|
| Solana mainnet | SolNetwork.MAINNET | Mainnet |
| Solana devnet | SolNetwork.DEVNET | Testnet |
Ethereum Mainnet
Polygon Mainnet
Binance Smart Chain Mainnet
Arbitrum
Base
Optimism
Linea
Avalanche
Fantom Mainnet
Cronos Mainnet
Gnosis
Chiliz Mainnet
Moonbeam
Flow
Ronin
Lisk
Pulsechain
Sei
Monad