From 12986aa1d1dc32b4536895c1a12022e3c4798c34 Mon Sep 17 00:00:00 2001 From: yivlad Date: Thu, 12 Dec 2024 14:49:43 +0100 Subject: [PATCH] Try with setting next block timestamp --- packages/common-testnets/src/anvil/AnvilTestnetFactory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/common-testnets/src/anvil/AnvilTestnetFactory.ts b/packages/common-testnets/src/anvil/AnvilTestnetFactory.ts index c8f885e33..da589e3af 100644 --- a/packages/common-testnets/src/anvil/AnvilTestnetFactory.ts +++ b/packages/common-testnets/src/anvil/AnvilTestnetFactory.ts @@ -43,8 +43,9 @@ export class AnvilTestnetFactory implements TestnetFactory { const client = getAnvilClient(url) - await client.mineBlocks(1n) - await client.mineBlocks(1n) + const timestamp = (await client.getBlock()).timestamp + await client.setNextBlockTimestamp(timestamp + 1n) + await client.mineBlocks(2n) return { client,