Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 800 Bytes

File metadata and controls

34 lines (20 loc) · 800 Bytes

Counter (Quasar)

Global counter in a PDA with initialize and increment handlers.

See also: Counter overview and the repository catalog.

Major concepts

  • PDA state
  • Handler dispatch

Setup

From basics/counter/quasar/:

quasar build

Prerequisites: Quasar CLI and Agave toolchain (see Quasar.toml).

Testing

In-process tests via Quasar SVM (quasar-svm in Quasar.toml):

cargo test

Tests invoke instruction handlers and assert onchain state. No local validator.

Usage

Read src/ and Quasar.toml. Compare with the Anchor variant in the same example where present.