diff --git a/apps/web/src/app/home/page.tsx b/apps/web/src/app/home/page.tsx
index 0a7e541..1b84922 100644
--- a/apps/web/src/app/home/page.tsx
+++ b/apps/web/src/app/home/page.tsx
@@ -5,11 +5,17 @@ export default function Home() {
return (
-
- Tobi
-
- Time-lock Omni Bridge Interface
-
+
+ TOBI
+
+ All-Chain KYC Platform
+
+
+ Token
+ Optimizing
+ Bridge
+ Intelligence
+
diff --git a/apps/web/src/service/kamui/client.ts b/apps/web/src/service/kamui/client.ts
index 5cde890..be5bd37 100644
--- a/apps/web/src/service/kamui/client.ts
+++ b/apps/web/src/service/kamui/client.ts
@@ -1,17 +1,30 @@
-import { createWalletClient, createPublicClient, http } from 'viem'
+import { fallback, createPublicClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { goerli, sepolia } from 'viem/chains'
// This is example
export const account = privateKeyToAccount(`0x${process.env.NEXT_PUBLIC_PRIVATE_KEY}`)
-export const publicClient: any = createPublicClient({
+const sepoliaProvider = [
+ http('https://api.zan.top/node/v1/eth/sepolia/public'),
+ http('https://rpc.notadegen.com/eth/sepolia'),
+ http('https://rpc-sepolia.rockx.com'),
+ http('https://rpc.notadegen.com/eth/sepolia')
+]
+
+const goerliProvider = [
+ http('https://eth-goerli.api.onfinality.io/public'),
+ http('https://goerli.blockpi.network/v1/rpc/public'),
+ http('https://ethereum-goerli.publicnode.com'),
+ http('https://api.zan.top/node/v1/eth/goerli/public')
+]
+
+export const sepoliaClient: any = createPublicClient({
chain: sepolia,
- transport: http(`https://sepolia.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_API_KEY}`)
+ transport: fallback(sepoliaProvider)
})
-export const walletClient: any = createWalletClient({
- account,
- chain: sepolia,
- transport: http(`https://sepolia.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_API_KEY}`)
+export const goerliClient: any = createPublicClient({
+ chain: goerli,
+ transport: fallback(goerliProvider)
})
\ No newline at end of file
diff --git a/apps/web/src/service/kamui/contract.ts b/apps/web/src/service/kamui/contract.ts
index db4e387..453ef4a 100644
--- a/apps/web/src/service/kamui/contract.ts
+++ b/apps/web/src/service/kamui/contract.ts
@@ -3,7 +3,7 @@
import { writeContract, prepareWriteContract, getNetwork } from 'wagmi/actions'
import { wagmiAbi } from './abi'
import { zkproof } from './verify'
-import { publicClient, walletClient, account } from './client'
+import { sepoliaClient, goerliClient, account } from './client'
import { copyFileSync } from 'fs'
const { buildPoseidon } = require('circomlibjs')
@@ -13,6 +13,11 @@ const contractAddress: any = {
'Sepolia': process.env.NEXT_PUBLIC_SEPOLIA_CONTRACT
}
+const publicClients: any = {
+ 'Goerli': goerliClient,
+ 'Sepolia': sepoliaClient,
+}
+
export const createProposal = async (name: string, endTime: number) => {
const { chain } = getNetwork()
const { request } = await prepareWriteContract({
@@ -38,7 +43,7 @@ export const vote = async (proof: any, proposalId: number, accept: boolean) => {
export const getResult = async (proposal: bigint) => {
const { chain } = getNetwork()
-
+ const publicClient = publicClients[chain!.name]
const data = await publicClient.readContract({
address: contractAddress[chain!.name],
abi: wagmiAbi,
@@ -50,7 +55,7 @@ export const getResult = async (proposal: bigint) => {
export const getBlockTime = async () => {
const { chain } = getNetwork()
-
+ const publicClient = publicClients[chain!.name]
const data = await publicClient.readContract({
address: contractAddress[chain!.name],
abi: wagmiAbi,
@@ -61,6 +66,7 @@ export const getBlockTime = async () => {
export const getProposal = async (proposalId: number) => {
const { chain } = getNetwork()
+ const publicClient = publicClients[chain!.name]
const data = await publicClient.readContract({
address: contractAddress[chain!.name],
abi: wagmiAbi,
@@ -72,7 +78,7 @@ export const getProposal = async (proposalId: number) => {
export const getProposalCount = async () => {
const { chain } = getNetwork()
-
+ const publicClient = publicClients[chain!.name]
const data = await publicClient.readContract({
address: contractAddress[chain!.name],
abi: wagmiAbi,
diff --git a/packages/zk-circuits/cache/solidity-files-cache.json b/packages/zk-circuits/cache/solidity-files-cache.json
index e740df9..4c8ba9a 100644
--- a/packages/zk-circuits/cache/solidity-files-cache.json
+++ b/packages/zk-circuits/cache/solidity-files-cache.json
@@ -1,8 +1,8 @@
{
"_format": "hh-sol-cache-2",
"files": {
- "/Users/eric/Workspace/hackathon/hollowleaf/tobi/packages/zk-circuits/contracts/CircuitsVerifier.sol": {
- "lastModificationDate": 1692714895344,
+ "/Users/cfh00890942/Workspace/hackathon/tobi/tobi/packages/zk-circuits/contracts/CircuitsVerifier.sol": {
+ "lastModificationDate": 1692676198788,
"contentHash": "a1cd466008240a0102cf704daf699062",
"sourceName": "contracts/CircuitsVerifier.sol",
"solcConfig": {
@@ -37,8 +37,8 @@
"Verifier"
]
},
- "/Users/eric/Workspace/hackathon/hollowleaf/tobi/packages/zk-circuits/contracts/KamuiField.sol": {
- "lastModificationDate": 1692803139535,
+ "/Users/cfh00890942/Workspace/hackathon/tobi/tobi/packages/zk-circuits/contracts/KamuiField.sol": {
+ "lastModificationDate": 1692839634797,
"contentHash": "2623c233915cd7f0088dc81ee90882fd",
"sourceName": "contracts/KamuiField.sol",
"solcConfig": {
@@ -75,8 +75,8 @@
"KamuiField"
]
},
- "/Users/eric/Workspace/hackathon/hollowleaf/tobi/packages/zk-circuits/contracts/interface/ICircuitsVerifier.sol": {
- "lastModificationDate": 1692803131438,
+ "/Users/cfh00890942/Workspace/hackathon/tobi/tobi/packages/zk-circuits/contracts/interface/ICircuitsVerifier.sol": {
+ "lastModificationDate": 1692839634798,
"contentHash": "8414b18f6719c8db16c5484ac9265015",
"sourceName": "contracts/interface/ICircuitsVerifier.sol",
"solcConfig": {
@@ -110,8 +110,8 @@
"ICircuitsVerifier"
]
},
- "/Users/eric/Workspace/hackathon/hollowleaf/tobi/node_modules/.pnpm/@openzeppelin+contracts@4.9.3/node_modules/@openzeppelin/contracts/access/Ownable.sol": {
- "lastModificationDate": 1692715035066,
+ "/Users/cfh00890942/Workspace/hackathon/tobi/tobi/node_modules/.pnpm/@openzeppelin+contracts@4.9.3/node_modules/@openzeppelin/contracts/access/Ownable.sol": {
+ "lastModificationDate": 1692672501304,
"contentHash": "5a20b2cad87ddb61c7a3a6af21289e28",
"sourceName": "@openzeppelin/contracts/access/Ownable.sol",
"solcConfig": {
@@ -147,8 +147,8 @@
"Ownable"
]
},
- "/Users/eric/Workspace/hackathon/hollowleaf/tobi/node_modules/.pnpm/@openzeppelin+contracts@4.9.3/node_modules/@openzeppelin/contracts/utils/Context.sol": {
- "lastModificationDate": 1692715035039,
+ "/Users/cfh00890942/Workspace/hackathon/tobi/tobi/node_modules/.pnpm/@openzeppelin+contracts@4.9.3/node_modules/@openzeppelin/contracts/utils/Context.sol": {
+ "lastModificationDate": 1692672501254,
"contentHash": "5f2c5c4b6af2dd4551027144797bc8be",
"sourceName": "@openzeppelin/contracts/utils/Context.sol",
"solcConfig": {
diff --git a/packages/zk-circuits/scripts/address/sepolia/CircuitsVerifier.json b/packages/zk-circuits/scripts/address/sepolia/CircuitsVerifier.json
index 7af9c2c..1a83126 100644
--- a/packages/zk-circuits/scripts/address/sepolia/CircuitsVerifier.json
+++ b/packages/zk-circuits/scripts/address/sepolia/CircuitsVerifier.json
@@ -1 +1 @@
-{"main":"0x461Cd208b91D65e2E1d5549ee5A5c6dcbCBfE1E1"}
\ No newline at end of file
+{"main":"0x950798121c8A4d647Fc156334cCF09c59F038Eb5"}
\ No newline at end of file
diff --git a/packages/zk-circuits/scripts/address/sepolia/KamuiField.json b/packages/zk-circuits/scripts/address/sepolia/KamuiField.json
index 0cf0f19..2597641 100644
--- a/packages/zk-circuits/scripts/address/sepolia/KamuiField.json
+++ b/packages/zk-circuits/scripts/address/sepolia/KamuiField.json
@@ -1 +1 @@
-{"main":"0xfC0A4C89D8B94ea81654DaEd99E3C40Ae51fb5d6"}
\ No newline at end of file
+{"main":"0x621cA77D5501ceD495a792988C450e1Ca639a962"}
\ No newline at end of file