Struct human_royalty::state::State
source · pub struct State {Show 13 fields
pub wallet: Pubkey,
pub owner: Pubkey,
pub host: Pubkey,
pub total_distributed: u64,
pub total_user_distributed: u64,
pub settings: Settings,
pub drop_idx: u32,
pub vouchers_count: u32,
pub tokens_held: u64,
pub distribution: Option<Distribution>,
pub token_mint: Pubkey,
pub realm_addr: Pubkey,
pub vault_addr: Pubkey,
}Fields§
§wallet: Pubkey§owner: Pubkey§host: Pubkey§total_distributed: u64total amount distributed on the contract
total_user_distributed: u64total amount distributed minus host and owner split
settings: Settings§drop_idx: u32drop_idx is monotonically growing counter to track redeemed voucher voucher could only redeemed if it’s drop_idx matches state’s one on redeem it’s drop_idx is incremented, so it can only be redeemed in next drop. Vouchers are created with current drop_idx, but since they can’t be issued in the middle of distribution, we are safe
vouchers_count: u32total vouchers in circulation
tokens_held: u64total token balance in stake. counted separately to prevent someone from sending tokens directly to wallet and breaking math in the middle of distribution these tokens will also reduce everyone’s share
distribution: Option<Distribution>current distribution
token_mint: PubkeyStaking token mint
realm_addr: PubkeyWhile forming voting record, use this field
vault_addr: PubkeyVault addr to add weight to creator vote