Lesson

Crypto Zombies Lesson 1 ,Ch10 More on Functions, Solidity Pure Vs View Function

Lesson Summary

In this lesson we go over a bit more about functions in Solidity. We learn about the difference between declaring a function as a view function and as a pure function. A view function does not change the state of our solidity app, it does not change the values of anything or even write anything. A pure function doesnt access any data that is in the app. The pure function in Solidity only takes in data from its parameter. In this challenge we create a function that will generate random zombie DNA. We decalare it a private and view function which will return an iunsigned integer.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: