diff --git a/apps/contracts/contracts/README.md b/apps/contracts/contracts/README.md index 51c4141..16d4468 100644 --- a/apps/contracts/contracts/README.md +++ b/apps/contracts/contracts/README.md @@ -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. diff --git a/apps/contracts/hardhat.config.ts b/apps/contracts/hardhat.config.ts index 7234c07..7af7fc3 100644 --- a/apps/contracts/hardhat.config.ts +++ b/apps/contracts/hardhat.config.ts @@ -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: { diff --git a/apps/dashboard/.env.local b/apps/dashboard/.env.local index f13ec2e..c2155d0 100644 --- a/apps/dashboard/.env.local +++ b/apps/dashboard/.env.local @@ -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 diff --git a/apps/dashboard/.env.production b/apps/dashboard/.env.production index 7de1641..cc4b6bb 100644 --- a/apps/dashboard/.env.production +++ b/apps/dashboard/.env.production @@ -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 diff --git a/apps/dashboard/.env.staging b/apps/dashboard/.env.staging index 1fcc1eb..ae74dd3 100644 --- a/apps/dashboard/.env.staging +++ b/apps/dashboard/.env.staging @@ -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 diff --git a/apps/dashboard/src/components/add-member-modal.tsx b/apps/dashboard/src/components/add-member-modal.tsx index 96a8f7c..cb4ce99 100644 --- a/apps/dashboard/src/components/add-member-modal.tsx +++ b/apps/dashboard/src/components/add-member-modal.tsx @@ -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) diff --git a/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx b/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx index fef741d..02a2870 100644 --- a/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx +++ b/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx @@ -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) diff --git a/apps/dashboard/src/context/auth-context.tsx b/apps/dashboard/src/context/auth-context.tsx index 3b9dfe7..4cce653 100644 --- a/apps/dashboard/src/context/auth-context.tsx +++ b/apps/dashboard/src/context/auth-context.tsx @@ -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()] ) diff --git a/apps/dashboard/src/pages/home.tsx b/apps/dashboard/src/pages/home.tsx index b853c45..2c19895 100644 --- a/apps/dashboard/src/pages/home.tsx +++ b/apps/dashboard/src/pages/home.tsx @@ -74,7 +74,7 @@ export default function HomePage(): JSX.Element { diff --git a/libs/utils/README.md b/libs/utils/README.md index 49b4144..0ff2a64 100644 --- a/libs/utils/README.md +++ b/libs/utils/README.md @@ -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") ``` diff --git a/libs/utils/src/contractAddresses.ts b/libs/utils/src/contractAddresses.ts index 10afd85..cd3713e 100644 --- a/libs/utils/src/contractAddresses.ts +++ b/libs/utils/src/contractAddresses.ts @@ -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" } } diff --git a/libs/utils/src/getProvider.ts b/libs/utils/src/getProvider.ts index f99d471..b5d8e39 100644 --- a/libs/utils/src/getProvider.ts +++ b/libs/utils/src/getProvider.ts @@ -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`) diff --git a/libs/utils/src/types/index.ts b/libs/utils/src/types/index.ts index c621a89..331e111 100644 --- a/libs/utils/src/types/index.ts +++ b/libs/utils/src/types/index.ts @@ -2,8 +2,8 @@ export type Network = | "localhost" // | "homestead" - | "goerli" -// | "sepolia" + // | "goerli" + | "sepolia" // | "arbitrum" // | "arbitrum-goerli" // | "matic"