mirror of
https://github.com/AtHeartEngineering/bandada.git
synced 2026-01-09 00:48:03 -05:00
feat: add sepolia as default network
This commit is contained in:
@@ -98,4 +98,4 @@ yarn deploy:bandada
|
||||
yarn deploy:bandada-semaphore
|
||||
```
|
||||
|
||||
If you want to deploy contracts on Goerli or Arbitrum, remember to provide a valid private key and an Infura API in your `.env` file.
|
||||
If you want to deploy contracts on Sepolia or Arbitrum, remember to provide a valid private key and an Infura API in your `.env` file.
|
||||
|
||||
@@ -26,9 +26,9 @@ function getNetworks(): NetworksUserConfig {
|
||||
chainId: 1337,
|
||||
accounts
|
||||
},
|
||||
goerli: {
|
||||
url: `https://goerli.infura.io/v3/${infuraApiKey}`,
|
||||
chainId: 5,
|
||||
sepolia: {
|
||||
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
|
||||
chainId: 11155111,
|
||||
accounts
|
||||
},
|
||||
arbitrum: {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
VITE_API_URL=http://localhost:3000
|
||||
VITE_CLIENT_URL=http://localhost:3002
|
||||
VITE_CLIENT_INVITES_URL=http://localhost:3002?inviteCode=\
|
||||
VITE_ETHEREUM_NETWORK=goerli
|
||||
VITE_ETHEREUM_NETWORK=sepolia
|
||||
VITE_GITHUB_CLIENT_ID=a83a8b014ef38270fb22
|
||||
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
|
||||
VITE_TWITTER_REDIRECT_URI=http://localhost:3001/credentials
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
VITE_API_URL=https://api.bandada.pse.dev
|
||||
VITE_CLIENT_URL=https://client.bandada.pse.dev
|
||||
VITE_CLIENT_INVITES_URL=https://client.bandada.pse.dev?inviteCode=\
|
||||
VITE_ETHEREUM_NETWORK=goerli
|
||||
VITE_ETHEREUM_NETWORK=sepolia
|
||||
VITE_GITHUB_CLIENT_ID=6ccd7b93e84260e353f9
|
||||
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
|
||||
VITE_TWITTER_REDIRECT_URI=https://bandada.pse.dev/credentials
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
VITE_API_URL=https://api-staging.bandada.pse.dev
|
||||
VITE_CLIENT_URL=https://client-staging.bandada.pse.dev
|
||||
VITE_CLIENT_INVITES_URL=https://client-staging.bandada.pse.dev?inviteCode=\
|
||||
VITE_ETHEREUM_NETWORK=goerli
|
||||
VITE_ETHEREUM_NETWORK=sepolia
|
||||
VITE_GITHUB_CLIENT_ID=6ccd7b93e84260e353f9
|
||||
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
|
||||
VITE_TWITTER_REDIRECT_URI=https://staging.bandada.pse.dev/credentials
|
||||
|
||||
@@ -130,7 +130,7 @@ ${memberIds.join("\n")}
|
||||
}
|
||||
|
||||
try {
|
||||
const semaphore = getSemaphoreContract("goerli", signer as any)
|
||||
const semaphore = getSemaphoreContract("sepolia", signer as any)
|
||||
|
||||
await semaphore.addMembers(group.name, memberIds)
|
||||
|
||||
@@ -138,7 +138,7 @@ ${memberIds.join("\n")}
|
||||
onClose(memberIds)
|
||||
} catch (error) {
|
||||
alert(
|
||||
"Some error occurred! Check if you're on Goerli network and the transaction is signed and completed"
|
||||
"Some error occurred! Check if you're on Sepolia network and the transaction is signed and completed"
|
||||
)
|
||||
|
||||
setIsLoading(false)
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function FinalPreviewStep({
|
||||
if (group.type === "on-chain" && signer) {
|
||||
setLoading(true)
|
||||
try {
|
||||
const semaphore = getSemaphoreContract("goerli", signer as any)
|
||||
const semaphore = getSemaphoreContract("sepolia", signer as any)
|
||||
const admin = await signer.getAddress()
|
||||
|
||||
await semaphore.createGroup(group.name, group.treeDepth, admin)
|
||||
@@ -35,7 +35,7 @@ export default function FinalPreviewStep({
|
||||
} catch (error) {
|
||||
setLoading(false)
|
||||
alert(
|
||||
"Some error occurred! Check if you're on Goerli network and the transaction is signed and completed"
|
||||
"Some error occurred! Check if you're on Sepolia network and the transaction is signed and completed"
|
||||
)
|
||||
|
||||
console.error(error)
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import React, { ReactNode, useEffect, useMemo, useState } from "react"
|
||||
import { SiweMessage } from "siwe"
|
||||
import { configureChains, createClient, WagmiConfig } from "wagmi"
|
||||
import { goerli } from "wagmi/chains"
|
||||
import { sepolia } from "wagmi/chains"
|
||||
import { publicProvider } from "wagmi/providers/public"
|
||||
import { getNonce, logOut, signIn } from "../api/bandadaAPI"
|
||||
import useSessionData from "../hooks/use-session-data"
|
||||
@@ -83,7 +83,7 @@ export function AuthContextProvider({ children }: { children: ReactNode }) {
|
||||
)
|
||||
|
||||
const { chains, provider, webSocketProvider } = configureChains(
|
||||
[goerli],
|
||||
[sepolia],
|
||||
[publicProvider()]
|
||||
)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ export default function HomePage(): JSX.Element {
|
||||
</HStack>
|
||||
</Link>
|
||||
<Link
|
||||
href={`https://goerli.etherscan.io/address/${CONTRACT_ADDRESSES.goerli.Bandada}`}
|
||||
href={`https://sepolia.etherscan.io/address/${CONTRACT_ADDRESSES.sepolia.Bandada}`}
|
||||
isExternal
|
||||
>
|
||||
<HStack spacing="1">
|
||||
|
||||
@@ -159,5 +159,5 @@ Returns the contract addresses for the Bandada, Semaphore and BandadaSemaphore s
|
||||
```ts
|
||||
import { getContractAddresses } from "@bandada/utils"
|
||||
|
||||
const addresses = getContractAddresses("goerli")
|
||||
const addresses = getContractAddresses("sepolia")
|
||||
```
|
||||
|
||||
@@ -9,10 +9,10 @@ const CONTRACT_ADDRESSES: { [K in Network]: { [Y in ContractName]: string } } =
|
||||
Bandada: "0x5fbdb2315678afecb367f032d93f642f64180aa3",
|
||||
BandadaSemaphore: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
|
||||
},
|
||||
goerli: {
|
||||
sepolia: {
|
||||
Semaphore: "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131",
|
||||
Bandada: "0xB6f17dB678Dab765bC684Fd6BaA0F222Af388F77",
|
||||
BandadaSemaphore: "0xa0Bf12642C66Fc17d706D3FA7C9eB8EfAEA67d02"
|
||||
Bandada: "0xD2873C967079D8B1eAd9dc86B8F8f3948e29564E",
|
||||
BandadaSemaphore: "0x35ce7AFd20b031b4EEa83748D15f319Be9378d2C"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function getProvider(
|
||||
switch (network) {
|
||||
case "localhost":
|
||||
return new JsonRpcProvider("http://127.0.0.1:8545")
|
||||
case "goerli":
|
||||
case "sepolia":
|
||||
return new InfuraProvider(network, apiKey)
|
||||
default:
|
||||
throw new TypeError(`'${network}' network is not supported`)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
export type Network =
|
||||
| "localhost"
|
||||
// | "homestead"
|
||||
| "goerli"
|
||||
// | "sepolia"
|
||||
// | "goerli"
|
||||
| "sepolia"
|
||||
// | "arbitrum"
|
||||
// | "arbitrum-goerli"
|
||||
// | "matic"
|
||||
|
||||
Reference in New Issue
Block a user