Ethereum Smart Contracts with Solidity: Functions in Solidity
Blockchain
| Beginner
- 14 videos | 1h 22m 41s
- Includes Assessment
- Earns a Badge
Because functions in smart contracts are at the heart of any operation which is performed in the Ethereum network, this 14-video course covers different ways to define functions depending on their use case. Explore function arguments, return types, and access modifiers, before delving into object-oriented concepts: function polymorphism, abstract contracts, how to override functions in derived contracts, inheritance, and different visibility levels: private, internal, external, and public (default). Demonstration models provide a realistic idea of how a function's visibility affects where it can be invoked from; a private variable defined within one smart contract can still be accessed from another contract, as long as its getter function is accessible. As you progress through this course, you will gain a fuller understanding of coding smart contracts by using Solidity for your Blockchain solutions. You will know the types of operations which can incur a gas cost and how these can be limited with access modifiers. You will also learn how to define and use abstract contracts while controlling access to your functions by using the four visibility levels.
WHAT YOU WILL LEARN
-
outline the key concepts covered in this coursebuild and deploy smart contracts utilizing constructor argumentsrecognize how to write a getter function to return the value of a state variable in a smart contractidentify the effect of using the "view" access modifier for a functiondefine a setter function to update the state variables of a smart contractidentify the different ways in which the return types of a function can be specifiedrecognize the effect of using the "pure" access modifier for a function which does not access the contract state
-
distinguish between "view" and "pure" functionsutilize polymorphism to create functions with the same name but with different behaviors within a smart contractuse inheritance to define a smart contract derived from another contractwork with abstract smart contracts to define the desired behavior of contracts derived from itcreate smart contracts with functions of varying visibility and recognize their access restrictionsidentify how different combinations of visibility levels for variables and functions can affect access to dataidentify the key concepts behind function polymorphism, visibility levels, and access modifiers
IN THIS COURSE
-
1.Course Overview2m 46sUP NEXT
-
2.Deploying Contracts With Constructor Arguments8m 30s
-
3.Introducing Functions7m 16s
-
4.View Functions3m 6s
-
5.Functions Modifying the Contract State7m 57s
-
6.Defining the Return Types of a Function8m 20s
-
7.Pure Functions5m 48s
-
8.Function Modifiers5m 34s
-
9.Function Polymorphism4m 10s
-
10.Contract Inheritance6m 26s
-
11.Abstract Contracts6m 12s
-
12.Defining Visibility Levels4m 58s
-
13.Testing the Effects of Different Visibility Levels6m 26s
-
14.Exercise: Functions in Solidity5m 13s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.