Functions

Function Structure

Example
  • public -> visibility declaration

  • view -> Indicates function behavior

  • returns -> type of variable being returned

There are 2 types of functions that you can create in Solidity:

  1. Functions that create transaction on block chain

  2. Functions that do not create transaction on block chain (view and pure)

For more details see: Running Functions page

Last updated