Socket
Socket
Sign inDemoInstall

@nomicfoundation/hardhat-ethers

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nomicfoundation/hardhat-ethers - npm Package Compare versions

Comparing version 3.0.6 to 3.0.7

12

internal/helpers.js

@@ -39,3 +39,13 @@ "use strict";

async function getSigners(hre) {
const accounts = await hre.ethers.provider.send("eth_accounts", []);
let accounts;
try {
accounts = await hre.ethers.provider.send("eth_accounts", []);
}
catch (error) {
if (error instanceof Error &&
/the method has been deprecated: eth_accounts/.test(error.message)) {
return [];
}
throw error;
}
const signersWithAddress = await Promise.all(accounts.map((account) => getSigner(hre, account)));

@@ -42,0 +52,0 @@ return signersWithAddress;

5

package.json
{
"name": "@nomicfoundation/hardhat-ethers",
"version": "3.0.6",
"version": "3.0.7",
"description": "Hardhat plugin for ethers",

@@ -65,3 +65,3 @@ "homepage": "https://github.com/nomicfoundation/hardhat/tree/main/packages/hardhat-ethers",

"ethers": "^6.1.0",
"hardhat": "^2.0.0"
"hardhat": "^2.22.92.0.0"
},

@@ -75,3 +75,2 @@ "scripts": {

"test": "mocha --recursive \"test/**/*.ts\" --exit",
"prebuild": "cd ../../crates/edr_napi && pnpm build",
"build": "tsc --build .",

@@ -78,0 +77,0 @@ "clean": "rimraf dist internal types *.{d.ts,js}{,.map} build-test tsconfig.tsbuildinfo"

@@ -43,4 +43,17 @@ import type { ethers as EthersT } from "ethers";

): Promise<HardhatEthersSigner[]> {
const accounts: string[] = await hre.ethers.provider.send("eth_accounts", []);
let accounts: string[];
try {
accounts = await hre.ethers.provider.send("eth_accounts", []);
} catch (error) {
if (
error instanceof Error &&
/the method has been deprecated: eth_accounts/.test(error.message)
) {
return [];
}
throw error;
}
const signersWithAddress = await Promise.all(

@@ -47,0 +60,0 @@ accounts.map((account) => getSigner(hre, account))

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc