Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Crypto Zombies Lesson 1, Ch13 Events, Solidity Events
Play lesson

Crypto Zombies Tutorial (Intro to Solidity) - Crypto Zombies Lesson 1, Ch13 Events, Solidity Events

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 chapter of Crypto Zombies we finally look at events in Solidity. Events allow us to listen to our code. First an event is declared then somewhere in our code we fire the event when a specific thing happens. Once our even is fired we then can run another piece of code as result of the event being fired. In our Chapter 13 challenge we are asked to first declare an event called NewZombie. We are asked to modify what happens after we create a zombie. We grab the integer that is returned from using the .push method(which is the length of the array) and subtract 1 from that number to grab the correct index of the zombie we create and assign it to a uint variable named id. We then go into our _createZombie function and fire our event whenever our _createZombie function is called. Once it is called we can then fire some other piece of code.

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