gpl_core/state/
user.rs

1use anchor_lang::prelude::*;
2
3#[account]
4pub struct User {
5    // The public key of the wallet that owns this User
6    // We use this PDA as a seed to derive other downstream
7    // accounts.
8    //
9    // User -> Profile -> Post -> [Connection, Reaction]
10    pub authority: Pubkey,
11    pub random_hash: [u8; 32],
12}
13
14impl User {
15    pub const LEN: usize = 8 + std::mem::size_of::<Self>();
16}