gpl-core 1.0.0

Gum Protocol Core (GPL Core)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anchor_lang::prelude::*;

pub const MAX_LEN_URI: usize = 128;

#[account]
#[derive(Default, Debug)]
pub struct Post {
    pub profile: Pubkey,
    pub metadata_uri: String,
    pub random_hash: [u8; 32],

    //Comments are just replies
    pub reply_to: Option<Pubkey>,
}

impl Post {
    pub const LEN: usize = 8 + 32 + std::mem::size_of::<Self>() + MAX_LEN_URI;
}