hands-on lab

Hardhat Lab: Smart Contract on a Local Network

Difficulty: Beginner
Duration: Up to 1 hour
Students: 16
Rating: 5/5
On average, students complete this lab in20m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Hardhat is an advanced development environment for Solidity smart contracts, offering a user-friendly command-line interface (CLI) and seamless integration with popular tools like TypeScript and JavaScript.  

With its comprehensive testing framework and plugin system, Hardhat enables efficient contract development, testing, and deployment on Ethereum and other compatible blockchains. It fosters a supportive community, making it accessible to developers of all levels, and empowering them to create innovative decentralised applications to contribute to the evolving blockchain landscape.  

This Lab will take you through steps needed to create a local Hardhat node. You will also deploy and interact with a smart contract on it. 

 

Learning objectives

Upon completion of this lab, you will be able to:

  • Create your in-memory network using Hardhat.
  • Use Hardhat to compile the Smart Contract.
  • Utilise Hardhat’s scripts to deploy your compiled Smart Contract to selected network.
  • Interact with the Smart Contract using the Hardhat console. 
  • Interact with the Smart Contract using Hardhat scripts.

Intended audience

  • Individuals studying software engineering.
  • Individuals who have an interest in crypto technologies.

 

Hands-on Lab UUID

Lab steps

0 of 4 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. Create Local In-memory Hardhat Node
  2. Deploy a Smart Contract
  3. Interact With a Smart Contract via Console
  4. Interact With a Smart Contract via the Script