There are three types of access modifiers available to help restrict the scope of properties and functions of a contract:
Only public functions can be called externally by Bitcoin transactions.
default | private | public | |
---|---|---|---|
Same contract | Yes | Yes | Yes |
Other conract | Yes | No | Yes |
Externally | No | No | Yes |