Package score.annotation
Annotation Type External
-
@Target(METHOD) public @interface External
Annotation that can be used to indicate whether the method will be exposed externally.In order for a method to be called from outside the contract (EOA or another contract), it needs to be annotated as
External
. The annotated methods will be registered on the exportable API list. Any attempt to call a non-external method from outside the contract will fail.If the
readonly
element is specified and its value istrue
, i.e.,@External(readonly=true)
, the method will have read-only access to the state DB.NOTE: The special method, named
fallback
, cannot be annotated with@External
. (i.e.,fallback
method cannot be specified in the transaction message as a callee method, and it can only be called via plain ICX transfer message.)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
readonly
The method will have read-only access to the state DB if this value istrue
.
-