Skip to content

Commit

Permalink
bump sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin committed Mar 6, 2024
1 parent afdd451 commit abba6ee
Show file tree
Hide file tree
Showing 25 changed files with 1,552 additions and 269 deletions.
2 changes: 1 addition & 1 deletion examples/advanced/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { rootLogger } from "./log.js";
import { Controller } from "./controller.js";
import { Logger } from "winston";
import { toChainId } from "@wormhole-foundation/connect-sdk";
import { toChainId } from "@wormhole-foundation/sdk";

export class TestStorage extends RedisStorage {
startWorker(cb: onJobHandler): void {
Expand Down
5 changes: 1 addition & 4 deletions examples/advanced/src/controller.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Next } from "@wormhole-foundation/relayer-engine";
import { MyRelayerContext } from "./app.js";
import {
TokenBridge,
canonicalAddress,
} from "@wormhole-foundation/connect-sdk";
import { TokenBridge, canonicalAddress } from "@wormhole-foundation/sdk";

export class Controller {
redeemVaa = async (ctx: MyRelayerContext, next: Next) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
TokenBridge,
canonicalAddress,
toChainId,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";
import {
Environment,
StandardRelayerApp,
Expand Down
1,750 changes: 1,524 additions & 226 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@
"dependencies": {
"@bull-board/api": "^5.8.1",
"@bull-board/koa": "^5.8.1",
"@wormhole-foundation/connect-sdk": "0.4.4-beta.4",
"@wormhole-foundation/connect-sdk-evm": "0.4.4-beta.4",
"@wormhole-foundation/connect-sdk-evm-tokenbridge": "0.4.4-beta.4",
"@wormhole-foundation/connect-sdk-solana": "0.4.4-beta.4",
"@wormhole-foundation/connect-sdk-cosmwasm": "0.4.4-beta.4",
"@wormhole-foundation/sdk": "0.5.0-beta.3",
"@certusone/wormhole-spydk": "^0.0.1",
"@datastructures-js/queue": "^4.2.3",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
Expand Down
2 changes: 1 addition & 1 deletion relayer/application-standard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId } from "@wormhole-foundation/sdk";
import { RelayerApp, RelayerAppOpts, defaultOpts } from "./application.js";
import {
logging,
Expand Down
2 changes: 1 addition & 1 deletion relayer/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
UniversalAddress,
VAA,
WormholeMessageId,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";
import { UnrecoverableError } from "bullmq";
import { EventEmitter } from "events";
import { LRUCache } from "lru-cache";
Expand Down
2 changes: 1 addition & 1 deletion relayer/bundle-fetcher.helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VAA, encoding } from "@wormhole-foundation/connect-sdk";
import { VAA, encoding } from "@wormhole-foundation/sdk";
import { ParsedVaaWithBytes } from "./application.js";
import { FetchVaaFn } from "./context.js";
import {
Expand Down
2 changes: 1 addition & 1 deletion relayer/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "./application.js";
import { Logger } from "winston";
import { Environment } from "./environment.js";
import { ChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId } from "@wormhole-foundation/sdk";

export type FetchVaaFn = (
emitterChain: ChainId | string,
Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/legacy-plugin/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { StandardRelayerApp } from "../../application-standard.js";
import { defaultLogger } from "../../logging.js";
import { legacyPluginCompat } from "./legacy-plugin.middleware.js";
import { Environment } from "../../environment.js";
import { ChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId } from "@wormhole-foundation/sdk";

type RelayerEngineConfigs = {
commonEnv: CommonEnv;
Expand Down
4 changes: 2 additions & 2 deletions relayer/middleware/legacy-plugin/legacy-plugin-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as solana from "@solana/web3.js";
import * as sui from "@mysten/sui.js";
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import * as winston from "winston";
import { ChainId, VAA } from "@wormhole-foundation/connect-sdk";
import { EvmChains } from "@wormhole-foundation/connect-sdk-evm";
import { ChainId, VAA } from "@wormhole-foundation/sdk";
import { EvmChains } from "@wormhole-foundation/sdk-evm";

/*
* Config
Expand Down
6 changes: 1 addition & 5 deletions relayer/middleware/legacy-plugin/legacy-plugin.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { JsonRpcProvider } from "@mysten/sui.js";
import { Connection } from "@solana/web3.js";
import {
ChainId,
chainToPlatform,
toChain,
} from "@wormhole-foundation/connect-sdk";
import { ChainId, chainToPlatform, toChain } from "@wormhole-foundation/sdk";
import { RelayerApp } from "../../application.js";
import { StorageContext } from "../../storage/storage.js";
import { LoggingContext } from "../logger.middleware.js";
Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/missedVaasV3/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from "./storage.js";
import { FilterIdentifier, MissedVaaOpts } from "./worker.js";
import { Wormholescan } from "../../rpc/wormholescan-client.js";
import { ChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId } from "@wormhole-foundation/sdk";

export type ProcessVaaFn = (x: Buffer) => Promise<void>;

Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/missedVaasV3/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
WormholeMessageId,
api,
toChain,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";
import { SerializableVaaId } from "../../application.js";
import { MissedVaaMetrics } from "./metrics.js";
import { FilterIdentifier } from "./worker.js";
Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/missedVaasV3/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
Wormholescan,
WormholescanClient,
} from "../../rpc/wormholescan-client.js";
import { ChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId } from "@wormhole-foundation/sdk";

const DEFAULT_PREFIX = "MissedVaaWorkerV3";

Expand Down
4 changes: 2 additions & 2 deletions relayer/middleware/providers.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
chainToPlatform,
platformToChains,
toChainId,
} from "@wormhole-foundation/connect-sdk";
import { EvmChain, EvmChains } from "@wormhole-foundation/connect-sdk-evm";
} from "@wormhole-foundation/sdk";
import { EvmChain, EvmChains } from "@wormhole-foundation/sdk-evm";
import { ethers } from "ethers";
import { Logger } from "winston";
import { Middleware } from "../compose.middleware.js";
Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/source-tx.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
UniversalAddress,
chainToPlatform,
toChainId,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";

export interface SourceTxOpts {
wormscanEndpoint: string;
Expand Down
4 changes: 2 additions & 2 deletions relayer/middleware/tokenBridge.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ethers_contracts as EvmTokenBridgeContracts } from "@wormhole-foundation/connect-sdk-evm-tokenbridge";
import { ethers_contracts as EvmTokenBridgeContracts } from "@wormhole-foundation/sdk-evm-tokenbridge";
import {
Chain,
ChainId,
Expand All @@ -9,7 +9,7 @@ import {
deserialize,
toChain,
toChainId,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";
import { UnrecoverableError } from "bullmq";
import { Signer, ethers } from "ethers";
import { Middleware } from "../compose.middleware.js";
Expand Down
6 changes: 1 addition & 5 deletions relayer/middleware/wallet/wallet-management.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
ChainId,
chainToPlatform,
toChain,
} from "@wormhole-foundation/connect-sdk";
import { ChainId, chainToPlatform, toChain } from "@wormhole-foundation/sdk";
import {
buildWalletManager,
IClientWalletManager,
Expand Down
2 changes: 1 addition & 1 deletion relayer/middleware/wallet/wallet.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { startWalletManagement, TokensByChain } from "./wallet-management.js";
import { Registry } from "prom-client";
import { Environment } from "../../environment.js";
import { DirectSecp256k1Wallet } from "@cosmjs/proto-signing";
import { ChainId, toChain, toChainId } from "@wormhole-foundation/connect-sdk";
import { ChainId, toChain, toChainId } from "@wormhole-foundation/sdk";

export type EVMWallet = ethers.Wallet;
export type SuiWallet = sui.RawSigner;
Expand Down
4 changes: 2 additions & 2 deletions relayer/middleware/wallet/walletToolBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
toChain,
ChainId,
Chain,
} from "@wormhole-foundation/connect-sdk";
import { EvmChains } from "@wormhole-foundation/connect-sdk-evm";
} from "@wormhole-foundation/sdk";
import { EvmChains } from "@wormhole-foundation/sdk-evm";

export interface WalletToolBox<T extends Wallet> extends Providers {
wallet: T;
Expand Down
2 changes: 1 addition & 1 deletion relayer/storage/redis-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Koa from "koa";
import { KoaAdapter } from "@bull-board/koa";
import { createBullBoard } from "@bull-board/api";
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter.js";
import { VAA, deserialize, encoding } from "@wormhole-foundation/connect-sdk";
import { VAA, deserialize, encoding } from "@wormhole-foundation/sdk";

function serializeVaa(vaa: VAA<"Uint8Array">) {
return {
Expand Down
2 changes: 1 addition & 1 deletion relayer/storage/storage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VAA } from "@wormhole-foundation/connect-sdk";
import { VAA } from "@wormhole-foundation/sdk";
import { Context } from "../context.js";

export interface StorageContext extends Context {
Expand Down
2 changes: 1 addition & 1 deletion relayer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
deserialize,
toChain,
toChainId,
} from "@wormhole-foundation/connect-sdk";
} from "@wormhole-foundation/sdk";
import { ParsedVaaWithBytes, SerializableVaaId } from "./application.js";
import { ethers } from "ethers";
import { inspect } from "util";
Expand Down
2 changes: 1 addition & 1 deletion test/middleware/metrics.middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ParsedVaaWithBytes } from "../../relayer/application.js";
import { Environment } from "../../relayer/environment.js";
import { sleep } from "../../relayer/utils.js";
import { VaaFactory } from "../vaa-factory.js";
import { deserialize } from "@wormhole-foundation/connect-sdk";
import { deserialize } from "@wormhole-foundation/sdk";

type TestContext = StorageContext & { target?: string };

Expand Down

0 comments on commit abba6ee

Please sign in to comment.