Skip to content

Commit

Permalink
chore: Bump SDK (#868)
Browse files Browse the repository at this point in the history
This update will allow the ConfigStoreClient to work on testnets again.
  • Loading branch information
pxrl committed Aug 10, 2023
1 parent 960d2c5 commit 06d7ac6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/common/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
12 changes: 10 additions & 2 deletions test/Relayer.BasicFill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 10 additions & 2 deletions test/Relayer.RefundRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 06d7ac6

Please sign in to comment.