Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Crypto Zombies Lesson 2, Chapter 3 Msg.sender, Solidity Language
Play lesson

Crypto Zombies Tutorial (Intro to Solidity) - Crypto Zombies Lesson 2, Chapter 3 Msg.sender, Solidity Language

4.0 (3)
22 learners

What you'll learn

This course includes

  • 1.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this Crypto Zombie Solidity chapter we begin to look at Msg.sender. In Solidity we have access to specific global variables within all our functions. Msg.sender always represents the address of the smart contract (external caller) who called the function. The msg.sender Solidity concept should be understood to continue advancing in this tutorial but the key concepte is the idea that a smart contract will sit on the blockchain waiting to be called by one of its own functions. So there must always be a msg.sender. In this specific challenge we update our mapping "zombieToOwner" to contain msg.sender under the id. Next we increase ownerZombieCount for that specific msg.sender called. So everytime the createZombie function is run, those 2 updates will happen according to the address(msg.sender) that called the function.

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere