@nomicfoundation/hardhat-verify
Version:
Hardhat plugin for verifying contracts
34 lines • 1.81 kB
TypeScript
import type { VerificationProvider, BaseVerifyFunctionArgs, CreateSourcifyOptions, ResolveConfigOptions } from "./types.js";
import type { Dispatcher, DispatcherOptions } from "@nomicfoundation/hardhat-utils/request";
import type { ChainDescriptorsConfig, VerificationProvidersConfig } from "hardhat/types/config";
export declare const SOURCIFY_PROVIDER_NAME: keyof VerificationProvidersConfig;
export declare const SOURCIFY_API_URL = "https://sourcify.dev/server";
export interface SourcifyVerifyFunctionArgs extends BaseVerifyFunctionArgs {
creationTxHash?: string;
}
export declare class Sourcify implements VerificationProvider {
readonly chainId: string;
readonly name: string;
readonly url: string;
readonly apiUrl: string;
readonly dispatcherOrDispatcherOptions?: Dispatcher | DispatcherOptions;
readonly pollingIntervalMs: number;
static resolveConfig({ chainId, verificationProvidersConfig, dispatcher, }: ResolveConfigOptions): Promise<CreateSourcifyOptions>;
static create({ verificationProviderConfig, chainId, dispatcher, }: CreateSourcifyOptions): Promise<Sourcify>;
static getSupportedChains(): Promise<ChainDescriptorsConfig>;
constructor(sourcifyConfig: {
chainId: number;
name?: string;
apiUrl?: string;
dispatcher?: Dispatcher;
});
getContractUrl(address: string): string;
getVerificationJobUrl(guid: string): string;
isVerified(address: string): Promise<boolean>;
verify({ contractAddress, compilerInput, contractName, compilerVersion, creationTxHash, }: SourcifyVerifyFunctionArgs): Promise<string>;
pollVerificationStatus(guid: string, contractAddress: string, contractName: string): Promise<{
success: boolean;
message: string;
}>;
}
//# sourceMappingURL=sourcify.d.ts.map