Skip to main content

Endpoints

Endpoints are the externally callable entry points of a Coco logic. Endpoints define named inputs and named return values and they are invoked in MOI transactions.Endpoints may return values, change state or execute asset operations. When they mutate logic's state, they need to be marked as dynamic, so the logic is locked for writing for this transaction, ensuring no other transaction writes into the logic's state. Therefore execution of dynamic endpoints can't happen in parallel so dynamic endpoints should be used only for initialization, most endpoints should only modify actor's state what can happen in parallel.