@nomiclabs/hardhat-truffle5
npm i @nomiclabs/hardhat-truffle5

@nomiclabs/hardhat-truffle5

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.

by NomicFoundation

2.0.6 (see all)License:MITTypeScript:Built-InCategories:Node.js Ethereum Smart Contract, Node.js Ethereum API
npm i @nomiclabs/hardhat-truffle5
Readme

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.

Downloads/wk

10.5K

GitHub Stars

2.6K

LAST COMMIT

NaNyrs ago

MAINTAINERS

4

CONTRIBUTORS

0

OPEN ISSUES

389

OPEN PRs

51
VersionTagPublished
2.0.6
latest
2mos ago
2.0.1-rc.0
rc
2yrs ago
No tutorials found
Add a tutorial