Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/hardhat/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ export const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve,

// Cleanup function to ensure automining is turned back on
export async function cleanup() {
const publicClient = await hre.viem.getPublicClient();
await publicClient.transport.request({ method: "evm_setAutomine", params: [true] });
console.log("\nCleaning up: turning automining back on...");
try {
const publicClient = await hre.viem.getPublicClient();
await publicClient.transport.request({ method: "evm_setAutomine", params: [true] });
console.log("\nCleaning up: turning automining back on...");
} catch (error) {
console.error("Error cleaning up:", error);
}
}

export const QUESTIONS_FOR_OO: string[] = [
Expand Down