Skip to main content

Module prelude

Module prelude 

Source
Expand description

Prelude module with commonly used imports.

Import everything with use truthlinked_sdk::prelude::*;

Re-exports§

pub use crate::abi;
pub use crate::backend::HostStorage;
pub use crate::backend::MemoryStorage;
pub use crate::backend::StorageBackend;
pub use crate::call;
pub use crate::codec::BytesCodec;
pub use crate::codec::Codec32;
pub use crate::codec::Decoder;
pub use crate::codec::Encoder;
pub use crate::collections::Namespace;
pub use crate::collections::StorageBlob;
pub use crate::collections::StorageMap;
pub use crate::collections::StorageVec;
pub use crate::context;
pub use crate::env;
pub use crate::hashing;
pub use crate::log;
pub use crate::manifest::ContractManifest;
pub use crate::manifest::Manifest;
pub use crate::manifest::ManifestBuilder;
pub use crate::manifest::StorageKeySpec;
pub use crate::oracle;
pub use crate::storage;
pub use crate::storage::Slot;
pub use crate::Error;
pub use crate::Result;

Macros§

contract_entry
Defines the contract entry point.
slot
Macro for creating a Slot from a 32-byte array.

Attribute Macros§

error_code
Attribute macro for defining error code enums.
require
Attribute macro for adding precondition checks to functions.

Derive Macros§

BytesCodec
Derives the BytesCodec trait for variable-length encoding.
Codec32
Derives the Codec32 trait for 32-byte fixed-size encoding.
Event
Derives the Event trait for structured logging.
Manifest
Derives the Manifest trait for storage access declarations.