import { defineChain } from '@reown/appkit/networks';
// Define the custom network
const customNetwork = defineChain({
id: 123456789,
caipNetworkId: 'eip155:123456789',
chainNamespace: 'eip155',
name: 'Custom Network',
nativeCurrency: {
decimals: 18,
name: 'Ether',
symbol: 'ETH',
},
rpcUrls: {
default: {
http: ['RPC_URL'],
webSocket: ['WS_RPC_URL'],
},
},
blockExplorers: {
default: { name: 'Explorer', url: 'BLOCK_EXPLORER_URL' },
},
contracts: {
// Add the contracts here
}
})
// Then pass it to the AppKit
createAppKit({
adapters: [...],
networks: [customNetwork],
chainImages: { // Customize networks' logos
123456789: '/custom-network-logo.png', // <chainId>: 'www.network.com/logo.png'
}
})