Skip to main content

Crate fluentbase_sdk_derive

Crate fluentbase_sdk_derive 

Source
Expand description

Procedural macros for routers, clients, events, and storage layouts in Fluentbase contracts.

Macros§

derive_evm_error
derive_keccak256
Calculates a full Keccak-256 hash from a signature.
derive_keccak256_bytes4
derive_keccak256_id
Calculates a Keccak-256 function selector from a signature.
derive_solidity_client
Generates ready-to-use client code from Solidity definitions.
derive_solidity_trait
Generates Rust traits from Solidity interfaces and contracts.
eip1967_slot
Computes EIP-1967 storage slot at compile time. Formula: keccak256(id) - 1
erc7201_slot
Computes ERC-7201 namespaced storage slot at compile time. Formula: keccak256(abi.encode(uint256(keccak256(id)) - 1)) & ~0xff
solidity_storage
Implements Solidity-compatible storage in Fluentbase contracts.

Attribute Macros§

client
Client macro for type-safe interaction with Fluentbase contracts.
constructor
Defines contract initialization logic.
function_id
Function ID attribute for overriding function selectors in smart contracts.
router
Router macro for Fluentbase smart contracts.

Derive Macros§

Contract
Derives contract implementation with storage support.
Event
Derives Solidity-compatible event emission for structs.
Storage
Derives storage layout for nested structures.