How to add a custom RPC URL into your front-end, backend, or dashboard
If you choose to add your own custom RPC into your app, you can so in the following ways:
This guide utilizes the thirdweb connect v5 SDK
How to use a custom RPC in a react app?
import { defineChain, createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: process.env.THIRWEB_CLIENT_ID, }); const myChain = defineChain({ id: myChainId, rpc: "https://my-custom-rpc.com" }) <ConnectButton client={client} chain={myChain} />
How to use a custom RPC in a typescript app?
import { defineChain } from "thirdweb"; const myChain = defineChain({ id: myChainId, rpc: "https://my-custom-rpc.com", })
How to use a custom RPC in a thirdweb dashboard embeds?
If you are using the prebuilt minting embed, you'll can add your RPC to the dashboard on the Embed
tab in the RPC Url
field and copy the embed code again. This version of the embed will use your custom RPC.
Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.
Did this answer your question?
😞
😐
🤩