Skip to content
Docs

Cloud SDK

Custom EVM chains

Register your own EVM networks with an RPC URL and use them alongside Gray3 catalog chains.

Overview

You can register your own EVM network, such as a private chain or a new rollup, with your own RPC URL. Calls for a custom chain go directly to that RPC from wherever the SDK runs, not through Gray3, so they cost no credits.

ts
const gray = new Gray({
  projectId: process.env.GRAY_PROJECT_ID!,
  secretKey: process.env.GRAY_SECRET_KEY!,
  customChains: [
    {
      id: "acme-devnet",
      name: "Acme Devnet",
      family: "evm",
      evmChainId: 424242,
      rpcUrl: "https://rpc.acme.example",
      native: { symbol: "ACME", name: "Acme", decimals: 18 },
      explorer: { url: "https://explorer.acme.example" },
      isTestnet: true,
    },
  ],
});

// Or register one at runtime:
gray.chains.addCustom({ /* same shape */ });
gray.chains.removeCustom("acme-devnet");

What works on custom chains

  • Native balance and a native-only portfolio.
  • Gas fees and gas estimates.
  • Prepare, simulate, broadcast, and receipt for native transfers.
  • Activity returns an empty page, because most RPCs cannot list an address's history.

Token, NFT, and contract-call intents, prices, NFTs, DeFi, swaps, and Ledger API records are not available for custom chains. Custom chain IDs must not collide with Gray3 chain IDs, and only the evm family is supported.