Skip to content

A simple and easy to use template for setting up new solidity projects.

License

Notifications You must be signed in to change notification settings

0xdavinchee/hardhat-ts-template

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Hardhat TypeScript Template

A simple hardhat template.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

A simple hardhat template modeled off of running npx hardhat init.

This project includes:

  • hardhat-deploy: this is a powerful plugin for deployment and testing, allows you to utilize your deploy for testing and makes it easy to deploy to live networks. Also includes neat features like dependencies (allows handling the case where one deployment is dependent on another).
  • hardhat-prettier: a plugin that makes it easy to format solidity files based on rules set in .prettierrc.
    • npx hardhat format
  • hardhat-typechain: a plugin that generates typings files for use in test files and possibly even on the front-end.
  • solidity-coverage: a plugin that generates a coverage report on how much of your code has been tested.
    • npx hardhat coverage

The deploy script and test files have been modified to work in a way that takes full advantage of the features which hardhat-deploy offers.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You just need to have npm to use this project.

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/0xdavinchee/hardhat-ts-template.git
  2. Install NPM packages
    yarn install

Usage

To run tests, first compile the project with yarn compile and then yarn test. If you would like to deploy your project, use yarn deploy --network <NETWORK>. Keep in mind, you must add this network to the hardhat.config.ts file with the necessary information for this to work.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

0xdavinchee - @0xdavinchee - [email protected]

Project Link: https://github.com/0xdavinchee/hardhat-ts-template

Acknowledgements

About

A simple and easy to use template for setting up new solidity projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published