UNPKG

hardhat

Version:

Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.

14 lines 896 B
import { assertHardhatInvariant } from "@nomicfoundation/hardhat-errors"; import { HardhatRuntimeEnvironmentImplementation } from "../../../core/hre.js"; import { GasAnalyticsManagerImplementation } from "../gas-analytics-manager.js"; export function getGasAnalyticsManager(hookContextOrHre) { assertHardhatInvariant("_gasAnalytics" in hookContextOrHre && hookContextOrHre._gasAnalytics instanceof GasAnalyticsManagerImplementation, "Expected _gasAnalytics to be an instance of GasAnalyticsManagerImplementation"); return hookContextOrHre._gasAnalytics; } export function setGasAnalyticsManager(hre, gasAnalyticsManager) { assertHardhatInvariant(hre instanceof HardhatRuntimeEnvironmentImplementation, "Expected HRE to be an instance of HardhatRuntimeEnvironmentImplementation"); hre._gasAnalytics = gasAnalyticsManager; } //# sourceMappingURL=accessors.js.map