defineChain

Defines a chain with the given options.

Example

Just pass the chain ID to connect to:

const chain = defineChain(1);

Or pass your own RPC or custom values:

const chain = defineChain({
id: 1,
rpc: "https://my-rpc.com",
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
});

Parameters

Returns

The defined chain.