Scrypto documentation has moved!
All Scrypto documentation has moved to the Babylon documentation site.
This page has been preserved so as not to break existing links out in the world, but its content is no longer being updated.
Please switch to the Babylon-specific site.
In this section, we discuss the runtime behavior of Scrypto code (in WASM format).
When a transaction enters the system, Radix Engine validates its format and interprets its instructions one-by-one, which generally consists of two categories:
To update or assert the transaction worktop
To call a function or method
Scrypto code runs when a function/method get invoked.
Each blueprint has a mapping from function to an exported WASM function which serves as the entrypoint for a function call.
These are generally of the form
Execution of WASM code follows the standard with the following modifications:
Floating point instructions have been removed.
A component can make calls to other components or blueprints via the system call
When an invocation occurs, all data and resources in call arguments moves downstream from the caller to the callee. Call data is inspected by Radix Engine. Invalid data would result in a runtime failure.