Pular para o conteúdo principal
Superteam Brasil
Voltar
Intermediário12 horas14 aulas

Rust for Program Developers

You can read a Solana account's bytes. You cannot yet write the struct those bytes came from. You finish this course holding `vault_core.rs` — a `VaultState` with `owner`, `balance` and `bump`, `deposit` and `withdraw` built on `checked_add`/`checked_sub` so a `u64` can never silently wrap, a `VaultError` enum with four named variants, and not one `unwrap()` — compiled green against the real Anchor 1.x toolchain on our build server. Nothing is installed locally — no rustup, no cargo, no `.so` upload. Ownership, borrowing and lifetimes are taught here rather than deferred, because `Account<'info, Vault>` is unreadable without them. Your file deliberately carries no `#[program]` and no `#[derive(Accounts)]` — that omission is the handoff, and Course 3 is what wraps around it.

800 Recompensa XPaccount-layoutanchorborsh-serializationbuild-serverchecked-arithmeticcompiler-errorsdebuggingerror-handlingpdasprogram-securityrustrust-borrowingrust-control-flowrust-enumsrust-lifetimesrust-modulesrust-move-semanticsrust-optionrust-ownershiprust-resultrust-slicesrust-structsrust-traitsrust-typestoolchain-versions

Currículo

4 módulos · 14 aulas

Discussões do Curso

Histórico de alterações

  1. Curso publicado

    14 lições no lançamento

    v1