Skip to content

ACaiSec/create-account-practice

Repository files navigation

Background

This is a practice project for Anchor development beginners. If you've learned some theoretical knowledge about Rust and Solana but haven't been able to start coding due to their complexity, I hope the content in this repo can help you take your first steps in coding.

In this project, I implemented a simple counter, which contains a data field to record the number. The owner of the counter can increase the value of data.

It contains two main functions:

  1. Create and write data accounts as counters with authority checking.
  2. Create and write PDA accounts as counters.

Usage

git clone https://github.com/ACaiSec/create-account-practice.git
cd create-account-practice

# Build project
anchor build

In addition, I also wrote test code for these two functions. You can run the test cases through anchor test.

In the code examples, some confusing points are annotated with the @note tag. Beginners can pay more attention to these comments.

About

Solana Anchor practice project for creating and managing counter accounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors