Course details

Ethereum Smart Contracts with Solidity: Functions in Solidity

Ethereum Smart Contracts with Solidity: Functions in Solidity

Expected Duration
Lesson Objectives
Course Number
Expertise Level


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.

Expected Duration (hours)

Lesson Objectives

Ethereum Smart Contracts with Solidity: Functions in Solidity

  • 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
  • Course Number:

    Expertise Level