
Security News
GitHub Actions Supply Chain Attack Puts Thousands of Projects at Risk
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
@nomiclabs/hardhat-truffle5
Advanced tools
Hardhat plugin for integration with TruffleContract from Truffle 5. This allows tests and scripts written for Truffle to work with Hardhat.
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.
This plugin requires hardhat-web3 as a prerequisite.
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";
This plugin creates no additional tasks.
An instance of TruffleEnvironmentArtifacts
is injected into env.artifacts
and the method contract()
is injected into the global scope for using in tests.
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.
FAQs
Truffle 5 Hardhat compatibility plugin
The npm package @nomiclabs/hardhat-truffle5 receives a total of 4,577 weekly downloads. As such, @nomiclabs/hardhat-truffle5 popularity was classified as popular.
We found that @nomiclabs/hardhat-truffle5 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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.
Security News
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
Research
Security News
A malicious Maven package typosquatting a popular library is secretly stealing OAuth credentials on the 15th of each month, putting Java developers at risk.
Security News
Socket and Seal Security collaborate to fix a critical npm overrides bug, resolving a three-year security issue in the JavaScript ecosystem's most popular package manager.