Hardhat 3 Plugin · Open Source · Free

hardhat-blockhertz

AI-powered smart contract security auditor for Hardhat. Automatically finds vulnerabilities before deployment.

$npm install hardhat-blockhertz

Blockhertz Hardhat Plugin integrates AI-powered smart contract security auditing directly into your Hardhat development workflow. Run automated vulnerability scans on every compile or test — catching reentrancy, integer overflow, access control issues, and more before deployment. Supports Solidity and works with Ethereum, Polygon, Base, Arbitrum, and other EVM networks. Free to use, no signup required.

0.3.1

Current Version

Free

Forever

MIT

License

Hardhat 3

Compatible

How It Works

Three commands from install to a passing build.

1
Step 1

Install

npm install hardhat-blockhertz

Add plugin to hardhat.config.ts

2
Step 2

Run

npx hardhat blockhertz-audit

Plugin scans all .sol files

3
Step 3

Fix

Review findings by severity

Fix issues before deployment

What hardhat-blockhertz Detects

Six vulnerability classes across the OWASP smart-contract top-10 plus gas hygiene.

🔴

Reentrancy Attacks

Detects CEI pattern violations and unprotected external calls

🔴

Access Control Failures

Finds missing modifiers and unprotected privileged functions

🟡

Oracle Manipulation

Identifies spot price oracle usage vulnerable to flash loans

🟡

Integer Overflow

Flags unsafe math operations outside Solidity 0.8+

🟢

Gas Optimizations

Suggests storage, loop and memory usage improvements

🔵

Missing Validations

Catches zero address checks, input validation gaps and more

Quick Start

Copy the snippets below, run three commands, done.

npm install hardhat-blockhertz

Configure Sensitivity

The failOn option controls when the plugin fails your build.

ValueBehaviorBest For
"critical"Fail on critical onlyProduction quick check
"high"Fail on high + criticalRecommended default
"medium"Fail on medium and aboveStrict security
"none"Never fail buildAudit-only mode

Works in CI/CD Pipelines

Add security auditing to every pull request. Blocks merges when critical vulnerabilities are found.

GitHub Actions.github/workflows/audit.yml
# --yes skips the interactive prompt in non-TTY CI environments
- name: Security Audit
  run: npx hardhat blockhertz-audit --yes
  env:
    BLOCKHERTZ_API_KEY: ${{ secrets.BLOCKHERTZ_API_KEY }}

Resources

Transparent Pricing

Free Plugin. Pay Per Audit.

hardhat-blockhertz is free and open-source. Audits consume Blockhertz API credits.

Free

$0

Get Started

  • Plugin free forever
  • Free credits on signup
  • 20 audits/hour rate limit
  • All vulnerability classes
Get Free API Key

Starter

$19

One-time

  • 5 audit credits
  • 50 audits/hour rate limit
  • Perfect for small projects
  • No subscription
Buy Starter Pack
Best for CI/CD

Unlimited

$99/mo

Per month

  • Unlimited audit credits
  • 200 audits/hour rate limit
  • Perfect for teams + pipelines
  • Priority support
Go Unlimited

Each npx hardhat blockhertz-audit run on one contract = 1 credit. Free API key at blockhertz.com/tools/dashboard/api-keys.

Start auditing your contracts

Get your free API key and install hardhat-blockhertz in 30 seconds.

Get Free API Key

FAQ

Frequently Asked Questions

What is hardhat-blockhertz?+

hardhat-blockhertz is a free open-source Hardhat 3 plugin that automatically audits Solidity smart contracts for security vulnerabilities using the Blockhertz AI Security API. Install with `npm install hardhat-blockhertz`, add it to your hardhat.config.ts plugins array, and run `npx hardhat blockhertz-audit`.

Is hardhat-blockhertz free?+

Yes. The hardhat-blockhertz plugin is MIT-licensed and free to install from npm. It uses the Blockhertz AI Security API — free-tier API keys include up to 3 audits per day. Create a free API key at blockhertz.com/tools/dashboard/api-keys.

What vulnerabilities does hardhat-blockhertz detect?+

hardhat-blockhertz detects six classes of smart contract issues: reentrancy attacks, access control failures, oracle manipulation, integer overflow, missing input validations, and gas optimization opportunities. Each finding is tagged with a severity (critical, high, medium, info) so you can fail the build on the threshold you choose.

How do I configure which issues fail my build?+

Use the `failOn` option in hardhat.config.ts under the `blockhertz` config object. Values: "critical" fails on critical findings only, "high" fails on high + critical (recommended default), "medium" fails on medium and above (strict), or "none" never fails the build (audit-only).

Does hardhat-blockhertz work in CI/CD pipelines?+

Yes. Add `npx hardhat blockhertz-audit --yes` to your GitHub Actions, GitLab CI, or any CI pipeline. The `--yes` flag skips the interactive confirmation prompt. Set BLOCKHERTZ_API_KEY as a secret and the plugin blocks merges when critical vulnerabilities are found.

Which Hardhat and Node.js versions does hardhat-blockhertz support?+

hardhat-blockhertz is compatible with Hardhat 3 and requires Node.js 22 or higher. See the full documentation at blockhertz.com/tools/hardhat-plugin/docs for install prerequisites and troubleshooting.

Does the Hardhat plugin work in CI/CD pipelines?+

Yes. The plugin integrates with GitHub Actions, GitLab CI, and other CI/CD systems. Configure failOn to block deployments when Critical or High vulnerabilities are detected.

Is the Hardhat plugin free?+

Yes. The plugin is free and open source. It uses your Blockhertz API key — free tier included, no credit card required.