Skip to content
cfxdevkit edited this page Dec 18, 2024 · 1 revision

Welcome to the eSpace Hardhat Template Wiki!

The espace-hardhat-template builds upon the repository-template with a focus on integrating Hardhat for smart contract development and deployment on the Conflux eSpace blockchain.

This template adds functionality to streamline your blockchain development process while retaining flexibility for customizations.


What's Included?

Hardhat Integration

  • Hardhat Ignition configured with viem, providing a modern and flexible interface for interacting with smart contracts.
  • Mnemonic Management: The development mnemonic is managed directly by the Hardhat configuration for seamless local testing.
  • Predefined custom tasks in Hardhat, including:
    • node: Launch a local Conflux blockchain node.
    • accounts: List configured accounts.
    • balance: Show the balance of accounts.

CLI Utility

  • Access to the devkit CLI utility for starting and managing a local Conflux blockchain node.
  • The environment is pre-configured to use the development mnemonic with the local node.

Developer Experience Enhancements

  • hh Command: Hardhat CLI is aliased to hh for quick access to commands.
  • Tab Autocomplete: Tab-completion for Hardhat commands to improve development efficiency.

What This Template Is (and Isn't)

What It Is:

  • A fully-configured environment for building, testing, and deploying smart contracts with Hardhat on the Conflux eSpace blockchain.
  • A powerful starting point for projects in JavaScript or TypeScript that interact with blockchain networks.

What It Isn't:

  • A complete solution for all blockchain use cases—this template provides the base tools and flexibility to customize your project.

Why Use This Template?

The espace-hardhat-template is perfect for:

  • Smart Contract Developers: Preconfigured tools for Hardhat make it easy to deploy and test contracts.
  • eSpace Blockchain Projects: Simplified setup for interacting with Conflux eSpace nodes.
  • Rapid Prototyping: Tab-completion, CLI utilities, and preconfigured tasks enable faster iteration cycles.

Next Steps

Get started with the Quickstart-Guide to set up your environment and start building on Conflux eSpace today!