-
Notifications
You must be signed in to change notification settings - Fork 115
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code
Milestone
Description
Problem
The current InitStorageData uses BTreeMap<StorageValueName, String> which has limitations:
- All values are strings, requiring parsing during reconciliation
- Keys are generic placeholder names rather than typed storage slot references
Proposed Improvements
1. Structured Values
Support direct Word/Map values instead of string-only:
// Current
InitStorageData::new([("balance", "1000".to_string())])
// Proposed
InitStorageData::new([("balance", StorageValue::Word(Word::from(1000)))])Benefits: Type safety, reduced parsing overhead, better error messages
2. Named Storage Slot Keys
Once named storage slots are available, support slot names as keys:
// Instead of generic strings
"some_placeholder" -> "value"
// Use typed storage slot names
StorageSlotName::Balance -> StorageValue::Word(balance)Benefits: Type-safe references & compile-time validation
Context: #1802 (review)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code