-
-
Save kmjones1979/5c9e71d4ea158be762df195b2bf7541e to your computer and use it in GitHub Desktop.
SE-2 frontend config for base mainnet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as chains from "wagmi/chains"; | |
// Base chain | |
export const base = { | |
id: 8453, | |
network: "base", | |
name: "Base", | |
nativeCurrency: { name: "Base", symbol: "ETH", decimals: 18 }, | |
rpcUrls: { | |
default: { | |
http: ["https://mainnet.base.org"], | |
}, | |
public: { | |
http: ["https://mainnet.base.org"], | |
}, | |
}, | |
blockExplorers: { | |
blockscout: { | |
name: "Basescout", | |
url: "https://base.blockscout.com", | |
}, | |
default: { | |
name: "Basescan", | |
url: "https://basescan.org", | |
}, | |
etherscan: { | |
name: "Basescan", | |
url: "https://basescan.org", | |
}, | |
}, | |
contracts: { | |
multicall3: { | |
address: "0xca11bde05977b3631167028862be2a173976ca11", | |
blockCreated: 5022, | |
}, | |
}, | |
} as const satisfies chains.Chain; | |
export type ScaffoldConfig = { | |
targetNetwork: chains.Chain; | |
pollingInterval: number; | |
alchemyApiKey: string; | |
walletConnectProjectId: string; | |
onlyLocalBurnerWallet: boolean; | |
walletAutoConnect: boolean; | |
}; | |
const scaffoldConfig = { | |
// The network where your DApp lives in | |
targetNetwork: base, | |
// for base goerli testnet : | |
// targetNetwork : chains.baseGoerli, | |
// The interval at which your front-end polls the RPC servers for new data | |
// it has no effect on the local network | |
pollingInterval: 30000, | |
// This is ours Alchemy's default API key. | |
// You can get your own at https://dashboard.alchemyapi.io | |
// It's recommended to store it in an env variable: | |
// .env.local for local testing, and in the Vercel/system env config for live apps. | |
alchemyApiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF", | |
// This is ours WalletConnect's default project ID. | |
// You can get your own at https://cloud.walletconnect.com | |
// It's recommended to store it in an env variable: | |
// .env.local for local testing, and in the Vercel/system env config for live apps. | |
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "3a8170812b534d0ff9d794f19a901d64", | |
// Only show the Burner Wallet when running on hardhat network | |
onlyLocalBurnerWallet: true, | |
/** | |
* 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, | |
} satisfies ScaffoldConfig; | |
export default scaffoldConfig; | |
// In hardhat.config.ts under networks key | |
/* | |
base : { | |
url: "https://mainnet.base.org", | |
accounts: [deployerPrivateKey] | |
}, | |
baseGoerli : { | |
url: "https://goerli.base.org", | |
accounts: [deployerPrivateKey] | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment