Skip to content

Commit

Permalink
access modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu committed Mar 23, 2021
1 parent de18017 commit 85cfe18
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,39 @@ Note there is no ``;`` at the end.
}
}
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.

.. list-table::
:header-rows: 1
:widths: 20 20 20 20

* -
- default
- private
- public

* - Same contract
- Yes
- Yes
- Yes

* - Other contract
- Yes
- No
- Yes

* - Externally
- No
- No
- Yes

Operators
=========
Expand Down

0 comments on commit 85cfe18

Please sign in to comment.