Registry / crypto / ink-storage

ink-storage

JSON →
library5.1.1rscratesunverified

Data structures to organize and manipulate ink! contract storage for Substrate-based smart contracts.

# Cargo.toml [dependencies] ink_storage = "5.1.1"
INSTALL
IMPORT
SIG · INK-STORAGE
I
ink-storage
cryptorustv5.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mapping
use ink_storage::Mapping;

Defines a contract with a Mapping storage field.

use ink_storage::Mapping; #[ink::contract] mod my_contract { #[ink(storage)] pub struct MyContract { map: Mapping<AccountId, u32>, } }
Debug
Known issues
gotchaRequires the `ink` crate and `#[ink::contract]` macro for proper usage.
fix
Add `ink` and `ink_storage` to dependencies and use the contract macro.
affects: >=5.0.0
Upgrade
Version history
5.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
ink-storage — cargo add ink-storage · libregistry