Access Modifiers

There are three types of access modifiers available to help restrict the scope of properties and functions of a contract:

  • Default: no keyword required
  • Private
  • Public: only applies to functions

Only public functions can be called externally by Bitcoin transactions.

defaultprivatepublic
Same contractYesYesYes
Other conractYesNoYes
ExternallyNoNoYes