Smart Contracts Lab: Add a Guard Check Feature to Your Smart Contract
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.