Files
web/apps/base-docs/tutorials/docs/4_hardhat-profiling-gas.md
Brian Doyle c3f4ea25de Swap typescript Code Blocks to tsx (#597)
* Start

* Switch typescript code blocks to tsx
2024-06-25 14:48:43 -04:00

20 KiB

title, slug, description, author, keywords, tags, difficulty, hide_table_of_contents, displayed_sidebar
title slug description author keywords tags difficulty hide_table_of_contents displayed_sidebar
Hardhat: Optimizing the gas usage of smart contracts /hardhat-profiling-gas A tutorial that teaches how to optimize the gas usage of your smart contracts using Hardhat. Edson Alcala and Brian Doyle
Hardhat
gas optimization
gas usage
gas profiling
Hardhat Gas Reporter plugin
smart contract development
cost savings
contract optimization
gas-efficient contracts
smart contracts
beginner false null

In this tutorial, you'll learn how to profile and optimize your smart contract's gas usage with Hardhat and the Hardhat Gas Reporter plugin.


Objectives

By the end of this tutorial you should be able to:

  • Use the Hardhat Gas Reporter plugin to profile gas usage
  • Describe common strategies for improving the gas usage of a contract

Overview

In the world of smart contract development, optimizing the gas consumption of your smart contracts is important. Smaller contracts consume fewer gas resources during deployment and execution, resulting in significant cost savings for your users. In this tutorial, you will leverage the Hardhat Gas Reporter plugin to help you analyze and optimize your smart contract's gas usage.

The following provides further information about smart contract profiling and gas optimization.

Setting up the Hardhat Gas Reporter plugin