@nomiclabs - Hardhat Truffle4 NPM

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

29/01/2022, 02:40 @nomiclabs/hardhat-truffle4 - npm

Products Pricing Documentation Community

Sign Up Sign In

Search packages Search

@nomiclabs/hardhat-truffle4
2.0.3 • Public • Published 2 months ago

Readme

Explore BETA

5 Dependencies

0 Dependents

6 Versions

npm v2.0.3

hardhat-truffle4
Hardhat plugin for integration with TruffleContract from Truffle 4

What
This plugin brings to Hardhat TruffleContracts from Truffle 4. 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.

Additionally, you can migrate your contracts to Solidity 5 without needing to migrate your
tests to Truffle 5.

Required plugins
https://www.npmjs.com/package/@nomiclabs/hardhat-truffle4 1/5
29/01/2022, 02:40 @nomiclabs/hardhat-truffle4 - npm

This plugin requires hardhat-web3-legacy as a prerequisite.

Installation

npm install --save-dev @nomiclabs/hardhat-truffle4 @nomiclabs/hardhat-

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

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

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

import "@nomiclabs/hardhat-truffle4";

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.

Keywords

https://www.npmjs.com/package/@nomiclabs/hardhat-truffle4 2/5
29/01/2022, 02:40 @nomiclabs/hardhat-truffle4 - npm

ethereum smart-contracts hardhat hardhat-plugin truffle truffle-contract

Install

npm i @nomiclabs/hardhat-truffle4

Repository
github.com/nomiclabs/hardhat

Homepage
github.com/nomiclabs/hardhat/tree/master/packages/hardhat-truffle4

Weekly Downloads

32

Version License
2.0.3 MIT

Unpacked Size Total Files


75.6 kB 38

Issues Pull Requests


366 44

Last publish
2 months ago

Collaborators

https://www.npmjs.com/package/@nomiclabs/hardhat-truffle4 3/5
29/01/2022, 02:40 @nomiclabs/hardhat-truffle4 - npm

Try on RunKit

Report malware

Support

Help

Advisories

Status

Contact npm

Company

About

Blog

Press

Terms & Policies

https://www.npmjs.com/package/@nomiclabs/hardhat-truffle4 4/5
29/01/2022, 02:40 @nomiclabs/hardhat-truffle4 - npm

Policies

Terms of Use

Code of Conduct

Privacy

https://www.npmjs.com/package/@nomiclabs/hardhat-truffle4 5/5

You might also like