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:
| Module | Description | Section |
|---|---|---|
stylus::account | Provides functionalities for managing Stylus accounts | - |
stylus::contract_calls | Implements functionalities to perform cross-contract calls. | Cross contract calls |
stylus::dynamic_fields | Implements dynamic fields for flexible data storage. | Dynamic Fields |
stylus::dynamic_fields_named_id | Implements dynamic fields for flexible data storage for NamedIds. | Dynamic Fields |
stylus::error | Provides error handling functionalities specific to EVM. | Errors |
stylus::events | Provides functionalities for emitting. | Events |
stylus::object | Provides utilities for working with Stylus objects model. | Object Model |
stylus::peep | Allows to read objects owned by other accountes. | Peep API |
stylus::sol_types | Contains types that map to Solidity types. | Solidity Types |
stylus::table | Provides a table data structure for key-value storage. | Dynamic Fields |
stylus::tx_context | Provides access to transaction context information. | Transaction Context |