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

0.1.0

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
- name: Security Audit
  run: npx hardhat blockhertz-audit
  env:
    BLOCKHERTZ_API_KEY: ${{ secrets.BLOCKHERTZ_API_KEY }}

Resources

Start auditing your contracts

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

Get Free API Key