component

Attribute Macro component 

Source
#[component]
Expand description

Account component procedural macro.

Derives Default for the struct and generates AccountComponentTemplate, serializes it into a static byte array __MIDEN_ACCOUNT_COMPONENT_METADATA_BYTES containing serialized metadata placed in a specific link section.

#[component]
struct TestComponent {
   #[storage(
        slot(0),
        description = "test value",
        type = "auth::rpo_falcon512::pub_key"
    )]
    owner_public_key: Value,

    #[storage(slot(1), description = "test map")]
    foo_map: StorageMap,

    #[storage(slot(2))]
    without_description: Value,
}