sov-modules-macros 0.3.0

Macros for use with the Sovereign SDK module system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use sov_modules_api::{Context, ModuleInfo, StateMap};

#[derive(ModuleInfo)]
struct TestStruct<C: Context> {
    #[address]
    address: C::Address,

    // Unsupported attributes should be ignored to guarantee compatibility with
    // other macros.
    #[allow(dead_code)]
    #[state]
    test_state1: StateMap<u32, String>,

    #[state]
    test_state2: StateMap<C::PublicKey, String>,
}

fn main() {}