solana-program-library/examples/c
Christian Machacek 18d96ffce6 Fix cross-program-invocation C example
Correctly check if deriving the PDA with the given seed was successful.
Don't pass the system program pubkey to the allocate instruction: the first account passed must be the one to be allocated.
2021-05-08 09:58:39 -07:00
..
src Fix cross-program-invocation C example 2021-05-08 09:58:39 -07:00
README.md Add example readmes (#825) 2020-11-11 09:27:12 +00:00
makefile Add c examples (#823) 2020-11-11 00:54:15 -08:00

README.md

Program examples written in C

The examples in this directory demonstrate various Solana program mechanisms. They are for code reference only and are not end-to-end working examples. The current C test frameworks are very limited so not all functionality is fully tested.

Environment Setup

  1. Install make
  2. Install gcc
  3. Install Solana v1.4.6 or later from https://docs.solana.com/cli/install-solana-cli-tools

Build and Test

To build the examples and run the tests:

$ make