Skip to main content

Chains

In chains.ts the different Aptos and Aptos-based chains are defined and exported as defaultChains.

export type Chain = {
id: string;
name: string;
network: Network;
fullnode?: string;
indexer?: string;
faucet?: string;
block_explorer?: string;
};

The default Aptos chains only require the mandatory fields (id, name, and network). However, for custom chains, it's recommended to provide all fields to ensure a fully functional dapp.

warning

The Aptos devnet is frequently reset, which can result in changes to the chainId. If this occurs, you should:

  1. Redeploy your modules (this process always uses the correct chainId)
  2. Manually update the chainId for devnet in packages/nextjs/utils/scaffold-move/chains.ts

Parameters

ParameterTypeDescription
idstringAddress of the module
namestringName of the module
networkNetworkNetwork as defined in the Aptos TypeScript SDK
indexer (optional)stringURL for the indexer
faucet (optional)stringURL for the faucet
block_explorer (optional)stringURL for the block explorer