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 {BlueprintName}_{function name}.


Execution of WASM code follows the standard with the following modifications:

  • Floating point instructions have been removed.

External Calls

A component can make calls to other components or blueprints via the system call INVOKE_METHOD and INVOKE_FUNCTION.

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.


Similar to external calls, all data and resources in a return object moves upstream from the callee to the caller.

When a call frame exits, dangling objects (such as buckets) are checked for and a runtime error is issued if some exist.