Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
buidler-ethers-v5
Advanced tools
Buidler plugin for integration with ethers.js version 5.
This plugin brings to Buidler the Ethereum library ethers.js
, version 5, which allows you to interact with the Ethereum blockchain in a simple way.
it is in based on the existing effort by @nomicalbas : @nomiclabas/buidler-ethers
npm install --save-dev buidler-ethers-v5 ethers
And add the following statement to your buidler.config.js
:
usePlugin("buidler-ethers-v5");
This plugin creates no additional tasks.
This plugins adds an ethers
object to the Buidler Runtime Environment.
This object has add some extra Buidler-specific functionality.
But contrary to @nomiclabas/buidler-ethers
it does not add ethers field that can already be accessed via the ethers library itself as import
A provider
field is added to ethers
, which is an ethers.providers.Provider
automatically connected to the selected network.
These helpers are added to the ethers
object:
function getContractFactory(name: string, signer?: ethers.Signer | string): Promise<ethers.ContractFactory>;
function getContractFactory(abi: any[], bytecode: ethers.BytesLike, | string, signer?: ethers.Signer | string): Promise<ethers.ContractFactory>;
function getContractAt(nameOrAbi: string | any[], address: string, signer?: ethers.Signer | string): Promise<ethers.Contract>;
function getSigners() => Promise<ethers.Signer[]>;
function getSigner(address: string) => Promise<ethers.Signer>;
function getContract(deploymentName: string, signer?: ethers.Signer | string): Promise<ethers.Contract>;
The Contract
s and ContractFactory
s returned by these helpers are connected to the first signer returned by getSigners
be default.
There are no additional steps you need to take for this plugin to work.
Install it and access ethers through the Buidler Runtime Environment anywhere you need it (tasks, scripts, tests, etc). For example, in your buidler.config.js
:
It also automatically integrate with the buidler-deploy
plugin if detected
...
const contract await bre.ethers.getContract('<deploymentName>');
...
You need to add this to your tsconfig.json
's files
array: "node_modules/buidler-ethers-v5/src/type-extensions.d.ts"
FAQs
Buidler plugin for ethers v5
The npm package buidler-ethers-v5 receives a total of 1 weekly downloads. As such, buidler-ethers-v5 popularity was classified as not popular.
We found that buidler-ethers-v5 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.