Socket
Socket
Sign inDemoInstall

@nomiclabs/hardhat-truffle5

Package Overview
Dependencies
634
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nomiclabs/hardhat-truffle5

Truffle 5 Hardhat compatibility plugin


Version published
Weekly downloads
6.5K
decreased by-13.23%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

npm hardhat

hardhat-truffle5

Hardhat plugin for integration with TruffleContract from Truffle 5. This allows tests and scripts written for Truffle to work with Hardhat.

What

This plugin brings to Hardhat TruffleContracts from Truffle 5. With it you can call contract() and artifacts.require() like you normally would with Truffle. Interact with your contracts with a familiar API from tasks, scripts and tests.

Required plugins

This plugin requires hardhat-web3 as a prerequisite.

Installation

npm install --save-dev @nomiclabs/hardhat-truffle5 @nomiclabs/hardhat-web3 web3

And add the following statement to your hardhat.config.js:

require("@nomiclabs/hardhat-truffle5");

Or, if you are using TypeScript, add this to your hardhat.config.ts:

import "@nomiclabs/hardhat-truffle5";

Tasks

This plugin creates no additional tasks.

Environment extensions

An instance of TruffleEnvironmentArtifacts is injected into env.artifacts and the method contract() is injected into the global scope for using in tests.

Usage

There are no additional steps you need to take for this plugin to work. Install it, run npx hardhat test and your Truffle tests should run with no need to make any modifications.

Take a look at the testing guide for a tutorial using it.

Keywords

FAQs

Last updated on 02 Sep 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc