A simple program that validates a string of UTF-8 encoded characters and logs it in the transaction log. The program also verifies that any accounts provided are signers of the transaction, and if so, logs their addresses. It can be used to record a string on-chain, stored in the instruction data of a successful transaction, and optionally verify the originator.
This code was moved from the solana-program-library and is now maintained in this repo.
Full documentation is available at https://spl.solana.com/memo
The security-audits repo contains all past and present program audits.
The first thing you'll want to do is install NPM dependencies which will allow you to access all the scripts and tools provided by this template.
pnpm install
The program
folder in the root of this repository contains the program
implementation.
The following scripts build, test, format and lint the program respectively.
pnpm programs:build
pnpm programs:test
pnpm programs:format
pnpm programs:lint
You may use the following command to generate the IDLs.
pnpm generate:idls
Note that, to ensure IDLs are generated using the correct framework version, the specific version used by the program will be downloaded and used locally.
Once the program's IDL has been generated, you can generate clients for them using the following command.
pnpm generate:clients
Alternatively, you can use the generate
script to generate both the IDL and the clients at once.
pnpm generate
The following clients are available for your programs. You may use the following links to learn more about each client.
The following script is available to start your local validator.
pnpm validator:start
By default, if a local validator is already running, the script will be skipped. You may use the validator:restart
script instead to force the validator to restart.
pnpm validator:restart
Finally, you may stop the local validator using the following command.
pnpm validator:stop