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