Skip to main content

Reserved Keywords

KeywordDescription
actorkeyword in state actor definition
Actortype Actor, e.g. in storage field identifier MyLogic.Actor(some_participant).balance
appendstandard function to append to a varray
assetkeyword in interface definition for interface to asset logics
breakcontrol flow statement to break out of a loop
buildreserved, not used yet
Builtinsused to access builtin functions
casecase in switch statement
catchtry...catch...finally, not implemented yet
classdefinition of a class
cocodefinition of a module
constdefinition of a constant
continuecontrol flow statement to continue an iteration in the loop
defaultdefault branch of a switch statement
deployendpoint qualifier, defining an endpoint to be used when logic is deployed
depolorizedeserialize POLO-encoded bytes into a data structure
dispersequalifier in mutate or append statements when writing complex values (maps, classes, arrays) that explicitly allows potentially costly storage of large amount of data
dynamicendpoint qualifier that denotes the endpoint is mutating a state
elseif...else
emitwrites an event into a log
endpointendpoint definition statement
enlistendpoint qualifier, definint an endpoint to be used when an actor is enlisted
Environmentused to access environment methods
ephemeralstate definition for backward compatibility before PISA 0.4.0 targets, replaced by actor
eventdefinition of an event, used by emit
falseboolean constant
fieldfield of a class
finallytry...catch...finally, not implemented yet
forcontrol flow statement for iteration over data
functionlocal function that can be called from withing the logic, but not invoked directly by an interaction
gatherqualifier in observe statements when reading complex values (maps, classes, arrays) that explicitly allows potentially costly retrieval of large amount of data
generateinstructs compiler to create a zero-value in a map when reading, if it doesn't exist
ifif...else...
importsdefinition of the list of imported packages
initeration over values in for loop
interactendpoint qualifier, not implemented yet
interfacedefinition of an interface to other regular or asset logics
Invocationused to access invocation methods
invokeendpoint qualifier, default value so usually omitted
locallogic id for backward compatibility before PISA 0.4.0 targets
logickeyword in state logic definition
Logicdenotes access to logic's state, e.g. in storage field identifier MyLogic.Logic.name
makecreates new complex value
memorydeclaration of a memory variable
methodclass method
mutatestatement for writing into storage
observestatement for reading from storage
packagequalifier in coco statement for packages
passno-op statement
persistentstate definition for backward compatibility before PISA 0.4.0 targets, replaced by logic
pubvisibility qualifier in packages
pureendpoint qualifier that denotes the endpoint is a pure function, not accessing state i.e. not even observing it
readonlyendpoint qualifier for backward compatibility before PISA 0.4.0 targets, replaced by static
returncontrol flow statement, sets output values of the endpoint and stops execution
revertthrows exception, with revert flag set (currently ignored, as whole transactions are reverted even with regular throw statement)
selfpointer to the class inside methods
Senderidentifier of the actor that has invoked the interaction
statekeyword in state logic and state actor definitions
staticendpoint qualifier that denotes the endpoint is NOT mutating a state, default and usually omitted
storagedeclartion of a storage pointer variable
sweepstandard function to fully remove an empty map or varray
switchcontrol flow statement for multiple options
throwthrow and exception and terminate execution
topicdefine a topic within event definition
trueboolean constant
trytry...catch...finally, not implemented yet
yieldset the value of output, but don't terminate execution (as with return)