defineChain
function..env
file in your project root with the following content. Replace the placeholder for your API key as needed:
Chain.ts
in the app/
directory. In this new file, define your appchain using Viem’s defineChain
function. In this example, you will configure the Blocklords Appchain:
wagmi.ts
file or modify your configuration file as shown below:
OnchainKitProvider
component (typically within your main provider file e.g. Providers.tsx
).
This is a crucial step in enabling our OnchainKit Provider to communicate with both our Base chain and our Appchain.
Bridge
in your app/
directory and add a page.tsx
file with the following content: