UNPKG

@nomicfoundation/hardhat-verify

Version:
27 lines 1.4 kB
import type { InferredSolcVersion } from "./metadata.js"; import type { SolidityBuildProfileConfig } from "hardhat/types/config"; /** * Returns the list of Solidity compiler versions defined in the given config, * including any overrides. * * Validates that all versions are supported by the Etherscan API (i.e., >= 0.4.11). * Throws an error if any unsupported versions are found. * * @param config The Solidity build profile configuration, including compilers * and optional overrides. * @returns An array of validated Solidity compiler version strings. The array * may contain duplicates if the same version is specified in both * `compilers` and `overrides`. * @throws HardhatError if any version is not supported by Etherscan. */ export declare function resolveSupportedSolcVersions({ compilers, overrides, }: SolidityBuildProfileConfig): string[]; /** * Filters the given versions, returning only those compatible with the * `InferredSolcVersion` extracted from the deployed bytecode. * * @param versions An array of version strings (e.g. `["0.8.17", "0.4.25"]`). * @param inferred The version inferred from the deployed bytecode metadata. * @returns The subset of `versions` that fall within the inferred constraint. */ export declare function filterVersionsByInferred(versions: string[], inferred: InferredSolcVersion): string[]; //# sourceMappingURL=solc-versions.d.ts.map