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 |
---|---|---|---|
![]() | Mainnet | 0x1 (1) |
|
![]() | Testnet | 0xaa36a7 (11155111) |
|
![]() | Testnet | 0x4268 (17000) |
|
![]() | Mainnet | 0x89 (137) |
|
![]() | Testnet | 0x13882 (80002) |
|
![]() | Mainnet | 0x38 (56) |
|
![]() | Testnet | 0x61 (97) |
|
![]() | Mainnet | 0xa4b1 (42161) |
|
![]() | Mainnet | 0x2105 (8453) |
|
![]() | Testnet | 0x14a34 (84532) |
|
![]() | Mainnet | 0xa (10) |
|
![]() | Mainnet | 0xe708 (59144) |
|
![]() | Testnet | 0xe705 (59141) |
|
![]() | Mainnet | 0xa86a (43114) |
|
![]() | Mainnet | 0xfa (250) |
|
![]() | Mainnet | 0x19 (25) |
|
![]() | Mainnet | 0x64 (100) |
|
![]() | Testnet | 0x27d8 (10200) |
|
![]() | Mainnet | 0x15b38 (88888) |
|
![]() | Testnet | 0x15b32 (88882) |
|
![]() | Mainnet | 0x504 (1284) |
|
![]() | Testnet | 0x505 (1285) |
|
![]() | Testnet | 0x507 (1287) |
|
New ![]() | Mainnet | 0x2eb (747) |
|
New ![]() | Testnet | 0x221 (545) |
|
New ![]() | Mainnet | 0x7e4 (2020) |
|
New ![]() | Testnet | 0x7e5 (2021) |
|
New ![]() | Mainnet | 0x46f (1135) |
|
New ![]() | Testnet | 0x106a (4202) |
|
New ![]() | Mainnet | 0x171 (369) |
|
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 |