From 3ea536085740c4edf867d6b7e61e6b213995ace0 Mon Sep 17 00:00:00 2001 From: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Date: Thu, 28 Sep 2023 18:59:03 -0400 Subject: [PATCH] feat: Add protection against computing LP fees for future quote timestamps (#944) * improve(dataworker): Remove `transferThreshold` Fixes ACX-1537 Removes a lot of code needed to support deprecated config store variable that is always set to 0 in production * Update Dataworker.ts * bumpity * Update Dataworker.ts * Update package.json * Update yarn.lock * wip * fix(Dataworker): Dereference originChainId by index, not key (#936) * fix(Dataworker): Dereference originChainId by index, not key Temporary fix to resolve an issue with future quoteTimestamps. We need a more robust solution than this in the long run. * Extract originToken from array * lint * WIP Signed-off-by: Matt Rice --------- Signed-off-by: Matt Rice Co-authored-by: Matt Rice * improve: leverage default TTL & leverage caching (#938) * improve: leverage default TTL * improve: set fn signature to default * feat: add dataworker force bundle range (#912) * feat: add dataworker force bundle range * docs: add documentation to example env * improve: allow for boba * improve: allow forced proposal range with sending --------- Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> * feat: test chain routes (#897) * feat: Script for automating SpokePool deposits This is useful for making deposits to the zkSync SpokePool(s) because zkSync's block explorer doesn't yet support making transactions via proxy contracts. * Add yarn script target + tweak usage * Add basic support for dumping SpokePool config * lint * fix: Gracefully handle token searches where token missing Not all tokens are defined on all chains, so don't try to drop case unless the token actually exists on a chain. * Add "fetch" for dumping deposit and fill information Currently limitations: - Does not display updated values (i.e. after a speed-up). - Does not display message data. - Should normalise from the token decimals for better readability. - Does not gracefully handle when the txnHash is not found. * lint * fix conflict * lint * chore: allow base-units to easily be sent * chore: allow token to be passed as origin token addr or symbol * feat: test chain routes * nit: improve docs * docs: add docs * improve: account for checksummed value Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> * improve: remove unneeded flag Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> * improve: docs Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> * improve: do not hardcode amounts * improve: modification * improve: dynamically compute price --------- Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com> * WIP * Update yarn.lock * Revert "WIP" This reverts commit 381e5bff8cb11bb2399316553bfdd521f874f910. * feat: Add protection against computing LP fees for future quote timestamps This resolves the [reverted SDK PR](https://github.com/across-protocol/sdk-v2/pull/399) and re-introduces protection from deposit quote timestamps that are impossible to compute. This PR essentially moves that protection to the production version of Hub and Spoke clients so that the unit tests can continue to work and not have to add additional logic to set quote times correctly. Ideally in the future we set the quote times how they would in production but for now this solution results in a much smaller code diff * lint * fix * lint * Update HubPoolClient.ts * refactor: Import getNetworkName from sdk (#945) * chore: bump sdk to latest (#943) * chore: bump sdk to latest * chore: bump version * chore: bump sdk --------- Signed-off-by: Matt Rice Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> Co-authored-by: Matt Rice Co-authored-by: James Morris, MS <96435344+james-a-morris@users.noreply.github.com> --- src/clients/HubPoolClient.ts | 19 ++++++++++++- src/clients/SpokePoolClient.ts | 12 +++++++- test/HubPoolClient.Utilization.ts | 10 +++++-- test/Relayer.BasicFill.ts | 28 +++++++++---------- test/Relayer.UnfilledDeposits.ts | 21 +++++--------- test/SpokePoolClient.SpeedUp.ts | 12 ++++++-- test/SpokePoolClient.ValidateFill.ts | 22 +++++++++------ test/SpokePoolClient.deposits.ts | 12 ++++++-- test/fixtures/Dataworker.Fixture.ts | 41 ++++++++++++++-------------- 9 files changed, 108 insertions(+), 69 deletions(-) diff --git a/src/clients/HubPoolClient.ts b/src/clients/HubPoolClient.ts index 5f54dd81c..bd5df59b3 100644 --- a/src/clients/HubPoolClient.ts +++ b/src/clients/HubPoolClient.ts @@ -1,8 +1,9 @@ import { clients } from "@across-protocol/sdk-v2"; -import { Contract } from "ethers"; +import { BigNumber, Contract } from "ethers"; import winston from "winston"; import { MakeOptional, EventSearchConfig } from "../utils"; import { IGNORED_HUB_EXECUTED_BUNDLES, IGNORED_HUB_PROPOSED_BUNDLES } from "../common"; +import { DepositWithBlock } from "../interfaces"; export class HubPoolClient extends clients.HubPoolClient { constructor( @@ -18,4 +19,20 @@ export class HubPoolClient extends clients.HubPoolClient { ignoredHubProposedBundles: IGNORED_HUB_PROPOSED_BUNDLES, }); } + + async computeRealizedLpFeePct( + deposit: Pick< + DepositWithBlock, + "quoteTimestamp" | "amount" | "destinationChainId" | "originChainId" | "blockNumber" + >, + l1Token: string + ): Promise<{ realizedLpFeePct: BigNumber | undefined; quoteBlock: number }> { + if (deposit.quoteTimestamp > this.currentTime) { + throw new Error( + `Cannot compute lp fee percent for quote timestamp ${deposit.quoteTimestamp} in the future. Current time: ${this.currentTime}.` + ); + } + + return await super.computeRealizedLpFeePct(deposit, l1Token); + } } diff --git a/src/clients/SpokePoolClient.ts b/src/clients/SpokePoolClient.ts index 09c2c796e..ea662d36d 100644 --- a/src/clients/SpokePoolClient.ts +++ b/src/clients/SpokePoolClient.ts @@ -1,3 +1,13 @@ import { clients } from "@across-protocol/sdk-v2"; +import { FundsDepositedEvent } from "../interfaces"; +import { isDefined } from "../utils/TypeGuards"; -export class SpokePoolClient extends clients.SpokePoolClient {} +export class SpokePoolClient extends clients.SpokePoolClient { + _isEarlyDeposit(depositEvent: FundsDepositedEvent, currentTime: number): boolean { + const hubCurrentTime = this.hubPoolClient?.currentTime; + if (!isDefined(hubCurrentTime)) { + throw new Error("HubPoolClient's currentTime is not defined"); + } + return depositEvent.args.quoteTimestamp > currentTime || depositEvent.args.quoteTimestamp > hubCurrentTime; + } +} diff --git a/test/HubPoolClient.Utilization.ts b/test/HubPoolClient.Utilization.ts index a2f96f6b0..0f92ada21 100644 --- a/test/HubPoolClient.Utilization.ts +++ b/test/HubPoolClient.Utilization.ts @@ -1,4 +1,4 @@ -import { HubPoolClient } from "../src/clients"; +import { clients } from "@across-protocol/sdk-v2"; import { amountToLp, destinationChainId, @@ -29,7 +29,7 @@ import { let configStore: Contract, hubPool: Contract; let l1Token: Contract, l2Token: Contract, timer: Contract, weth: Contract; -let configStoreClient: MockConfigStoreClient, hubPoolClient: HubPoolClient; +let configStoreClient: MockConfigStoreClient, hubPoolClient: clients.HubPoolClient; let owner: SignerWithAddress; // Same rate model used for across-v1 tests: @@ -96,7 +96,11 @@ describe("HubPool Utilization", async function () { await configStoreClient.update(); - hubPoolClient = new HubPoolClient(createSpyLogger().spyLogger, hubPool, configStoreClient); + hubPoolClient = new clients.HubPoolClient( + createSpyLogger().spyLogger, + hubPool, + configStoreClient as unknown as clients.AcrossConfigStoreClient + ); await configStoreClient.update(); await hubPoolClient.update(); }); diff --git a/test/Relayer.BasicFill.ts b/test/Relayer.BasicFill.ts index d33c06899..ecad12c18 100644 --- a/test/Relayer.BasicFill.ts +++ b/test/Relayer.BasicFill.ts @@ -1,12 +1,5 @@ import { random } from "lodash"; -import { - AcrossApiClient, - ConfigStoreClient, - HubPoolClient, - MultiCallerClient, - SpokePoolClient, - TokenClient, -} from "../src/clients"; +import { AcrossApiClient, ConfigStoreClient, MultiCallerClient, TokenClient } from "../src/clients"; import { CONFIG_STORE_VERSION, UBA_MIN_CONFIG_STORE_VERSION } from "../src/common"; import { Deposit } from "../src/interfaces"; import { Relayer } from "../src/relayer/Relayer"; @@ -45,15 +38,16 @@ import { winston, } from "./utils"; import { generateNoOpSpokePoolClientsForDefaultChainIndices } from "./utils/UBAUtils"; +import { clients } from "@across-protocol/sdk-v2"; let spokePool_1: Contract, erc20_1: Contract, spokePool_2: Contract, erc20_2: Contract; let hubPool: Contract, configStore: Contract, l1Token: Contract; let owner: SignerWithAddress, depositor: SignerWithAddress, relayer: SignerWithAddress; let spy: sinon.SinonSpy, spyLogger: winston.Logger; -let spokePoolClient_1: SpokePoolClient, spokePoolClient_2: SpokePoolClient; -let spokePoolClients: { [chainId: number]: SpokePoolClient }; -let configStoreClient: ConfigStoreClient, hubPoolClient: HubPoolClient, tokenClient: TokenClient; +let spokePoolClient_1: clients.SpokePoolClient, spokePoolClient_2: clients.SpokePoolClient; +let spokePoolClients: { [chainId: number]: clients.SpokePoolClient }; +let configStoreClient: ConfigStoreClient, hubPoolClient: clients.HubPoolClient, tokenClient: TokenClient; let relayerInstance: Relayer; let multiCallerClient: MultiCallerClient, profitClient: MockProfitClient; let spokePool1DeploymentBlock: number, spokePool2DeploymentBlock: number; @@ -99,19 +93,19 @@ describe("Relayer: Check for Unfilled Deposits and Fill", async function () { ) as unknown as ConfigStoreClient; await configStoreClient.update(); - hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); + hubPoolClient = new clients.HubPoolClient(spyLogger, hubPool, configStoreClient); await hubPoolClient.update(); multiCallerClient = new MockedMultiCallerClient(spyLogger); - spokePoolClient_1 = new SpokePoolClient( + spokePoolClient_1 = new clients.SpokePoolClient( spyLogger, spokePool_1.connect(relayer), hubPoolClient, originChainId, spokePool1DeploymentBlock ); - spokePoolClient_2 = new SpokePoolClient( + spokePoolClient_2 = new clients.SpokePoolClient( spyLogger, spokePool_2.connect(relayer), hubPoolClient, @@ -477,7 +471,11 @@ describe("Relayer: Check for Unfilled Deposits and Fill", async function () { const version = UBA_MIN_CONFIG_STORE_VERSION; configStoreClient = new ConfigStoreClient(spyLogger, configStore, { fromBlock: 0 }, version); await configStoreClient.update(); - hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); + hubPoolClient = new clients.HubPoolClient( + spyLogger, + hubPool, + configStoreClient as unknown as clients.AcrossConfigStoreClient + ); relayerInstance = new Relayer( relayer.address, spyLogger, diff --git a/test/Relayer.UnfilledDeposits.ts b/test/Relayer.UnfilledDeposits.ts index ae7958382..077d5881b 100644 --- a/test/Relayer.UnfilledDeposits.ts +++ b/test/Relayer.UnfilledDeposits.ts @@ -1,12 +1,4 @@ -import { - AcrossApiClient, - ConfigStoreClient, - HubPoolClient, - MultiCallerClient, - SpokePoolClient, - TokenClient, - UBAClient, -} from "../src/clients"; +import { AcrossApiClient, ConfigStoreClient, MultiCallerClient, TokenClient, UBAClient } from "../src/clients"; import { CHAIN_ID_TEST_LIST, amountToLp, @@ -35,6 +27,7 @@ import { simpleDeposit, toBNWei, } from "./utils"; +import { clients } from "@across-protocol/sdk-v2"; // Tested import { Relayer } from "../src/relayer/Relayer"; @@ -46,8 +39,8 @@ let hubPool: Contract, l1Token: Contract, configStore: Contract; let owner: SignerWithAddress, depositor: SignerWithAddress, relayer: SignerWithAddress; const { spy, spyLogger } = createSpyLogger(); -let spokePoolClient_1: SpokePoolClient, spokePoolClient_2: SpokePoolClient; -let configStoreClient: MockConfigStoreClient, hubPoolClient: HubPoolClient; +let spokePoolClient_1: clients.SpokePoolClient, spokePoolClient_2: clients.SpokePoolClient; +let configStoreClient: MockConfigStoreClient, hubPoolClient: clients.HubPoolClient; let multiCallerClient: MultiCallerClient, tokenClient: TokenClient; let profitClient: MockProfitClient; let spokePool1DeploymentBlock: number, spokePool2DeploymentBlock: number; @@ -93,17 +86,17 @@ describe("Relayer: Unfilled Deposits", async function () { configStoreClient = new MockConfigStoreClient(spyLogger, configStore, undefined, undefined, CHAIN_ID_TEST_LIST); await configStoreClient.update(); - hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); + hubPoolClient = new clients.HubPoolClient(spyLogger, hubPool, configStoreClient); await hubPoolClient.update(); - spokePoolClient_1 = new SpokePoolClient( + spokePoolClient_1 = new clients.SpokePoolClient( spyLogger, spokePool_1, hubPoolClient, originChainId, spokePool1DeploymentBlock ); - spokePoolClient_2 = new SpokePoolClient( + spokePoolClient_2 = new clients.SpokePoolClient( spyLogger, spokePool_2, hubPoolClient, diff --git a/test/SpokePoolClient.SpeedUp.ts b/test/SpokePoolClient.SpeedUp.ts index c808aa483..45afdc31b 100644 --- a/test/SpokePoolClient.SpeedUp.ts +++ b/test/SpokePoolClient.SpeedUp.ts @@ -14,14 +14,14 @@ import { toBNWei, } from "./utils"; -import { SpokePoolClient } from "../src/clients"; +import { clients } from "@across-protocol/sdk-v2"; import { DepositWithBlock } from "../src/interfaces"; let spokePool: Contract, erc20: Contract, destErc20: Contract, weth: Contract; let depositor: SignerWithAddress, deploymentBlock: number; const destinationChainId2 = destinationChainId + 1; -let spokePoolClient: SpokePoolClient; +let spokePoolClient: clients.SpokePoolClient; describe("SpokePoolClient: SpeedUp", async function () { const ignoredFields = [ @@ -37,7 +37,13 @@ describe("SpokePoolClient: SpeedUp", async function () { [, depositor] = await ethers.getSigners(); ({ spokePool, erc20, destErc20, weth, deploymentBlock } = await deploySpokePoolWithToken(originChainId)); await enableRoutes(spokePool, [{ originToken: erc20.address, destinationChainId: destinationChainId2 }]); - spokePoolClient = new SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock); + spokePoolClient = new clients.SpokePoolClient( + createSpyLogger().spyLogger, + spokePool, + null, + originChainId, + deploymentBlock + ); await setupTokensForWallet(spokePool, depositor, [erc20, destErc20], weth, 10); }); diff --git a/test/SpokePoolClient.ValidateFill.ts b/test/SpokePoolClient.ValidateFill.ts index a2b1a9ec5..83ca7dbbd 100644 --- a/test/SpokePoolClient.ValidateFill.ts +++ b/test/SpokePoolClient.ValidateFill.ts @@ -27,10 +27,10 @@ import { sinon, } from "./utils"; -import { ConfigStoreClient, HubPoolClient, SpokePoolClient } from "../src/clients"; +import { ConfigStoreClient } from "../src/clients"; import { queryHistoricalDepositForFill } from "../src/utils"; import { MockConfigStoreClient, MockSpokePoolClient } from "./mocks"; -import { utils } from "@across-protocol/sdk-v2"; +import { utils, clients } from "@across-protocol/sdk-v2"; import { CHAIN_ID_TEST_LIST, repaymentChainId } from "./constants"; const { validateFillForDeposit } = utils; @@ -40,8 +40,8 @@ let spokePool1DeploymentBlock: number, spokePool2DeploymentBlock: number; let l1Token: Contract, configStore: Contract; let spy: sinon.SinonSpy, spyLogger: winston.Logger; -let spokePoolClient2: SpokePoolClient, hubPoolClient: HubPoolClient; -let spokePoolClient1: SpokePoolClient, configStoreClient: ConfigStoreClient; +let spokePoolClient2: clients.SpokePoolClient, hubPoolClient: clients.HubPoolClient; +let spokePoolClient1: clients.SpokePoolClient, configStoreClient: ConfigStoreClient; describe("SpokePoolClient: Fill Validation", async function () { beforeEach(async function () { @@ -81,17 +81,21 @@ describe("SpokePoolClient: Fill Validation", async function () { ) as unknown as ConfigStoreClient; await configStoreClient.update(); - hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); + hubPoolClient = new clients.HubPoolClient( + spyLogger, + hubPool, + configStoreClient as unknown as clients.AcrossConfigStoreClient + ); await hubPoolClient.update(); - spokePoolClient1 = new SpokePoolClient( + spokePoolClient1 = new clients.SpokePoolClient( spyLogger, spokePool_1, hubPoolClient, originChainId, spokePool1DeploymentBlock ); - spokePoolClient2 = new SpokePoolClient( + spokePoolClient2 = new clients.SpokePoolClient( createSpyLogger().spyLogger, spokePool_2, null, @@ -132,7 +136,7 @@ describe("SpokePoolClient: Fill Validation", async function () { it("Returns deposit matched with fill", async function () { const deposit_1 = await buildDeposit(hubPoolClient, spokePool_1, erc20_1, l1Token, depositor, destinationChainId); const fill_1 = await buildFill(spokePool_2, erc20_2, depositor, relayer, deposit_1, 0.5); - const spokePoolClientForDestinationChain = new SpokePoolClient( + const spokePoolClientForDestinationChain = new clients.SpokePoolClient( createSpyLogger().spyLogger, spokePool_1, null, @@ -488,7 +492,7 @@ describe("SpokePoolClient: Fill Validation", async function () { const fill_1 = await buildFill(spokePool_2, erc20_2, depositor, relayer, expectedDeposit, 0.2); const fill_2 = await buildModifiedFill(spokePool_2, depositor, relayer, fill_1, 2, 0.2, relayer.address, "0x12"); // Fill same % of deposit with 2x larger relayer fee pct. - const spokePoolClientForDestinationChain = new SpokePoolClient( + const spokePoolClientForDestinationChain = new clients.SpokePoolClient( createSpyLogger().spyLogger, spokePool_1, null, diff --git a/test/SpokePoolClient.deposits.ts b/test/SpokePoolClient.deposits.ts index ae493e27b..299628476 100644 --- a/test/SpokePoolClient.deposits.ts +++ b/test/SpokePoolClient.deposits.ts @@ -1,4 +1,4 @@ -import { SpokePoolClient } from "../src/clients"; +import { clients } from "@across-protocol/sdk-v2"; import { Contract, SignerWithAddress, @@ -18,14 +18,20 @@ let depositor1: SignerWithAddress, depositor2: SignerWithAddress; let deploymentBlock: number; const destinationChainId2 = destinationChainId + 1; -let spokePoolClient: SpokePoolClient; +let spokePoolClient: clients.SpokePoolClient; describe("SpokePoolClient: Deposits", async function () { beforeEach(async function () { [, depositor1, depositor2] = await ethers.getSigners(); ({ spokePool, erc20, destErc20, weth, deploymentBlock } = await deploySpokePoolWithToken(originChainId)); await enableRoutes(spokePool, [{ originToken: erc20.address, destinationChainId: destinationChainId2 }]); - spokePoolClient = new SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock); + spokePoolClient = new clients.SpokePoolClient( + createSpyLogger().spyLogger, + spokePool, + null, + originChainId, + deploymentBlock + ); await setupTokensForWallet(spokePool, depositor1, [erc20, destErc20], weth, 10); await setupTokensForWallet(spokePool, depositor2, [erc20, destErc20], weth, 10); diff --git a/test/fixtures/Dataworker.Fixture.ts b/test/fixtures/Dataworker.Fixture.ts index 41767f949..718062a55 100644 --- a/test/fixtures/Dataworker.Fixture.ts +++ b/test/fixtures/Dataworker.Fixture.ts @@ -29,20 +29,21 @@ import { BundleDataClient, TokenClient } from "../../src/clients"; import { DataworkerClients } from "../../src/dataworker/DataworkerClientHelper"; import { MockConfigStoreClient, MockedMultiCallerClient } from "../mocks"; import { EthersTestLibrary } from "../types"; +import { clients as sdkClients } from "@across-protocol/sdk-v2"; async function _constructSpokePoolClientsWithLookback( spokePools: Contract[], spokePoolChains: number[], spyLogger: winston.Logger, signer: SignerWithAddress, - hubPoolClient: clients.HubPoolClient, + hubPoolClient: sdkClients.HubPoolClient, lookbackForAllChains?: number, deploymentBlocks?: { [chainId: number]: number } ) { await hubPoolClient.update(); const latestBlocks = await Promise.all(spokePools.map((x) => x.provider.getBlockNumber())); return spokePools.map((pool, i) => { - return new clients.SpokePoolClient( + return new sdkClients.SpokePoolClient( spyLogger, pool.connect(signer), hubPoolClient, @@ -72,14 +73,14 @@ export async function setupDataworker( l1Token_2: Contract; configStore: Contract; timer: Contract; - spokePoolClient_1: clients.SpokePoolClient; - spokePoolClient_2: clients.SpokePoolClient; - spokePoolClient_3: clients.SpokePoolClient; - spokePoolClient_4: clients.SpokePoolClient; - spokePoolClients: { [chainId: number]: clients.SpokePoolClient }; + spokePoolClient_1: sdkClients.SpokePoolClient; + spokePoolClient_2: sdkClients.SpokePoolClient; + spokePoolClient_3: sdkClients.SpokePoolClient; + spokePoolClient_4: sdkClients.SpokePoolClient; + spokePoolClients: { [chainId: number]: sdkClients.SpokePoolClient }; mockedConfigStoreClient: MockConfigStoreClient; - configStoreClient: clients.ConfigStoreClient; - hubPoolClient: clients.HubPoolClient; + configStoreClient: sdkClients.AcrossConfigStoreClient; + hubPoolClient: sdkClients.HubPoolClient; dataworkerInstance: Dataworker; spyLogger: winston.Logger; spy: sinon.SinonSpy; @@ -168,7 +169,7 @@ export async function setupDataworker( await configStoreClient.update(); - const hubPoolClient = new clients.HubPoolClient( + const hubPoolClient = new sdkClients.HubPoolClient( spyLogger, hubPool, configStoreClient, @@ -202,7 +203,7 @@ export async function setupDataworker( const bundleDataClient = new BundleDataClient( spyLogger, { - configStoreClient: configStoreClient as unknown as clients.ConfigStoreClient, + configStoreClient: configStoreClient as unknown as sdkClients.AcrossConfigStoreClient, multiCallerClient, hubPoolClient, }, @@ -215,7 +216,7 @@ export async function setupDataworker( tokenClient, hubPoolClient, multiCallerClient, - configStoreClient: configStoreClient as unknown as clients.ConfigStoreClient, + configStoreClient: configStoreClient as unknown as sdkClients.AcrossConfigStoreClient, profitClient, }; const dataworkerInstance = new Dataworker( @@ -262,7 +263,7 @@ export async function setupDataworker( spokePoolClient_3, spokePoolClient_4, spokePoolClients, - configStoreClient: configStoreClient as unknown as clients.ConfigStoreClient, + configStoreClient: configStoreClient as unknown as sdkClients.AcrossConfigStoreClient, mockedConfigStoreClient: configStoreClient, hubPoolClient, dataworkerInstance, @@ -301,14 +302,14 @@ export async function setupFastDataworker( l1Token_2: Contract; configStore: Contract; timer: Contract; - spokePoolClient_1: clients.SpokePoolClient; - spokePoolClient_2: clients.SpokePoolClient; - spokePoolClient_3: clients.SpokePoolClient; - spokePoolClient_4: clients.SpokePoolClient; - spokePoolClients: { [chainId: number]: clients.SpokePoolClient }; + spokePoolClient_1: sdkClients.SpokePoolClient; + spokePoolClient_2: sdkClients.SpokePoolClient; + spokePoolClient_3: sdkClients.SpokePoolClient; + spokePoolClient_4: sdkClients.SpokePoolClient; + spokePoolClients: { [chainId: number]: sdkClients.SpokePoolClient }; mockedConfigStoreClient: MockConfigStoreClient; - configStoreClient: clients.ConfigStoreClient; - hubPoolClient: clients.HubPoolClient; + configStoreClient: sdkClients.AcrossConfigStoreClient; + hubPoolClient: sdkClients.HubPoolClient; dataworkerInstance: Dataworker; spyLogger: winston.Logger; spy: sinon.SinonSpy;