hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
26 lines • 2.29 kB
TypeScript
import type { EdrNetworkAccountConfig, EdrNetworkAccountsConfig, ChainDescriptorsConfig, EdrNetworkForkingConfig, EdrNetworkMempoolConfig, EdrNetworkMiningConfig } from "../../../../../types/config.js";
import type { ChainType } from "../../../../../types/network.js";
import type { GasMeasurement } from "../../../gas-analytics/types.js";
import type { RpcDebugTraceOutput } from "../types/output.js";
import type { IntervalRange, DebugTraceResult, ChainOverride, ForkConfig, GasReport } from "@nomicfoundation/edr";
import { MineOrdering, OpHardfork, SpecId } from "@nomicfoundation/edr";
import { L1HardforkName, OpHardforkName } from "../types/hardfork.js";
export declare function edrL1HardforkToHardhatL1HardforkName(hardfork: SpecId): L1HardforkName;
export declare function edrOpHardforkToHardhatOpHardforkName(hardfork: OpHardfork): OpHardforkName;
export declare function hardhatHardforkToEdrSpecId(hardfork: string, chainType: ChainType): string;
export declare function hardhatMiningIntervalToEdrMiningInterval(config: EdrNetworkMiningConfig["interval"]): bigint | IntervalRange | undefined;
export declare function hardhatMempoolOrderToEdrMineOrdering(mempoolOrder: EdrNetworkMempoolConfig["order"]): MineOrdering;
export declare function edrRpcDebugTraceToHardhat(debugTraceResult: DebugTraceResult): RpcDebugTraceOutput;
export declare function hardhatAccountsToEdrOwnedAccounts(accounts: EdrNetworkAccountsConfig): Promise<Array<{
secretKey: string;
balance: bigint;
}>>;
export declare function normalizeEdrNetworkAccountsConfig(accounts: EdrNetworkAccountsConfig): Promise<EdrNetworkAccountConfig[]>;
export declare function hardhatChainDescriptorsToEdrChainOverrides(chainDescriptors: ChainDescriptorsConfig, chainType: ChainType): ChainOverride[];
export declare function hardhatForkingConfigToEdrForkConfig(forkingConfig: EdrNetworkForkingConfig | undefined, chainDescriptors: ChainDescriptorsConfig, chainType: ChainType): Promise<ForkConfig | undefined>;
/**
* Converts EDR's nested GasReport structure into a flat array of gas entries.
* Filters out reverted transactions.
*/
export declare function edrGasReportToHardhatGasMeasurements(gasReport: GasReport, excludedContractFqns?: string[]): GasMeasurement[];
//# sourceMappingURL=convert-to-edr.d.ts.map