@@ -272,11 +272,13 @@ export function hydrateAnvilTestStack(env: InjectedAnvilTestStack): AnvilTestSta
272272 publicClient : createPublicClient ( {
273273 chain : l2Chain ,
274274 transport : http ( env . l2 . rpcUrl ) ,
275+ pollingInterval : testConstants . POLLING_INTERVAL ,
275276 } ) ,
276277 walletClient : createWalletClient ( {
277278 chain : l2Chain ,
278279 transport : http ( env . l2 . rpcUrl ) ,
279280 account : blockAdvancerAccount ,
281+ pollingInterval : testConstants . POLLING_INTERVAL ,
280282 } ) ,
281283 account : blockAdvancerAccount ,
282284 } ) ,
@@ -316,15 +318,15 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
316318 dockerNetworkName = `chain-sdk-int-test-net-${ Date . now ( ) } ` ;
317319 createDockerNetwork ( dockerNetworkName ) ;
318320
319- const l2ChainId = testConstants . DEFAULT_L2_CHAIN_ID ;
321+ const l2ChainId = testConstants . L2_CHAIN_ID ;
320322 const l3ChainId = l2ChainId + 1 ;
321- const l1RpcPort = testConstants . DEFAULT_L1_RPC_PORT ;
322- const l2RpcPort = testConstants . DEFAULT_L2_RPC_PORT ;
323- const l3RpcPort = testConstants . DEFAULT_L3_RPC_PORT ;
324- const anvilImage = testConstants . DEFAULT_ANVIL_IMAGE ;
325- const nitroImage = testConstants . DEFAULT_NITRO_IMAGE ;
326- const sepoliaBeaconRpc = testConstants . DEFAULT_SEPOLIA_BEACON_RPC ;
327- const anvilForkUrl = testConstants . DEFAULT_SEPOLIA_RPC ;
323+ const l1RpcPort = testConstants . L1_RPC_PORT ;
324+ const l2RpcPort = testConstants . L2_RPC_PORT ;
325+ const l3RpcPort = testConstants . L3_RPC_PORT ;
326+ const anvilImage = testConstants . ANVIL_IMAGE ;
327+ const nitroImage = testConstants . NITRO_IMAGE ;
328+ const sepoliaBeaconRpc = testConstants . SEPOLIA_BEACON_RPC ;
329+ const anvilForkUrl = testConstants . SEPOLIA_RPC ;
328330 const rollupCreatorVersion : RollupCreatorSupportedVersion = 'v3.2' ;
329331 const rollupTimingParams : CustomTimingParams = {
330332 confirmPeriodBlocks : 150n ,
@@ -353,7 +355,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
353355 } ) ;
354356
355357 l1RpcCachingProxy = await startRpcCachingProxy ( anvilForkUrl , cacheFilePath , {
356- forkBlockNumber : testConstants . DEFAULT_SEPOLIA_FORK_BLOCK_NUMBER ,
358+ forkBlockNumber : testConstants . SEPOLIA_FORK_BLOCK_NUMBER ,
357359 } ) ;
358360
359361 const l1RpcUrlWithCaching = l1RpcCachingProxy . proxyUrl ;
@@ -374,7 +376,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
374376 l1RpcPort,
375377 anvilImage,
376378 anvilForkUrl : l1RpcUrlWithCaching ,
377- anvilForkBlockNumber : testConstants . DEFAULT_SEPOLIA_FORK_BLOCK_NUMBER ,
379+ anvilForkBlockNumber : testConstants . SEPOLIA_FORK_BLOCK_NUMBER ,
378380 chainId : sepolia . id ,
379381 } ) ;
380382
@@ -389,6 +391,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
389391 const l1Client = createPublicClient ( {
390392 chain : l1Chain ,
391393 transport : http ( l1RpcUrl ) ,
394+ pollingInterval : testConstants . POLLING_INTERVAL ,
392395 } ) ;
393396 registerChainForRpcUrl ( { rpcUrl : l1RpcUrl , chain : l1Chain } ) ;
394397
@@ -462,7 +465,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
462465 validatorPrivateKey : validatorAccount . privateKey ,
463466 stakeToken : l2RollupConfig . stakeToken ,
464467 parentChainId : sepolia . id ,
465- parentChainRpcUrl : `http://${ l1ContainerName } :8545 ` ,
468+ parentChainRpcUrl : `http://${ l1ContainerName } :${ l1RpcPort } ` ,
466469 parentChainBeaconRpcUrl : sepoliaBeaconRpc ,
467470 } ) ;
468471
@@ -535,12 +538,14 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
535538 let l2Client : PublicClient < Transport , Chain > = createPublicClient ( {
536539 chain : l2BootstrapChain ,
537540 transport : http ( l2RpcUrl ) ,
541+ pollingInterval : testConstants . POLLING_INTERVAL ,
538542 } ) ;
539543
540544 const l2WalletClient = createWalletClient ( {
541545 chain : l2BootstrapChain ,
542546 transport : http ( l2RpcUrl ) ,
543547 account : harnessDeployer ,
548+ pollingInterval : testConstants . POLLING_INTERVAL ,
544549 } ) ;
545550
546551 const l2BlockAdvancer = createBlockAdvancer ( {
@@ -549,6 +554,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
549554 chain : l2BootstrapChain ,
550555 transport : http ( l2RpcUrl ) ,
551556 account : l2BlockAdvancerAccount ,
557+ pollingInterval : testConstants . POLLING_INTERVAL ,
552558 } ) ,
553559 account : l2BlockAdvancerAccount ,
554560 } ) ;
@@ -566,6 +572,8 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
566572 console . log ( 'L2 create2 factory is ready\n' ) ;
567573
568574 const l2Provider = new ethers . providers . JsonRpcProvider ( l2RpcUrl ) ;
575+ l2Provider . pollingInterval = testConstants . POLLING_INTERVAL ;
576+
569577 const l2Signer = new ethers . Wallet ( harnessDeployer . privateKey , l2Provider ) ;
570578
571579 console . log ( 'Deploying L2 custom gas token...' ) ;
@@ -635,6 +643,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
635643 l2Client = createPublicClient ( {
636644 chain : l2Chain ,
637645 transport : http ( l2RpcUrl ) ,
646+ pollingInterval : testConstants . POLLING_INTERVAL ,
638647 } ) ;
639648
640649 console . log ( 'Deploying L3 rollup contracts on L2...' ) ;
@@ -679,7 +688,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
679688 stakeToken : l3RollupConfig . stakeToken ,
680689 parentChainId : l2ChainId as ParentChainId ,
681690 parentChainIsArbitrum : true ,
682- parentChainRpcUrl : `http://${ l2ContainerName } :8449 ` ,
691+ parentChainRpcUrl : `http://${ l2ContainerName } :${ l2RpcPort } ` ,
683692 } ) ;
684693
685694 if (
@@ -737,11 +746,13 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
737746 const l3Client = createPublicClient ( {
738747 chain : l3Chain ,
739748 transport : http ( l3RpcUrl ) ,
749+ pollingInterval : testConstants . POLLING_INTERVAL ,
740750 } ) ;
741751 const l3WalletClient = createWalletClient ( {
742752 chain : l3Chain ,
743753 transport : http ( l3RpcUrl ) ,
744754 account : harnessDeployer ,
755+ pollingInterval : testConstants . POLLING_INTERVAL ,
745756 } ) ;
746757
747758 await (
@@ -814,6 +825,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
814825 chain : l2Chain ,
815826 transport : http ( l2RpcUrl ) ,
816827 account : l2BlockAdvancerAccount ,
828+ pollingInterval : testConstants . POLLING_INTERVAL ,
817829 } ) ;
818830
819831 const l3BlockAdvancer = createBlockAdvancer ( {
@@ -822,6 +834,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
822834 chain : l3Chain ,
823835 transport : http ( l3RpcUrl ) ,
824836 account : l3BlockAdvancerAccount ,
837+ pollingInterval : testConstants . POLLING_INTERVAL ,
825838 } ) ,
826839 account : l3BlockAdvancerAccount ,
827840 } ) ;
0 commit comments