From 35260d6c0b8446896402395d029f6669e24cec05 Mon Sep 17 00:00:00 2001 From: ljankovic-txfusion Date: Thu, 10 Oct 2024 17:14:50 +0200 Subject: [PATCH] minor refactor & cleanup --- solidity/tsconfig.json | 8 +------- typescript/sdk/src/core/HyperlaneRelayer.ts | 1 + typescript/sdk/src/deploy/proxy.ts | 10 ++++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/solidity/tsconfig.json b/solidity/tsconfig.json index 047b8a97c..e155ce74e 100644 --- a/solidity/tsconfig.json +++ b/solidity/tsconfig.json @@ -4,11 +4,5 @@ "outDir": "./dist", "rootDir": "./types" }, - "exclude": [ - "./test", - "hardhat.config.cts", - "zk-hardhat.config.cts", - "./dist", - "./zksync" - ] + "exclude": ["./test", "hardhat.config.cts", "zk-hardhat.config.cts", "./dist"] } diff --git a/typescript/sdk/src/core/HyperlaneRelayer.ts b/typescript/sdk/src/core/HyperlaneRelayer.ts index c9fd53719..27341a773 100644 --- a/typescript/sdk/src/core/HyperlaneRelayer.ts +++ b/typescript/sdk/src/core/HyperlaneRelayer.ts @@ -148,6 +148,7 @@ export class HyperlaneRelayer { return this.core.getProcessedReceipt(message); } + this.logger.debug({ message }, `Simulating recipient message handling`); await this.core.estimateHandle(message); // parallelizable because configs are on different chains diff --git a/typescript/sdk/src/deploy/proxy.ts b/typescript/sdk/src/deploy/proxy.ts index 5255e4090..6ab48fec1 100644 --- a/typescript/sdk/src/deploy/proxy.ts +++ b/typescript/sdk/src/deploy/proxy.ts @@ -3,6 +3,8 @@ import * as zk from 'zksync-ethers'; import { Address, eqAddress } from '@hyperlane-xyz/utils'; +type Provider = ethers.providers.Provider | zk.Provider; + export type UpgradeConfig = { timelock: { delay: number; @@ -15,7 +17,7 @@ export type UpgradeConfig = { }; export async function proxyImplementation( - provider: zk.Provider | ethers.providers.Provider, + provider: Provider, proxy: Address, ): Promise
{ // Hardcoded storage slot for implementation per EIP-1967 @@ -27,7 +29,7 @@ export async function proxyImplementation( } export async function isInitialized( - provider: zk.Provider | ethers.providers.Provider, + provider: Provider, contract: Address, ): Promise { // Using OZ's Initializable 4.9 which keeps it at the 0x0 slot @@ -39,7 +41,7 @@ export async function isInitialized( } export async function proxyAdmin( - provider: zk.Provider | ethers.providers.Provider, + provider: Provider, proxy: Address, ): Promise
{ // Hardcoded storage slot for admin per EIP-1967 @@ -62,7 +64,7 @@ export function proxyConstructorArgs( } export async function isProxy( - provider: zk.Provider | ethers.providers.Provider, + provider: Provider, proxy: Address, ): Promise { const admin = await proxyAdmin(provider, proxy);