
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
hardhat-deploy-ethers
Advanced tools
Hardhat plugin extension for @nomicfoundation/hardhat-ethers
and its integration with ethers.js.
The extension add support for hardhat-deploy.
hardhat-deploy-ethers
require the installation of hardhat-deploy
and @nomicfoundation/hardhat-ethers
Note that you cannot use @nomicfoundation/hardhat-toolbox
for installing @nomicfoundation/hardhat-ethers
as this interfere with the typing extensions provided by hardhat-deploy-ethers
npm install --save-dev @nomicfoundation/hardhat-ethers ethers hardhat-deploy hardhat-deploy-ethers
Which means you then add the following statement to your hardhat.config.js
:
require("@nomicfoundation/hardhat-ethers");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
Or, if you are using TypeScript, add this to your hardhat.config.ts
:
import '@nomicfoundation/hardhat-ethers';
import 'hardhat-deploy';
import 'hardhat-deploy-ethers';
Note that if you were using @nomicfoundation/hardhat-toolbox
you can simply add the dependencies it added for you with
npm install --save-dev @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @typechain/hardhat hardhat-gas-reporter solidity-coverage
and add them to your hardhat.config.js
require('@nomicfoundation/hardhat-chai-matchers');
require('@nomicfoundation/hardhat-ethers');
require('@typechain/hardhat');
require('hardhat-gas-reporter');
require('solidity-coverage');
or hardhat.config.ts (typescript)
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomicfoundation/hardhat-ethers';
import '@typechain/hardhat';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
This plugin creates no additional tasks.
This object has add some extra hardhat-deploy
specific functionalities to the hre.ethers
added already by @nomicfoundation/hardhat-ethers
These helpers are added to the ethers
object:
interface HardhatEthersHelpers {
getContractAtWithSignerAddress: <ContractType extends ethers.BaseContract = ethers.BaseContract>(nameOrAbi: string | any[], address: string, signer: string) => Promise<ContractType>;
getSignerOrNull: (address: string) => Promise<SignerWithAddress | null>;
getNamedSigners: () => Promise<Record<string, SignerWithAddress>>;
getNamedSigner: (name: string) => Promise<SignerWithAddress>;
getNamedSignerOrNull: (name: string) => Promise<SignerWithAddress | null>;
getUnnamedSigners: () => Promise<SignerWithAddress[]>;
getContract: <ContractType extends ethers.BaseContract = ethers.BaseContract>(name: string, signer?: ethers.Signer | string) => Promise<ContractType>;
getContractOrNull: <ContractType extends ethers.BaseContract = ethers.BaseContract>(name: string, signer?: ethers.Signer | string) => Promise<ContractType | null>;
}
There are no additional steps you need to take for this plugin to work.
It automatically integrate with the hardhat-deploy
plugin if detected and let you do the following:
const contract = await hre.ethers.getContract('<deploymentName>');
FAQs
Hardhat TypeScript plugin boilerplate
The npm package hardhat-deploy-ethers receives a total of 36,851 weekly downloads. As such, hardhat-deploy-ethers popularity was classified as popular.
We found that hardhat-deploy-ethers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.