Token Template

Solana (Anchor):

pub fn initialize(ctx: Context<Initialize>, config: Config) -> ProgramResult {...}
pub fn transfer(ctx: Context<Transfer>, amount: u64) -> ProgramResult {...}
pub fn set_whitelist(ctx: Context<SetWhitelist>, address: Pubkey, allowed: bool) -> ProgramResult {...}
pub fn pause(ctx: Context<Pause>) -> ProgramResult {...}
pub fn update_config(ctx: Context<UpdateConfig>, config: Config) -> ProgramResult {...}
pub fn detect_and_flag(ctx: Context<Detect>, address: Pubkey) -> ProgramResult {...}

Features:

  • Cooldown, maxTx, maxWallet

  • Initial sellTax

  • Pause / update controlled by multisig

  • Hooks for Guardian Monitor

EVM Notes:

  • Use modifier + mapping for whitelist/cooldown

  • Same logic applies: maxTx, sellTax, pause

Last updated