11import { CheatCodes } from "@aztec/aztec/testing" ;
2- import { createAztecNodeClient } from "@aztec/aztec.js/node" ;
3- import { createAztecNodeDebugClient } from "@aztec/stdlib/interfaces/client" ;
2+ import { type AztecNode , createAztecNodeClient } from "@aztec/aztec.js/node" ;
3+ import { type AztecNodeDebug , createAztecNodeDebugClient } from "@aztec/stdlib/interfaces/client" ;
44import { DateProvider } from "@aztec/foundation/timer" ;
55
66/**
@@ -35,6 +35,11 @@ export async function pumpL2Blocks(
3535
3636 const node = createAztecNodeClient ( nodeUrl ) ;
3737 const nodeDebug = createAztecNodeDebugClient ( nodeUrl ) ;
38+ // v5's `warpL2TimeAtLeastBy` wants `AztecNode & AztecNodeDebug` (it reads
39+ // current L1 timestamp via the regular API before warping). Both clients
40+ // target the same URL and expose methods as own properties on the rpc
41+ // proxy, so a shallow merge is safe.
42+ const fullNode = Object . assign ( { } , node , nodeDebug ) as AztecNode & AztecNodeDebug ;
3843 const cheatCodes = await CheatCodes . create ( [ l1RpcUrl ] , node , new DateProvider ( ) ) ;
3944
4045 const controller = new AbortController ( ) ;
@@ -60,7 +65,7 @@ export async function pumpL2Blocks(
6065 const loop = ( async ( ) => {
6166 while ( ! signal . aborted ) {
6267 try {
63- await cheatCodes . warpL2TimeAtLeastBy ( nodeDebug , WARP_BY_SECONDS ) ;
68+ await cheatCodes . warpL2TimeAtLeastBy ( fullNode , WARP_BY_SECONDS ) ;
6469 } catch ( err ) {
6570 if ( ! signal . aborted ) {
6671 console . warn ( `[pump-l2-blocks] warp failed: ${ ( err as Error ) . message } ` ) ;
0 commit comments