LogoAnchor Docs

Example Programs

Example Anchor programs references

Basics

ExampleDescription
checking-accountsChecking account example with Anchor
close-accountClose account example with Anchor
counterCounter program using Anchor
create-accountCreate accounts with Anchor
cross-program-invocationCross program invocation with Anchor
favoritesStore user "favorites" with Anchor
hello-solanaBasic "Hello, Solana!" program with Anchor
pda-rent-payerPDA rent payer example with Anchor
processing-instructionsProcess instructions using Anchor
program-derived-addressesProgram-derived addresses with Anchor
reallocReallocate account data with Anchor
rentCalculate account SOL rent with Anchor
transfer-solTransfer SOL tokens with Anchor

Tokens

ExampleDescription
create-tokenCreate an SPL token with Anchor
escrowEscrow program using Anchor
nft-minterMint NFTs using Anchor
nft-operationsNFT operations with Anchor
pda-mint-authorityPDA as mint authority with Anchor
spl-token-minterSPL token minting with Anchor
token-fundraiserToken fundraiser using Anchor
token-swapSwap tokens with Anchor
transfer-tokensTransfer SPL tokens using Anchor

Token Extensions

ExampleDescription
basicsBasics of Token 2022 with Anchor
cpi-guardCPI guard example with Anchor
default-account-stateDefault account state setup with Anchor
groupToken grouping example with Anchor
immutable-ownerImmutable owner setup with Anchor
interest-bearingInterest-bearing tokens using Anchor
memo-transferMemo transfer with Anchor
metadataToken metadata with Anchor
mint-close-authorityMint close authority with Anchor
multiple-extensionsMultiple extensions example with Anchor
nft-meta-data-pointerNFT metadata pointer with Anchor
non-transferableNon-transferable tokens using Anchor
permanent-delegatePermanent delegate setup with Anchor
transfer-feeTransfer fees example with Anchor
transfer-hookTransfer hook example with Anchor

On this page

Edit on GitHub