import { Chain, getDefaultWallets } from '@rainbow-me/rainbowkit';
import { createConfig, WagmiProvider } from 'wagmi';
const avalanche: Chain = {
id: 43_114,
name: 'Avalanche',
nativeCurrency: {
decimals: 18,
name: 'Avalanche',
symbol: 'AVAX',
},
rpcUrls: {
public: { http: ['https://api.avax.network/ext/bc/C/rpc'] },
default: { http: ['https://api.avax.network/ext/bc/C/rpc'] },
},
blockExplorers: {
default: { name: 'SnowTrace', url: 'https://snowtrace.io' },
etherscan: { name: 'SnowTrace', url: 'https://snowtrace.io' },
},
contracts: {
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 11_907_934,
},
},
testnet: false,
};
const { connectors } = getDefaultWallets({
appName: 'My RainbowKit App',
projectId: 'YOUR_PROJECT_ID',
});
const chains: readonly [Chain, ...Chain[]] = [avalanche];
const config = createConfig({
chains,
connectors,
transports: {
[avalanche.id]: http(),
},
});
const App = () => {
return (
<WagmiProvider config={config}>
<RainbowKitProvider chains={chains}>
{}
</RainbowKitProvider>
</WagmiProvider>
);
};