Ethereum Smart Contracts with Solidity: Functions in Solidity

Blockchain    |    Beginner
  • 14 videos | 1h 22m 41s
  • Includes Assessment
  • Earns a Badge
Rating 4.5 of 11 users Rating 4.5 of 11 users (11)
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 course
    Build and deploy smart contracts utilizing constructor arguments
    Recognize how to write a getter function to return the value of a state variable in a smart contract
    Identify the effect of using the "view" access modifier for a function
    Define a setter function to update the state variables of a smart contract
    Identify the different ways in which the return types of a function can be specified
    Recognize the effect of using the "pure" access modifier for a function which does not access the contract state
  • Distinguish between "view" and "pure" functions
    Utilize polymorphism to create functions with the same name but with different behaviors within a smart contract
    Use inheritance to define a smart contract derived from another contract
    Work with abstract smart contracts to define the desired behavior of contracts derived from it
    Create smart contracts with functions of varying visibility and recognize their access restrictions
    Identify how different combinations of visibility levels for variables and functions can affect access to data
    Identify the key concepts behind function polymorphism, visibility levels, and access modifiers

IN THIS COURSE

  • 2m 46s
  • 8m 30s
    During this video, you will learn how to build and deploy smart contracts using constructor arguments. FREE ACCESS
  • Locked
    3.  Introducing Functions
    7m 16s
    Upon completion of this video, you will be able to recognize how to write a getter function to return the value of a state variable in a smart contract. FREE ACCESS
  • Locked
    4.  View Functions
    3m 6s
    Find out how to identify the effect of using the "view" access modifier for a function. FREE ACCESS
  • Locked
    5.  Functions Modifying the Contract State
    7m 57s
    In this video, find out how to define a setter function to update the state variables of a smart contract. FREE ACCESS
  • Locked
    6.  Defining the Return Types of a Function
    8m 20s
    In this video, you will identify the different ways to specify the return type of a function. FREE ACCESS
  • Locked
    7.  Pure Functions
    5m 48s
    After completing this video, you will be able to recognize the effect of using the "pure" access modifier for a function which does not access the contract state. FREE ACCESS
  • Locked
    8.  Function Modifiers
    5m 34s
    During this video, you will learn how to distinguish between "view" functions and "pure" functions. FREE ACCESS
  • Locked
    9.  Function Polymorphism
    4m 10s
    During this video, you will learn how to use polymorphism to create functions with the same name but with different behaviors within a smart contract. FREE ACCESS
  • Locked
    10.  Contract Inheritance
    6m 26s
    In this video, you will learn how to use inheritance to create a smart contract that is based on another contract. FREE ACCESS
  • Locked
    11.  Abstract Contracts
    6m 12s
    In this video, you will work with abstract smart contracts to define the desired behavior of contracts derived from it. FREE ACCESS
  • Locked
    12.  Defining Visibility Levels
    4m 58s
    In this video, you will create smart contracts with functions of varying visibility and recognize their access restrictions. FREE ACCESS
  • Locked
    13.  Testing the Effects of Different Visibility Levels
    6m 26s
    In this video, you will identify how different combinations of visibility levels for variables and functions can affect access to data. FREE ACCESS
  • Locked
    14.  Exercise: Functions in Solidity
    5m 13s
    Learn how to identify the key concepts behind function polymorphism, visibility levels, and access modifiers. FREE ACCESS

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.

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.3 of 3 users Rating 4.3 of 3 users (3)
Rating 4.4 of 331 users Rating 4.4 of 331 users (331)
Rating 4.6 of 10 users Rating 4.6 of 10 users (10)