Skip to content

Commit

Permalink
minor refactor & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ljankovic-txfusion committed Oct 10, 2024
1 parent be23123 commit 35260d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 1 addition & 7 deletions solidity/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
1 change: 1 addition & 0 deletions typescript/sdk/src/core/HyperlaneRelayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions typescript/sdk/src/deploy/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,7 +17,7 @@ export type UpgradeConfig = {
};

export async function proxyImplementation(
provider: zk.Provider | ethers.providers.Provider,
provider: Provider,
proxy: Address,
): Promise<Address> {
// Hardcoded storage slot for implementation per EIP-1967
Expand All @@ -27,7 +29,7 @@ export async function proxyImplementation(
}

export async function isInitialized(
provider: zk.Provider | ethers.providers.Provider,
provider: Provider,
contract: Address,
): Promise<boolean> {
// Using OZ's Initializable 4.9 which keeps it at the 0x0 slot
Expand All @@ -39,7 +41,7 @@ export async function isInitialized(
}

export async function proxyAdmin(
provider: zk.Provider | ethers.providers.Provider,
provider: Provider,
proxy: Address,
): Promise<Address> {
// Hardcoded storage slot for admin per EIP-1967
Expand All @@ -62,7 +64,7 @@ export function proxyConstructorArgs<C extends ethers.Contract>(
}

export async function isProxy(
provider: zk.Provider | ethers.providers.Provider,
provider: Provider,
proxy: Address,
): Promise<boolean> {
const admin = await proxyAdmin(provider, proxy);
Expand Down

0 comments on commit 35260d6

Please sign in to comment.