Skip to main content

hopper_dynamic_fields

Macro hopper_dynamic_fields 

Source
macro_rules! hopper_dynamic_fields {
    (
        $(#[$meta:meta])*
        $vis:vis struct $name:ident {
            $($body:tt)*
        }
    ) => { ... };
}
Expand description

Explicit sugar for declaring bounded dynamic-tail fields.

This is a small front end over hopper_dynamic_tail!. It keeps Hopper’s explicit fixed-body plus encoded-tail model, while letting ported programs spell custom tail fields as string<N> and vec<T, N>. For a full account declaration with inline tail fields, use #[hopper::dynamic_account].

hopper::hopper_dynamic_fields! {
    pub struct MultisigTail {
        label: string<32>,
        signers: vec<Address, 10>,
        nonce: u32,
    }
}