From f9a2f44cc182402f5dd6947b2fbcd74a024859d1 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Thu, 8 Feb 2024 15:20:52 -0500 Subject: [PATCH] Update Dataworker.loadData.ts --- test/Dataworker.loadData.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/Dataworker.loadData.ts b/test/Dataworker.loadData.ts index da46f4378..6d335725c 100644 --- a/test/Dataworker.loadData.ts +++ b/test/Dataworker.loadData.ts @@ -695,6 +695,13 @@ describe("Dataworker: Load data used in all functions", async function () { let mockOriginSpokePoolClient: MockSpokePoolClient, mockDestinationSpokePoolClient: MockSpokePoolClient; let mockDestinationSpokePool: FakeContract; const lpFeePct = toBNWei("0.01"); + let spokePoolV3Abi; + before(async function () { + // @dev I load the ABI once here as I've noticed fetching this ABI sometimes fails between it() tests, randomly + // as well. We won't need to load the ABI once we get the latest contracts-v2 imported in here so this is a + // temporary fix. + spokePoolV3Abi = await sdkUtils.getABI("SpokePoolV3"); + }); beforeEach(async function () { await updateAllClients(); mockOriginSpokePoolClient = new MockSpokePoolClient( @@ -707,7 +714,7 @@ describe("Dataworker: Load data used in all functions", async function () { spokePoolClient_1.chainId, spokePoolClient_1.deploymentBlock ); - mockDestinationSpokePool = await smock.fake(await sdkUtils.getABI("SpokePoolV3")); + mockDestinationSpokePool = await smock.fake(spokePoolV3Abi); mockDestinationSpokePoolClient = new MockSpokePoolClient( spokePoolClient_2.logger, mockDestinationSpokePool as Contract,