Skip to main content

StoredBump

Trait StoredBump 

Source
pub trait StoredBump {
    const BUMP_ABS_OFFSET: usize;
}
Expand description

A layout whose #[bump]-marked field stores its PDA bump.

Implemented by #[hopper::state] for every layout that marks a field with #[bump]. #[derive(Accounts)]’s init helper writes the canonical bump it just signed the creation with into this byte, so an account created by Hopper always stores a canonical bump, and bump = stored then verifies the PDA with one hash.

Required Associated Constants§

Source

const BUMP_ABS_OFFSET: usize

Account-absolute offset of the bump byte.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§