Skip to content

Commit

Permalink
Fix RPC endpoint and chainId
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszradomski committed Oct 9, 2023
1 parent 1984793 commit a67b1f6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
12 changes: 11 additions & 1 deletion packages/node/src/config/config.production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ export function getProductionConfig(): Config {
dotenv()

return {
chain: holesky,
chain: {
...holesky,
rpcUrls: {
default: {
http: ['https://ethereum-holesky.publicnode.com'],
},
public: {
http: ['https://ethereum-holesky.publicnode.com'],
},
},
},
rpcUrl: getEnv('RPC_URL'),
contractAddress: EthereumAddress(
'0x1c292ae278dCf230e9D31F39F3c1b088f5d72ca0',
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/getTypedDataDomain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ const localTypedDataDomain: TypedDataDomain = {
const productionTypedDataDomain: TypedDataDomain = {
name: 'BYOR Sovereign Rollup',
version: '1',
chainId: 5,
chainId: 17000,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
}
18 changes: 16 additions & 2 deletions packages/wallet/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { localNetwork } from '@byor/shared'
import { EthereumClient, w3mConnectors, w3mProvider } from '@web3modal/ethereum'
import { Web3Modal } from '@web3modal/react'
import { holesky } from 'viem/chains'
import { Chain, holesky } from 'viem/chains'
import { configureChains, createConfig, WagmiConfig } from 'wagmi'

import { CommittedTransactionList } from '@/components/CommittedTransactionList'
Expand All @@ -13,7 +13,21 @@ import { Wallet } from '@/components/Wallet'
import { Navbar } from '../components/Navbar'
import { Toaster } from '../components/ui/toaster'

const chains = [process.env.NODE_ENV === 'production' ? holesky : localNetwork]
const holeskyBetterRPC: Chain = {
...holesky,
rpcUrls: {
default: {
http: ['https://ethereum-holesky.publicnode.com'],
},
public: {
http: ['https://ethereum-holesky.publicnode.com'],
},
},
}

const chains: Chain[] = [
process.env.NODE_ENV === 'production' ? holeskyBetterRPC : localNetwork,
]
const projectId = '171b81f6da969b561d747dba97534b30'
const { publicClient } = configureChains(chains, [w3mProvider({ projectId })])

Expand Down

0 comments on commit a67b1f6

Please sign in to comment.