ACP-267: Primary Network validator uptime requirement increases from 80% to 90%.Read the proposal
Hardhat

Hardhat

Hardhat is a development environment for building, testing, and deploying smart contracts on Avalanche and other Ethereum-compatible networks.

Back

Overview

Hardhat is a development environment for building, testing, and deploying smart contracts. Developed by Nomic Labs, it supports Ethereum and Ethereum-compatible networks like Avalanche. It includes tools for local blockchain testing, debugging, and automated deployment.

Features

  • Local Blockchain Network: Built-in local Ethereum network for rapid testing before deploying to public networks.
  • Testing Framework: Unit tests and integration tests with advanced debugging features.
  • Extensible Plugins: Plugin system for custom features and integrations.
  • Avalanche Integration: Configure Hardhat to deploy and interact with Avalanche smart contracts.
  • Automated Deployment: Tools for managing and automating deployment scripts.

Getting Started

  1. Install Hardhat: Visit the Hardhat website and install via npm with npm install --save-dev hardhat.
  2. Set Up a New Project: Initialize a new Hardhat project by running npx hardhat and follow the prompts to configure your project.
  3. Configure Avalanche Network: Update your Hardhat configuration file (hardhat.config.js) to include settings for the Avalanche network.
  4. Write and Test Contracts: Develop and test your smart contracts using Hardhat’s built-in testing framework.
  5. Deploy Contracts: Use Hardhat’s deployment tools to deploy your contracts to Avalanche or other Ethereum-compatible networks.

Documentation

For more details, visit the Hardhat Documentation.

Use Cases

  • Smart Contract Development: Develop, test, and deploy smart contracts.
  • Decentralized Finance (DeFi): Build and deploy DeFi applications on Avalanche or other Ethereum-compatible networks.
  • NFT Projects: Create and manage NFT smart contracts with Hardhat’s tools.
  • Blockchain Prototypes: Rapidly prototype and test blockchain applications using Hardhat’s local network.

Is this guide helpful?

Developer:

Nomic Labs

Categories:

Developer Tooling

Available For:

C-Chain
All Avalanche L1s

Website:

https://hardhat.org/

Documentation:

https://hardhat.org/getting-started/