Superteam Academy
|bySuperteam BrasilSuperteam Brasil
Superteam Academy

The decentralized learning platform for Solana developers.

Resources

  • Courses
  • Leaderboard
  • Community

Support

  • Documentation
  • API Reference
  • Community

Legal

  • Terms of Service
  • Privacy Policy
  • Cookie Policy

Follow Us

  • Twitter / X
  • Discord
  • GitHub

Stay in the Loop

Get weekly updates on new courses, Solana ecosystem news, and learning tips.

Powered bySuperteam BrasilSuperteam Brasil

Β© 2026 Superteam Academy. All rights reserved.

Anchor Framework Fundamentals

What is Anchor?
Project Structure
Account Macros
Instructions

Anchor Basics / Account Macros
30 XP

Account Macros

Account Macros

#[account]

Defines a program account with automatic serialization.

Rust
#[account]
pub struct UserProfile {
    pub authority: Pubkey,
    pub name: String,
    pub xp: u64,
    pub bump: u8,
}

#[derive(Accounts)]

Defines the account validation struct.

Rust
#[derive(Accounts)]
pub struct Initialize<'info> {
    #[account(init, payer = user, space = 8 + 32 + 32 + 8 + 1)]
    pub profile: Account<'info, UserProfile>,
    #[account(mut)]
    pub user: Signer<'info>,
    pub system_program: Program<'info, System>,
}
You need to enroll in this course before you can mark lessons as complete.
3 / 8