From 831f8bbcd84378db2cfde1541a0c1f29181cb18f Mon Sep 17 00:00:00 2001 From: yivlad Date: Mon, 30 Dec 2024 23:41:52 +0100 Subject: [PATCH] Fix flag name --- packages/cli/src/plugins/blockExplorer.ts | 9 ++++++--- packages/cli/src/plugins/etherscan.ts | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/plugins/blockExplorer.ts b/packages/cli/src/plugins/blockExplorer.ts index 59917f28f0..de3bb0ee42 100644 --- a/packages/cli/src/plugins/blockExplorer.ts +++ b/packages/cli/src/plugins/blockExplorer.ts @@ -87,10 +87,10 @@ export type BlockExplorerConfig = { /** * Whether to try fetching the implementation address of the contract */ - tryFetchImplementation: true + tryFetchProxyImplementation: true } | { - tryFetchImplementation?: false + tryFetchProxyImplementation?: false } ) @@ -148,7 +148,10 @@ export function blockExplorer(config: BlockExplorerConfig) { const makeUrl = (address: Address) => `${baseUrl}?module=contract&action=getabi&address=${address}${apiKey ? `&apikey=${apiKey}` : ''}` - if ('tryFetchImplementation' in config && config.tryFetchImplementation) { + if ( + 'tryFetchProxyImplementation' in config && + config.tryFetchProxyImplementation + ) { const implementationAddress = await getImplementationAddress({ address: normalizedAddress, chainId: config.chainId, diff --git a/packages/cli/src/plugins/etherscan.ts b/packages/cli/src/plugins/etherscan.ts index 56007587c5..6f062fb1cc 100644 --- a/packages/cli/src/plugins/etherscan.ts +++ b/packages/cli/src/plugins/etherscan.ts @@ -84,9 +84,9 @@ export type EtherscanConfig = { */ contracts: Compute, 'abi'>>[] /** - * Whether to try fetching the implementation address of the contract + * Whether to try fetching proxy implementation address of the contract */ - tryFetchImplementation?: boolean | undefined + tryFetchProxyImplementation?: boolean | undefined } /** @@ -95,7 +95,7 @@ export type EtherscanConfig = { export function etherscan( config: EtherscanConfig, ) { - const { apiKey, cacheDuration, chainId, tryFetchImplementation } = config + const { apiKey, cacheDuration, chainId, tryFetchProxyImplementation } = config const contracts = config.contracts.map((x) => ({ ...x, @@ -120,6 +120,6 @@ export function etherscan( }, name: 'Etherscan', chainId, - tryFetchImplementation, + tryFetchProxyImplementation, }) }