hands-on lab

Smart Contracts Lab: Add a Guard Check Feature to Your Smart Contract

Beginner
Up to 1h
4
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

Smart contracts are self-executing agreements written in languages like Solidity and operate on blockchain networks, automating actions based on predefined rules. They eliminate intermediaries and enable transparent, tamper-proof, and peer-to-peer interactions. Decentralised finance (DeFi), non-fungible tokens (NFTs), decentralised exchanges (DEXs), and decentralised autonomous organisations (DAOs) are among the applications powered by smart contracts, reshaping industries and empowering individuals. Security is crucial, with developers focusing on audits and best practices to create robust and safe contracts. As smart contracts gain traction, they revolutionise systems, promote transparency, and herald a shift towards decentralised automation, transforming how we interact with technology and each other.

In this lab, you will continue working with ERC20 contract. Your task will be to extend current functionality with Guard Check to make sure only Smart Contract user can access certain functionality.

Learning objectives

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

  • Store the owner's address for this ERC20 contract. 
  • Set up a modifier that would only allow the owner to perform certain tasks. 

Intended audience

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

About the author

Avatar
QA, opens in a new tab
Training Provider
Students
54,079
Labs
189
Courses
2,713
Learning paths
51

A world-leading tech and digital skills organization, we help many of the world’s leading companies to build their tech and digital capabilities via our range of world-class training courses, reskilling bootcamps, work-based learning programs, and apprenticeships. We also create bespoke solutions, blending elements to meet specific client needs.

Lab steps

Add Guard Check To Smart Contract