Updated: September 20, 2023

Mad Devs Hardhat Boilerplate Project

Pavel Zverev.

Pavel Zverev

CCO, Software Engineer

Oleg Puzanov.

Oleg Puzanov

CSO

Blockchain

The demand for blockchain-based applications has skyrocketed as the world increasingly embraces digitalization. Ethereum has emerged as one of the preferred blockchain platforms for building decentralized apps (dApps) and smart contracts.

However, creating smart contracts on Ethereum and other EVM-compatible blockchains is not an easy task, and setting up a development kit can be a hassle for many developers. This is where a pre-configured HardHat Ethereum development environment comes in handy - github.com/maddevsio/hardhat-mad-boiler.

This article presents a pre-made HardHat Ethereum development platform that is already equipped with extra utilities to allow for an effortless and streamlined experience in building smart contracts. Whether you are a seasoned Ethereum engineer or a newcomer, this kit will assist you in initiating your smart-contract development promptly and effectively.

So let’s explore how to work with a ready-to-use pre-configured HardHat Ethereum setup by Mad Devs with additional tools for smart-contract development. Here you will explore:

What is Hardhat Mad Boiler?

Hardhat Ethereum is an effective tool for building and testing smart contracts. However, even experienced programmers may face some common challenges while working with HardHat. Here are some frequent issues based on search results:

It is important to note that while some of these issues can be frustrating, the HardHat community is known for being supportive and active in helping developers overcome any challenges they face.

The boilerplate includes a ready-to-use development environment with HardHat, a tool for creating and testing smart contracts, and its installed plugins. It also includes prebuilt smart contracts, automated tests, and scripts to help with deployment.

In the future, we plan to add a frontend interface based on React.js with Web3 and Ethers integrations, making it easy to develop a complete dApp with both a frontend and a backend. The boilerplate also includes a range of pre-installed front-end libraries, including Bootstrap and Font Awesome, that can be used to speed up the development of the user interface.

Ultimately, the hardhat-mad-boiler boilerplate provides initiators Ethereum with a comprehensive starting point for setting up a workspace quickly and coding their dApps.

What are the benefits of Hardhat Mad Boiler?

One of the key features is its extensive list of additional tools designed to enhance efficiency and ease of smart-contract development. These tools include the following:

In general, boilerplate code has many advantages and can be a valuable tool for getting better results and enhancing development efficiency.

What’s included in a Hardhat Mad Boiler?

Now let’s learn about dependencies and IDE extensions of this boilerplate. 

Dependencies

This project template relies on the following notable dependencies:

IDE extensions

We recommend using Visual Studio Code IDE alongside with following extensions to enhance the development experience:

Create the project, init it, and configure Hardhat

Open your terminal, and let’s go.

  1. Preinstall NodeJS of compatible version. If there is a need to run different NodeJS versions, consider using NVM or a similar tool for your platform.
nvm install
nvm use
node --version
npm --version
  1. Create a new repository using this template.
  2. Clone the newly created repository and switch to its directory.
  3. Install dependencies: npm install
  4. Install Visual Studio Code IDE and extensions.
  5. Tune settings according to your personal preference and start your development.

Key takeaways that Hardhat Mad Boiler offers

Many of the problems in smart-contracts projects stem from the root cause. While programmers can code for Solidity and work with smart contracts, they may not always know how to write tests, organize the infrastructure around them, or prioritize the scripts they write.

Recently, there have been many economists and financiers in the Blockchain industry who know what to do but few software engineers who understand how to execute it.

Our boiler was created by engineers for financiers and other professionals who enter the blockchain and know what they want to accomplish. And to address the question "How can it be done without errors?" — we have created our boiler, which solves the following tasks:

If you want to use hardhat-mad-boiler for your next project, you can start by creating your own GitHub project from the provided template. From there, you can customize your setup to meet your specific needs and start building your Ethereum-based smart contracts immediately.

Overall, hardhat-mad-boiler is a comprehensive tool that provides an easy-to-use and efficient development workspace for building Ethereum-based smart contracts. Its extensive list of additional tools and integrations makes it a great choice among developers looking to streamline their smart-contract evolving process.

Comparison with existing analog boilers

Although there is no direct comparison of analog boilerplates in the software development industry, various tools exist for specific frameworks and libraries widely used across different projects. Let's review some of the most popular ready-to-use analog boilerplates.

Boilerplates Mad Devs Hardhat Ethereum Hardhat Boilerplate
Purpose For Ethereum developers For Ethereum developers
Features
  • Preconfigured HardHat development environment.
  • Additional tools for smart-contract development (linters, code formatters, suggested IDE plugins, coverage tool).
  • Compatible with Solidity and other Ethereum languages.
  • TypeScript is used for developing tests, scripts, and tasks.
  • Ready-to-use sample contracts are included.
  • Includes pre-written tests to help developers quickly verify the functionality of the sample smart-contract.
  • Support for running a local blockchain network for testing and development purposes.
  • Does not have an example frontend setup yet.
  • CI/CD option to run tests on pending pull requests.
  • Preconfigured HardHat development environment.
  • Default HardHat options for contract development and a test coverage tool added, but nothing else.
  • Compatible with Solidity and other Ethereum languages.
  • JavaScript is used for developing tests, scripts, and tasks.
  • Built-in deployment script for deploying the smart-contract to the local network.
  • Ready-to-use sample contracts are included.
  • Includes pre-written tests to help developers quickly verify the functionality of the sample smart-contract.
  • Support for running a local blockchain network for testing and development purposes.
  • Bundles an example frontend setup to interact with the sample contract (based on React framework).
  • Does not have CI/CD options yet.
Customizability It can be easily customized to fit specific needs. It can be easily customized to fit specific needs.

Conclusion

In conclusion, a ready-to-use preconfigured development environment like hardhat-mad-boiler can greatly simplify developing and deploying Ethereum smart-contracts. As we have seen, hardhat-mad-boiler provides a comprehensive suite of tools, making it an ideal choice for both experienced and beginner developers. By leveraging hardhat-mad-boiler features, developers can focus on writing high-quality code and building robust applications rather than spending valuable time configuring and maintaining development environments. Hardhat-mad-boiler is an excellent choice for anyone looking to streamline their Ethereum contract development workflow and maximize productivity.


FAQ

What is HardHat?

HardHat is a flexible and extensible task runner that helps you manage and automate the recurring tasks inherent to implementing smart contracts and dApps.

What is Hardhat Mad Boiler?

Hardhat-mad-boiler is a boilerplate repository for designing smart-contracts on the Ethereum blockchain using the Hardhat environment created by Mad Devs. It contains preconfigured settings and extensions for Ethereum development with Hardhat, including Prettier, TypeScript, and CI/CD initial pipeline code style formatting.

What do the analogs of Hardhat Mad Boiler exist?

Ethereum boilerplates provide a preconfigured environment for smart-contract development similar to hardhat-mad-boiler:

  • Create eth app is a tool that allows developers to create Ethereum-powered apps with one command. The tool generates a new project with pre-built configurations and templates, including a frontend made in React, to quickly set up the app. It also offers support for connecting to different wallets and testing environments. The repository contains the tool's source code, documentation, and examples to help users get started. 
  • Scaffold-ETH offers a preconfigured environment with HardHat, a frontend React app, and various tools and libraries.
  • Truffle boxes is another popular framework for Ethereum, which provides several preconfigured boxes that can be used to start smart-contract development quickly. These boxes come with various pre-built tools and libraries and can be customized to fit various use cases.
  • Brownie is a Python-based development framework for Ethereum smart contracts. Its Python API, built-in testing tools, and automated deployment to Ethereum simplify the process of building Ethereum-based smart contracts.
  • Foundry is a portable and modular toolkit for Ethereum applications written in Rust. Providing everything from contract compilation and deployment to testing, it makes Ethereum development more accessible.