-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart Guide
Welcome to the core-hardhat-template quickstart guide! This template provides the hardhat configurations needed to deploy on Conflux Core blockchain. Follow the steps below to get started quickly.
Repository URL: https://github.com/cfxdevkit/core-hardhat-template
Before using the template locally, ensure you have the following installed on your system:
- Git: For cloning and managing the repository.
- VS Code: For local development.
- Docker: Required to run the preconfigured development environment locally.
Note: Using the template in Codespace don't require any prerequisites
This repository is a GitHub template, meaning you can easily create a new project based on it. Here's how:
- Navigate to the template repository: https://github.com/cfxdevkit/core-hardhat-template.
- Click the green Use this template button in the top-right corner of the page, next to the Watch, Fork, and Star buttons.
When you click Use this template, you'll see two options:
- Select this option to create a new repository in your GitHub account based on this template.
- Provide a name for your new repository and click Create repository from template.
- Once created, you can clone the repository or open it directly in VS Code or Codespaces.
- Select this option to immediately open the repository in GitHub Codespaces.
- A new Codespace will be created in your account with the preconfigured development environment ready to use.
If you prefer to work locally, follow these steps after creating a repository using the template:
-
Clone Your Repository
Open a terminal and run the following command to clone your new repository:git clone https://github.com/your-username/your-repository-name.git
-
Open in VS Code
Navigate to the repository directory:cd your-repository-nameThen, open the repository in VS Code:
code . -
Rebuild the Devcontainer (Optional)
If you have the Remote - Containers extension installed in VS Code, you can use the included devcontainer configuration:- Click Reopen in Container when prompted.
- Wait for the environment to build and start.
Once your environment is set up (either locally or in a Codespace), install the required dependencies by running the following command:
npm installAfter the installation is complete, you can use the hh command to access Hardhat functionalities with ease, including tab autocompletion for faster workflow.
You're now ready to start developing and deploying smart contracts on Conflux Core!
You are now ready to start creating your contracts with Hardhat!
Visit the Hardhat Guide for a quick introduction to Hardhat and a step-by-step guide to deploying your first contract.
Enjoy creating your project with the core-hardhat-template!