Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

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.

NameTypeChain IDEvmChainchain Query Parameters
Ethereum Mainnet logoEthereum Mainnet
Mainnet0x1 (1)EvmChain.ETHEREUM
  • eth
  • 0x1
Ethereum Sepolia logoEthereum Sepolia
Testnet0xaa36a7 (11155111)EvmChain.SEPOLIA
  • sepolia
  • 0xaa36a7
Ethereum Holesky logoEthereum Holesky
Testnet0x4268 (17000)EvmChain.HOLESKY
  • holesky
  • 0x4268
Polygon Mainnet logoPolygon Mainnet
Mainnet0x89 (137)EvmChain.POLYGON
  • polygon
  • 0x89
Polygon Amoy logoPolygon Amoy
Testnet0x13882 (80002)EvmChain.POLYGON_AMOY
  • amoy
  • 0x13882
Binance Smart Chain Mainnet logoBinance Smart Chain Mainnet
Mainnet0x38 (56)EvmChain.BSC
  • bsc
  • 0x38
Binance Smart Chain Testnet logoBinance Smart Chain Testnet
Testnet0x61 (97)EvmChain.BSC_TESTNET
  • bsc testnet
  • 0x61
Arbitrum logoArbitrum
Mainnet0xa4b1 (42161)EvmChain.ARBITRUM
  • arbitrum
  • 0xa4b1
Base logoBase
Mainnet0x2105 (8453)EvmChain.BASE
  • base
  • 0x2105
Base Sepolia logoBase Sepolia
Testnet0x14a34 (84532)EvmChain.BASE_SEPOLIA
  • base sepolia
  • 0x14a34
Optimism logoOptimism
Mainnet0xa (10)EvmChain.OPTIMISM
  • optimism
  • 0xa
NewLinea logoLinea
Mainnet0xe708 (59144)EvmChain.LINEA
  • linea
  • 0xe708
NewLinea Sepolia logoLinea Sepolia
Testnet0xe705 (59141)EvmChain.LINEA_SEPOLIA
  • linea sepolia
  • 0xe705
Avalanche logoAvalanche
Mainnet0xa86a (43114)EvmChain.AVALANCHE
  • avalanche
  • 0xa86a
Fantom Mainnet logoFantom Mainnet
Mainnet0xfa (250)EvmChain.FANTOM
  • fantom
  • 0xfa
Cronos Mainnet logoCronos Mainnet
Mainnet0x19 (25)EvmChain.CRONOS
  • cronos
  • 0x19
Palm logoPalm
Mainnet0x2a15c308d (11297108109)EvmChain.PALM
  • palm
  • 0x2a15c308d
Gnosis logoGnosis
Mainnet0x64 (100)EvmChain.GNOSIS
  • gnosis
  • 0x64
Gnosis Chiado logoGnosis Chiado
Testnet0x27d8 (10200)EvmChain.GNOSIS_TESTNET
  • gnosis testnet
  • 0x27d8
Chiliz Mainnet logoChiliz Mainnet
Mainnet0x15b38 (88888)EvmChain.CHILIZ
  • chiliz
  • 0x15b38
Chiliz Testnet logoChiliz Testnet
Testnet0x15b32 (88882)EvmChain.CHILIZ_TESTNET
  • chiliz testnet
  • 0x15b32
NewMoonbeam logoMoonbeam
Mainnet0x504 (1284)EvmChain.MOONBEAM
  • moonbeam
  • 0x504
NewMoonriver logoMoonriver
Testnet0x505 (1285)EvmChain.MOONRIVER
  • moonriver
  • 0x505
NewMoonbase logoMoonbase
Testnet0x507 (1287)EvmChain.MOONBASE
  • moonbase
  • 0x507

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​

NameSolNetworkType
Solana mainnetSolNetwork.MAINNETMainnet
Solana devnetSolNetwork.DEVNETTestnet