Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Stylus Framework

Stylus Framework provides EVM/Stylus specific feature such as cross-contract calls, events, storage functions, as well as high-level abstractions like the Peep API and Account module to facilitate smart contract development on the Stylus platform.

Exported address

The Stylus Framework is exported at address 0x2. It can also be used via the alias stylus.

Content

The Stylus Framework includes the following modules:

ModuleDescriptionSection
stylus::accountProvides functionalities for managing Stylus accounts-
stylus::contract_callsImplements functionalities to perform cross-contract calls.Cross contract calls
stylus::dynamic_fieldsImplements dynamic fields for flexible data storage.Dynamic Fields
stylus::dynamic_fields_named_idImplements dynamic fields for flexible data storage for NamedIds.Dynamic Fields
stylus::errorProvides error handling functionalities specific to EVM.Errors
stylus::eventsProvides functionalities for emitting.Events
stylus::objectProvides utilities for working with Stylus objects model.Object Model
stylus::peepAllows to read objects owned by other accountes.Peep API
stylus::sol_typesContains types that map to Solidity types.Solidity Types
stylus::tableProvides a table data structure for key-value storage.Dynamic Fields
stylus::tx_contextProvides access to transaction context information.Transaction Context