const developer = {
name: "Sagar Regmi",
location: "Nepal",
company: "TrustledgerAi.com",
roles: [
"Full Stack Developer",
"Blockchain Developer",
"Smart Contract Engineer"
],
focus: [
"Node.js",
"React",
"Solana",
"Ethereum",
"Rust",
"Web3"
],
currentLearning: "Zero Knowledge Proofs",
funFact: "I debug smart contracts in my dreams"
};
#[program]
pub mod token_vault {
use anchor_lang::prelude::*;
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(init, payer = authority)]
pub vault: Account<'info, TokenVault>,
pub authority: Signer<'info>,
pub system_program: Program<'info, System>
}
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
msg!("π Initializing token vault...");
Ok(())
}
}
#[account]
pub struct TokenVault {
pub authority: Pubkey, // 32
pub token_mint: Pubkey, // 32
pub token_account: Pubkey // 32
}
"Simplicity is the soul of efficiency." - Austin Freeman
Shared via Mood Coding - The mindful VS Code extension
Let's Connect