Skip to main content

hopper_manifest

Macro hopper_manifest 

Source
macro_rules! hopper_manifest {
    (
        $const_name:ident = $name:ident {
            $( $field:ident : $fty:ty = $fsize:literal ),+ $(,)?
        }
    ) => { ... };
}
Expand description

Generate a layout manifest for schema tooling.

Produces a const LayoutManifest for a layout type, with field descriptors suitable for off-chain tooling, indexers, and migration compatibility checks.

hopper_manifest! {
    VAULT_MANIFEST = Vault {
        authority: [u8; 32]  = 32,
        mint:      [u8; 32]  = 32,
        balance:   WireU64   = 8,
        bump:      u8        = 1,
    }
}

Generates: pub const VAULT_MANIFEST: hopper_schema::LayoutManifest