diff --git a/solidity/solidity/lib/foundry-zksync b/solidity/solidity/lib/foundry-zksync deleted file mode 160000 index 62418bb9c..000000000 --- a/solidity/solidity/lib/foundry-zksync +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62418bb9c0f62b1398a081f7d9cca4e977e0081b diff --git a/typescript/cli/src/deploy/utils.ts b/typescript/cli/src/deploy/utils.ts index 322da5ec0..9e50c43b6 100644 --- a/typescript/cli/src/deploy/utils.ts +++ b/typescript/cli/src/deploy/utils.ts @@ -48,8 +48,7 @@ export async function runPreflightChecksForChains({ const metadata = multiProvider.tryGetChainMetadata(chain); if (!metadata) throw new Error(`No chain config found for ${chain}`); if ( - metadata.protocol !== ProtocolType.Ethereum && - metadata.protocol !== ProtocolType.ZKSync + ![ProtocolType.ZKSync, ProtocolType.Ethereum].includes(metadata.protocol) ) throw new Error('Only Ethereum/ZKSync chains are supported for now'); } diff --git a/typescript/cli/src/hook/read.ts b/typescript/cli/src/hook/read.ts index 6f36875e2..861772bf0 100644 --- a/typescript/cli/src/hook/read.ts +++ b/typescript/cli/src/hook/read.ts @@ -21,8 +21,9 @@ export async function readHookConfig({ }): Promise { // TODO: refactor to supported chains function if ( - context.multiProvider.getProtocol(chain) === ProtocolType.Ethereum || - context.multiProvider.getProtocol(chain) === ProtocolType.ZKSync + [ProtocolType.ZKSync, ProtocolType.Ethereum].includes( + context.multiProvider.getProtocol(chain), + ) ) { const hookReader = new EvmHookReader(context.multiProvider, chain); const config = await hookReader.deriveHookConfig(address); diff --git a/typescript/sdk/src/contracts/contracts.ts b/typescript/sdk/src/contracts/contracts.ts index 021ca300d..c6b6a0069 100644 --- a/typescript/sdk/src/contracts/contracts.ts +++ b/typescript/sdk/src/contracts/contracts.ts @@ -244,10 +244,9 @@ export function appFromAddressesMapHelper( addressesMap, (chain, addresses) => { const metadata = multiProvider.getChainMetadata(chain); - if (metadata.protocol === ProtocolType.ZKSync) { - return addresses; - } - if (metadata.protocol === ProtocolType.Ethereum) { + if ( + [ProtocolType.ZKSync, ProtocolType.Ethereum].includes(metadata.protocol) + ) { return addresses; } return objMap( diff --git a/typescript/utils/src/addresses.ts b/typescript/utils/src/addresses.ts index d7e1e428f..90949c973 100644 --- a/typescript/utils/src/addresses.ts +++ b/typescript/utils/src/addresses.ts @@ -206,7 +206,7 @@ export function isValidTransactionHashCosmos(input: string) { } export function isValidTransactionHash(input: string, protocol: ProtocolType) { - if (protocol === ProtocolType.Ethereum || protocol === ProtocolType.ZKSync) { + if ([ProtocolType.Ethereum, ProtocolType.ZKSync].includes(protocol)) { return isValidTransactionHashEvm(input); } else if (protocol === ProtocolType.Sealevel) { return isValidTransactionHashSealevel(input);