Socket
Socket
Sign inDemoInstall

@nomicfoundation/hardhat-ethers

Package Overview
Dependencies
Maintainers
3
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.3 to 3.0.4

21

.eslintrc.js

@@ -0,1 +1,5 @@

const {
slowImportsCommonIgnoredModules,
} = require("../../config/eslint/constants");
module.exports = {

@@ -8,4 +12,17 @@ extends: [`${__dirname}/../../config/eslint/eslintrc.js`],

rules: {
"@typescript-eslint/no-non-null-assertion": "error"
}
"@typescript-eslint/no-non-null-assertion": "error",
},
overrides: [
{
files: ["src/internal/index.ts"],
rules: {
"@nomicfoundation/slow-imports/no-top-level-external-import": [
"error",
{
ignoreModules: [...slowImportsCommonIgnoredModules],
},
],
},
},
],
};

17

internal/hardhat-ethers-provider.js

@@ -730,3 +730,3 @@ "use strict";

});
const eventLog = eventLogs.find((e) => {
const matchingLogs = eventLogs.filter((e) => {
if (event.address !== undefined && e.address !== event.address) {

@@ -737,3 +737,7 @@ return false;

const topicsToMatch = event.topics;
if (e.topics.every((topic, i) => {
// the array of topics to match can be smaller than the actual
// array of topics; in that case only those first topics are
// checked
const topics = e.topics.slice(0, topicsToMatch.length);
const topicsMatch = topics.every((topic, i) => {
const topicToMatch = topicsToMatch[i];

@@ -747,10 +751,9 @@ if (topicToMatch === null) {

return topicToMatch.includes(topic);
})) {
return true;
}
});
return topicsMatch;
}
return true;
});
if (eventLog !== undefined) {
listener(eventLog);
for (const matchingLog of matchingLogs) {
listener(matchingLog);
}

@@ -757,0 +760,0 @@ };

@@ -5,3 +5,2 @@ "use strict";

const plugins_1 = require("hardhat/plugins");
const hardhat_ethers_provider_1 = require("./hardhat-ethers-provider");
const helpers_1 = require("./helpers");

@@ -12,3 +11,4 @@ require("./type-extensions");

const { ethers } = require("ethers");
const provider = new hardhat_ethers_provider_1.HardhatEthersProvider(hre.network.provider, hre.network.name);
const { HardhatEthersProvider } = require("./hardhat-ethers-provider");
const provider = new HardhatEthersProvider(hre.network.provider, hre.network.name);
return {

@@ -15,0 +15,0 @@ ...ethers,

{
"name": "@nomicfoundation/hardhat-ethers",
"version": "3.0.3",
"version": "3.0.4",
"description": "Hardhat plugin for ethers",

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

"@types/mocha": ">=9.1.0",
"@types/node": "^14.0.0",
"@types/node": "^16.0.0",
"@types/sinon": "^9.0.8",
"@typescript-eslint/eslint-plugin": "5.53.0",
"@typescript-eslint/parser": "5.53.0",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chalk": "^2.4.2",
"eslint": "^7.29.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.24.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-no-only-tests": "3.0.0",

@@ -61,0 +61,0 @@ "eslint-plugin-prettier": "3.4.0",

@@ -1074,3 +1074,3 @@ import type {

const eventLog = eventLogs.find((e) => {
const matchingLogs = eventLogs.filter((e) => {
if (event.address !== undefined && e.address !== event.address) {

@@ -1081,18 +1081,21 @@ return false;

const topicsToMatch = event.topics;
if (
e.topics.every((topic, i) => {
const topicToMatch = topicsToMatch[i];
if (topicToMatch === null) {
return true;
}
// the array of topics to match can be smaller than the actual
// array of topics; in that case only those first topics are
// checked
const topics = e.topics.slice(0, topicsToMatch.length);
if (typeof topicToMatch === "string") {
return topic === topicsToMatch[i];
}
const topicsMatch = topics.every((topic, i) => {
const topicToMatch = topicsToMatch[i];
if (topicToMatch === null) {
return true;
}
return topicToMatch.includes(topic);
})
) {
return true;
}
if (typeof topicToMatch === "string") {
return topic === topicsToMatch[i];
}
return topicToMatch.includes(topic);
});
return topicsMatch;
}

@@ -1103,4 +1106,4 @@

if (eventLog !== undefined) {
listener(eventLog);
for (const matchingLog of matchingLogs) {
listener(matchingLog);
}

@@ -1107,0 +1110,0 @@ };

import type EthersT from "ethers";
import type { HardhatEthersProvider as HardhatEthersProviderT } from "./hardhat-ethers-provider";

@@ -6,3 +7,2 @@ import { extendEnvironment } from "hardhat/config";

import { HardhatEthersProvider } from "./hardhat-ethers-provider";
import {

@@ -23,2 +23,5 @@ getContractAt,

const { ethers } = require("ethers") as typeof EthersT;
const { HardhatEthersProvider } = require("./hardhat-ethers-provider") as {
HardhatEthersProvider: typeof HardhatEthersProviderT;
};

@@ -25,0 +28,0 @@ const provider = new HardhatEthersProvider(

Sorry, the diff of this file is not supported yet

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