diff --git a/.changeset/wicked-cherries-pump.md b/.changeset/wicked-cherries-pump.md index 0449cd35fd..0369c5d588 100644 --- a/.changeset/wicked-cherries-pump.md +++ b/.changeset/wicked-cherries-pump.md @@ -1,5 +1,5 @@ --- -'@hyperlane-xyz/sdk': minor +'@hyperlane-xyz/sdk': major --- Support for ZKSync contract deployment and verification diff --git a/typescript/sdk/src/index.ts b/typescript/sdk/src/index.ts index 1bbe8739a9..990f1df68f 100644 --- a/typescript/sdk/src/index.ts +++ b/typescript/sdk/src/index.ts @@ -645,5 +645,4 @@ export { WarpTypedTransaction, } from './warp/types.js'; export { WarpCore, WarpCoreOptions } from './warp/WarpCore.js'; - export { MailboxClientConfigSchema as mailboxClientConfigSchema } from './router/types.js'; diff --git a/typescript/sdk/src/providers/ProviderType.ts b/typescript/sdk/src/providers/ProviderType.ts index bc124ba7d9..bcf2e694c5 100644 --- a/typescript/sdk/src/providers/ProviderType.ts +++ b/typescript/sdk/src/providers/ProviderType.ts @@ -30,13 +30,13 @@ import { import { Annotated, ProtocolType } from '@hyperlane-xyz/utils'; export enum ProviderType { - ZkSync = 'zksync', EthersV5 = 'ethers-v5', Viem = 'viem', SolanaWeb3 = 'solana-web3', CosmJs = 'cosmjs', CosmJsWasm = 'cosmjs-wasm', GnosisTxBuilder = 'gnosis-txBuilder', + ZkSync = 'zksync', } export const PROTOCOL_TO_DEFAULT_PROVIDER_TYPE: Record< @@ -102,11 +102,6 @@ interface TypedProviderBase { provider: T; } -export interface ZKSyncProvider extends TypedProviderBase { - type: ProviderType.ZkSync; - provider: ZKSyncBaseProvider; -} - export interface EthersV5Provider extends TypedProviderBase { type: ProviderType.EthersV5; @@ -135,6 +130,11 @@ export interface CosmJsWasmProvider provider: Promise; } +export interface ZKSyncProvider extends TypedProviderBase { + type: ProviderType.ZkSync; + provider: ZKSyncBaseProvider; +} + export type TypedProvider = | EthersV5Provider // | EthersV6Provider @@ -153,10 +153,6 @@ interface TypedContractBase { contract: T; } -export interface ZKSyncContract extends TypedContractBase { - type: ProviderType.ZkSync; - contract: ZKSyncBaseContract; -} export interface EthersV5Contract extends TypedContractBase { type: ProviderType.EthersV5; contract: EV5Contract; @@ -185,6 +181,11 @@ export interface CosmJsWasmContract contract: CosmWasmContract; } +export interface ZKSyncContract extends TypedContractBase { + type: ProviderType.ZkSync; + contract: ZKSyncBaseContract; +} + export type TypedContract = | EthersV5Contract // | EthersV6Contract @@ -208,11 +209,6 @@ export interface EthersV5Transaction type: ProviderType.EthersV5; transaction: EV5Transaction; } -export interface ZKSyncTransaction - extends TypedTransactionBase { - type: ProviderType.ZkSync; - transaction: zkSyncTypes.TransactionRequest; -} export type AnnotatedEV5Transaction = Annotated; @@ -238,6 +234,12 @@ export interface CosmJsWasmTransaction transaction: ExecuteInstruction; } +export interface ZKSyncTransaction + extends TypedTransactionBase { + type: ProviderType.ZkSync; + transaction: zkSyncTypes.TransactionRequest; +} + export type TypedTransaction = | EthersV5Transaction // | EthersV6Transaction @@ -255,11 +257,6 @@ interface TypedTransactionReceiptBase { receipt: T; } -export interface ZKSyncTransactionReceipt - extends TypedTransactionReceiptBase { - type: ProviderType.ZkSync; - receipt: zkSyncTypes.TransactionReceipt; -} export interface EthersV5TransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.EthersV5; @@ -290,6 +287,12 @@ export interface CosmJsWasmTransactionReceipt receipt: DeliverTxResponse; } +export interface ZKSyncTransactionReceipt + extends TypedTransactionReceiptBase { + type: ProviderType.ZkSync; + receipt: zkSyncTypes.TransactionReceipt; +} + export type TypedTransactionReceipt = | EthersV5TransactionReceipt | ViemTransactionReceipt