New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hardhat-dependency-injector

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat-dependency-injector

Copy compiled Solidity bytecode directly from NPM dependencies

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Hardhat Dependency Injector

Copy compiled Solidity bytecode directly from the NPM dependencies.

Based on the Hardhat Dependency Compiler by Nick Barry

Problem / Motivation

Some Solidity npm packages provide already compiled smart contracts; some of these packages don't provide Solidity sources (for example Uniswap smart contracts); in many cases sources are not required, compiled versions are enough (for example in tests); in some cases already compiled contracts are required (for example when deploying Uniswap v2 infrastructure for testing purposes the exact match of the bytecode is required, which is possible to achieve only when using already compiled contracts)

Installation

npm install --save-dev hardhat-dependency-injector
# or
yarn add --dev hardhat-dependency-injector

Usage

Load plugin in the Hardhat config:

require("hardhat-dependency-injector");

Add configuration under the dependencyInjector key:

optiondescriptiondefault
pathsArray of compiled dependency paths to copy[]
dependencyInjector: {
    paths: [
        "@uniswap/v3-core/artifacts/contracts",
        "@uniswap/v3-periphery/artifacts/contracts",
    ],
}

Contributing

Please see the Contribution Guide document to get understanding on how to report issues, contribute to the source code, fix bugs, introduce new features, etc.

(c) 2023 Basil Gorin (c) 2024–2025 Lazy So[u]l

Keywords

hardhat

FAQs

Package last updated on 19 Sep 2025

Did you know?

Socket

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.

Install

Related posts