Expand description

The Scrypto Standard Library

The Scrypto Standard Library is the foundation of Scrypto blueprints, a set of minimal and shared abstractions on top of Radix Engine. It enables asset-oriented programming for feature-rich DeFi dApps.

If you know the name of what you’re looking for, the fastest way to find it is to use the search bar at the top of the page.

Modules

Scrypto blueprint ABI.

Scrypto address.

Scrypto data encoding, decoding and exchange.

Scrypto component library.

Scrypto constants.

Scrypto core library, mainly process and transaction context.

Scrypto cryptography library.

Radix engine APIs.

Scrypto math library.

Miscellaneous functions.

Scrypto resource library.

Scrypto values.

Macros

Constructs argument list for Scrypto function/method invocation.

Declares a blueprint.

This macro converts a ComponentAddress into a &Component via the Radix Engine component subsystem.

This macro creates a &Package from a PackageAddress via the Radix Engine component subsystem.

This macro creates a &ResourceManager from a ResourceAddress via the Radix Engine resource subsystem.

Logs a DEBUG message.

Creates a Decimal from literals.

Logs an ERROR message.

Generates a bridge/stub to make package calls to a blueprint.

Generates a bridge/stub to make cross-component calls.

Creates a safe integer from literals. You must specify the type of the integer you want to create.

Imports a blueprint from its ABI.

Includes the ABI file of a Scrypto package.

Includes the WASM file of a Scrypto package.

Logs an INFO message.

Creates a PreciseDecimal from literals.

Logs a TRACE message.

Logs a WARN message.

Traits

A data structure that can be decoded from a byte array using SBOR.

A data structure that can be described using SBOR types.

A data structure that can be serialized into a byte array using SBOR.

A SBOR type ID.

Derive Macros

Derive code that decodes this data structure from a byte array.

Derive code that describes this data structure.

Derive code that encodes this data structure

Derive code that describe a non-fungible data structure.

Derive code that returns the type ID.