From 06d7ac6e3917bfebd65ee4bca1a9e8dd0151a853 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:04:29 +0200 Subject: [PATCH] chore: Bump SDK (#868) This update will allow the ConfigStoreClient to work on testnets again. --- package.json | 2 +- src/common/Constants.ts | 1 + test/Relayer.BasicFill.ts | 12 ++++++++++-- test/Relayer.RefundRequests.ts | 12 ++++++++++-- yarn.lock | 8 ++++---- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7d563e744..646d77466 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@across-protocol/contracts-v2": "2.4.0", - "@across-protocol/sdk-v2": "0.15.11", + "@across-protocol/sdk-v2": "0.15.12", "@arbitrum/sdk": "^3.1.3", "@defi-wonderland/smock": "^2.3.5", "@eth-optimism/sdk": "^3.1.0", diff --git a/src/common/Constants.ts b/src/common/Constants.ts index db54bd5ed..afed5b12e 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -118,6 +118,7 @@ export const BUNDLE_END_BLOCK_BUFFERS = { 42161: 300, // At a conservative 1 TPS, 5 mins = 300 seconds = 300 transactions. And 1 block per txn. // Testnets: 5: 0, + 280: 0, 421613: 0, }; diff --git a/test/Relayer.BasicFill.ts b/test/Relayer.BasicFill.ts index 5f07f571d..4c7eaa7d9 100644 --- a/test/Relayer.BasicFill.ts +++ b/test/Relayer.BasicFill.ts @@ -30,7 +30,7 @@ import { TokenClient, } from "../src/clients"; import { CONFIG_STORE_VERSION, UBA_MIN_CONFIG_STORE_VERSION } from "../src/common"; -import { MockInventoryClient, MockProfitClient, MockUBAClient } from "./mocks"; +import { MockConfigStoreClient, MockInventoryClient, MockProfitClient, MockUBAClient } from "./mocks"; import { Relayer } from "../src/relayer/Relayer"; import { RelayerConfig } from "../src/relayer/RelayerConfig"; // Tested import { MockedMultiCallerClient } from "./mocks/MockMultiCallerClient"; @@ -79,7 +79,15 @@ describe("Relayer: Check for Unfilled Deposits and Fill", async function () { ({ spy, spyLogger } = createSpyLogger()); ({ configStore } = await deployConfigStore(owner, [l1Token])); - configStoreClient = new ConfigStoreClient(spyLogger, configStore, { fromBlock: 0 }, CONFIG_STORE_VERSION); + configStoreClient = new MockConfigStoreClient( + spyLogger, + configStore, + { fromBlock: 0 }, + CONFIG_STORE_VERSION, + [originChainId, destinationChainId], + originChainId, + false + ); await configStoreClient.update(); hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); diff --git a/test/Relayer.RefundRequests.ts b/test/Relayer.RefundRequests.ts index e087694b2..a6a67eba8 100644 --- a/test/Relayer.RefundRequests.ts +++ b/test/Relayer.RefundRequests.ts @@ -33,7 +33,7 @@ import { import { FillWithBlock, RefundRequestWithBlock } from "../src/interfaces"; import { CONFIG_STORE_VERSION } from "../src/common"; import { delay } from "../src/utils"; -import { MockInventoryClient, MockProfitClient } from "./mocks"; +import { MockConfigStoreClient, MockInventoryClient, MockProfitClient } from "./mocks"; import { Relayer } from "../src/relayer/Relayer"; import { RelayerConfig } from "../src/relayer/RelayerConfig"; // Tested import { MockedMultiCallerClient } from "./mocks/MockMultiCallerClient"; @@ -107,7 +107,15 @@ describe("Relayer: Request refunds for cross-chain repayments", async function ( undefined, CHAIN_ID_TEST_LIST )); - configStoreClient = new ConfigStoreClient(spyLogger, configStore, { fromBlock: 0 }, CONFIG_STORE_VERSION); + configStoreClient = new MockConfigStoreClient( + spyLogger, + configStore, + { fromBlock: 0 }, + CONFIG_STORE_VERSION, + [originChainId, destinationChainId], + originChainId, + false + ); await configStoreClient.update(); hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient); diff --git a/yarn.lock b/yarn.lock index 2595cfe70..835ff8ddc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,10 +54,10 @@ "@openzeppelin/contracts" "4.1.0" "@uma/core" "^2.18.0" -"@across-protocol/sdk-v2@0.15.11": - version "0.15.11" - resolved "https://registry.yarnpkg.com/@across-protocol/sdk-v2/-/sdk-v2-0.15.11.tgz#22a2813ff073009afbf03322558a1f50537c9a9f" - integrity sha512-XGEthFRniGt8yEivfUiLrWcicaauMf+FYKEy3eF+Wzn8/9ckdENjvKVDziiDnZYG2cWDy3qVvO5KaYh+dCfSWg== +"@across-protocol/sdk-v2@0.15.12": + version "0.15.12" + resolved "https://registry.yarnpkg.com/@across-protocol/sdk-v2/-/sdk-v2-0.15.12.tgz#058cf994f1eb151f9f8a7fd84284fdc49662e0dc" + integrity sha512-bXmJ2mga4o6QCvdOamNKcbeMqBsCcf7d3ooXhCx+mF/767lfATX6uF8ychXvTP8DAVo5Nr+fzGJAKrs6Xjvw/Q== dependencies: "@across-protocol/across-token" "^1.0.0" "@across-protocol/contracts-v2" "^2.4.2"