@nomicfoundation/hardhat-ethers
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -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; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
230554
4195