UNPKG

@tenderly/hardhat-integration

Version:

Hardhat plugin for integration with Tenderly

25 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UsernameOrProjectNotProvidedError = exports.UndefinedChainIdError = void 0; exports.throwIfUsernameOrProjectNotSet = throwIfUsernameOrProjectNotSet; class UndefinedChainIdError extends Error { constructor(networkName) { super(`Couldn't find chainId for the network: ${networkName}. \nPlease provide the chainId in the network config object`); } } exports.UndefinedChainIdError = UndefinedChainIdError; class UsernameOrProjectNotProvidedError extends Error { constructor() { super(`Please provide the username and project fields in the tenderly object in hardhat.config.js`); } } exports.UsernameOrProjectNotProvidedError = UsernameOrProjectNotProvidedError; async function throwIfUsernameOrProjectNotSet(hre) { if (hre.config.tenderly?.username === undefined) { throw new UsernameOrProjectNotProvidedError(); } if (hre.config.tenderly?.project === undefined) { throw new UsernameOrProjectNotProvidedError(); } } //# sourceMappingURL=errors.js.map