diff --git a/src/utils/__test__/__mocks__/index.ts b/src/utils/__test__/__mocks__/index.ts index 2b892f8..47a96db 100644 --- a/src/utils/__test__/__mocks__/index.ts +++ b/src/utils/__test__/__mocks__/index.ts @@ -17,6 +17,7 @@ export const rollupConfig = { futureSeconds: 3600, }, }; +export const parentChainId = 421613; export const rollupContracts = { rollup: '0x389a3eA93AcF8D3d9cE09008Db3b19b15D3698f0', diff --git a/src/utils/__test__/__snapshots__/configBuilders.test.ts.snap b/src/utils/__test__/__snapshots__/configBuilders.test.ts.snap index 5a87b88..c2c4112 100644 --- a/src/utils/__test__/__snapshots__/configBuilders.test.ts.snap +++ b/src/utils/__test__/__snapshots__/configBuilders.test.ts.snap @@ -162,6 +162,8 @@ exports[`Configuration Builders buildL3Config Function builds correctly 1`] = ` "minL2BaseFee": 100000000, "networkFeeReceiver": "0xF27c2fEfe6a39aa08763e504b44133CD992dd0f3", "outbox": "0x5B8674639103E827d124a70CD1d48d3E59F41188", + "parent-chain-node-url": "https://goerli-rollup.arbitrum.io/rpc", + "parentChainId": 421613, "rollup": "0x389a3eA93AcF8D3d9cE09008Db3b19b15D3698f0", "sequencerInbox": "0x3d8d87d6280cA15f54dBF18151582E67F421576A", "staker": "0xF27c2fEfe6a39aa08763e504b44133CD992dd0f3", diff --git a/src/utils/__test__/configBuilders.test.ts b/src/utils/__test__/configBuilders.test.ts index 5294e59..a64ca86 100644 --- a/src/utils/__test__/configBuilders.test.ts +++ b/src/utils/__test__/configBuilders.test.ts @@ -5,7 +5,7 @@ import { buildAnyTrustNodeConfig, buildL3Config, } from '../configBuilders'; -import { rollupConfig, rollupContracts, validators, batchPoster } from './__mocks__'; +import { rollupConfig, rollupContracts, validators, batchPoster, parentChainId } from './__mocks__'; describe('Configuration Builders', () => { describe('buildChainConfig Function', () => { @@ -22,6 +22,7 @@ describe('Configuration Builders', () => { rollupContracts, validators, batchPoster, + parentChainId, }); expect(result).toMatchSnapshot(); }); @@ -44,10 +45,12 @@ describe('Configuration Builders', () => { rollupContracts, validators, batchPoster, + parentChainId, }); const result = buildAnyTrustNodeConfig( rollupConfigData, '0xF27c2fEfe6a39aa08763e504b44133CD992dd0f3', + parentChainId, ); expect(result).toMatchSnapshot(); }); @@ -61,6 +64,7 @@ describe('Configuration Builders', () => { validators, batchPoster, rollupContracts, + parentChainId, }; const result = await buildL3Config(buildL3ConfigParams); expect(result).toMatchSnapshot(); diff --git a/src/utils/getRpcUrl.ts b/src/utils/getRpcUrl.ts index d9fc02d..c30cfa6 100644 --- a/src/utils/getRpcUrl.ts +++ b/src/utils/getRpcUrl.ts @@ -1,14 +1,12 @@ -import { goerli, sepolia } from 'wagmi/chains'; - import { ChainId } from '@/types/ChainId'; export function getRpcUrl(chainId: number) { switch (chainId) { - case goerli.id: - return goerli.rpcUrls.default.http[0]; + case 5: + return 'https://rpc.ankr.com/eth_goerli'; - case sepolia.id: - return sepolia.rpcUrls.default.http[0]; + case 11155111: + return 'https://rpc.sepolia.org'; case ChainId.ArbitrumGoerli: return 'https://goerli-rollup.arbitrum.io/rpc';