this is my current code
import Navbar from "./components/navbar/navbar";

import { WagmiConfig, createConfig, configureChains, sepolia } from "wagmi";

import { publicProvider } from "wagmi/providers/public";
import { alchemyProvider } from "wagmi/providers/alchemy";
import { infuraProvider } from "wagmi/providers/infura";

import { MetaMaskConnector } from "wagmi/connectors/metaMask";

const { chains, publicClient, webSocketPublicClient } = configureChains(
[sepolia],
[
alchemyProvider({ apiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY! }),
infuraProvider({ apiKey: process.env.INFURA_API_KEY! }),
publicProvider(),
]
);

const config = createConfig({
autoConnect: true,
connectors: [new MetaMaskConnector({ chains })],
publicClient,
webSocketPublicClient,
});

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (


{children}

);
}

Nov 16, 2023, 10:02 PM
Have to check if alchemy or infura do so
Nov 16, 2023, 10:45 PM
llamanode does
Nov 16, 2023, 10:45 PM
@FreezyEth since sushi swap use wagmi I checked and they went also with keeping the alchemy key public. So I might just over complicate everything.
Nov 16, 2023, 10:51 PM
yes I don't think you wilmever reach any limit
if you do you must have some bad queries
Nov 16, 2023, 10:52 PM
At this point I will just go with coping their code and don't bother the public key
Thanks for the help, I will still keep in mind your recommendations If the public key creates problems
Nov 16, 2023, 10:53 PM

© 2024 Draquery.com All rights reserved.