From e3b5089e0e8e0c5d95240116457784f8a81b1d61 Mon Sep 17 00:00:00 2001 From: Mexes Date: Tue, 8 Oct 2024 11:02:53 +0000 Subject: [PATCH] fix: Impl changes --- docs/quick-start/configure-contracts.mdx | 31 ++++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/quick-start/configure-contracts.mdx b/docs/quick-start/configure-contracts.mdx index decc893..2e6ee00 100644 --- a/docs/quick-start/configure-contracts.mdx +++ b/docs/quick-start/configure-contracts.mdx @@ -28,11 +28,32 @@ The contracts pulled from the network are determined by the chain configured in **Note:** While some contracts may have the same address on both `Sepolia and Mainnet`, this is not always guaranteed. Always double-check you are on the correct network based on the contract's intended usage. -```bash -// Example scaffold.config.ts -export const config = { - network: "sepolia", // Use "mainnet" for Mainnet +```ts +export type ScaffoldConfig = { + targetNetworks: readonly chains.Chain[]; + pollingInterval: number; + onlyLocalBurnerWallet: boolean; + rpcProviderUrl: string; + walletAutoConnect: boolean; }; + +const scaffoldConfig = { + targetNetworks: [chains.devnet], + // Only show the Burner Wallet when running on devnet + onlyLocalBurnerWallet: false, + rpcProviderUrl: process.env.NEXT_PUBLIC_PROVIDER_URL || "", + // The interval at which your front-end polls the RPC servers for new data + // it has no effect if you only target the local network (default is 30_000) + pollingInterval: 30_000, + /** + * Auto connect: + * 1. If the user was connected into a wallet before, on page reload reconnect automatically + * 2. If user is not connected to any wallet: On reload, connect to burner wallet if burnerWallet.enabled is true && burnerWallet.onlyLocal is false + */ + walletAutoConnect: true, +} as const satisfies ScaffoldConfig; + +export default scaffoldConfig; ``` #### 2. Enter the Contract Address and Name @@ -59,7 +80,7 @@ The tool will generate a configuration file that includes: - Contract Address - Class Hash -```bash +```ts export const externalContracts = [ { address: "0x1234...",