UNPKG

@nomicfoundation/hardhat-viem

Version:
20 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = require("hardhat/config"); const clients_1 = require("./internal/clients"); const contracts_1 = require("./internal/contracts"); require("./internal/type-extensions"); require("./internal/tasks"); (0, config_1.extendEnvironment)((hre) => { const { provider } = hre.network; hre.viem = { getPublicClient: (publicClientConfig) => (0, clients_1.getPublicClient)(provider, publicClientConfig), getWalletClients: (walletClientConfig) => (0, clients_1.getWalletClients)(provider, walletClientConfig), getWalletClient: (address, walletClientConfig) => (0, clients_1.getWalletClient)(provider, address, walletClientConfig), getTestClient: (testClientConfig) => (0, clients_1.getTestClient)(provider, testClientConfig), deployContract: (contractName, constructorArgs, config) => (0, contracts_1.deployContract)(hre, contractName, constructorArgs, config), sendDeploymentTransaction: (contractName, constructorArgs, config) => (0, contracts_1.sendDeploymentTransaction)(hre, contractName, constructorArgs, config), getContractAt: (contractName, address, config) => (0, contracts_1.getContractAt)(hre, contractName, address, config), }; }); //# sourceMappingURL=index.js.map