You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
use svm_sdk_mock::template;#[template]modTemplate{#[storage]structStorage{#[immutable]pub_keys:[svm_sdk::Blob32;3],started:bool,#[immutable]master_key: svm_sdk::Blob64,word:[u16;3],}}
The generated code should gather variables pub_keys and master_key to sit together under the Immutable Storage Section (which is enforced to be at index #0 - see) and variables to be under Storage Section #1.
The Data Section should always include the Immutable Storage under Section #0 and the Mutable Storage under Section #1 (both will be of type Fixed-Layout)
The text was updated successfully, but these errors were encountered:
YaronWittenstein
changed the title
Extend the SVM SDK + SVM CLI to support Immutable Storage
Extend theSDK + SVM CLI to support Immutable StorageDec 21, 2021
YaronWittenstein
changed the title
Extend theSDK + SVM CLI to support Immutable Storage
Extend the SDK + CLI to support Immutable StorageDec 21, 2021
Here is an example of how it could look like:
The
Var
undersvm-sdk-macros
crate should haveis_mutable: bool
field added:https://github.com/spacemeshos/svm/blob/master/crates/sdk-macros/src/struct/var.rs
This piecse of code should determine for each
var
whether it's mutable or not:svm/crates/sdk-macros/src/struct/storage.rs
Line 33 in 9b6b8f8
svm/crates/sdk-macros/src/struct/storage.rs
Line 33 in 9b6b8f8
The generated code should gather variables
pub_keys
andmaster_key
to sit together under theImmutable Storage Section
(which is enforced to be atindex #0
- see) and variables to be underStorage Section #1
.The emitted
Storage Schema
should reflect that and then the CLI should be updated as well:https://github.com/spacemeshos/svm/blob/22fb1cf627d5c82d20c285744dd9ee708e9c7c08/crates/cli/src/subcmd_craft_deploy/meta.rs
The
Data Section
should always include theImmutable Storage
underSection #0
and theMutable Storage
underSection #1
(both will be of typeFixed-Layout
)The text was updated successfully, but these errors were encountered: