#solana #anchor #saber #check #validation #programs #safer

vipers

Assorted checks and validations for writing safer Solana programs

24 stable releases

2.0.6 Jul 20, 2022
2.0.2 Mar 21, 2022
1.6.1 Feb 14, 2022
1.5.5 Dec 4, 2021
0.1.1 Aug 23, 2021

#4 in #saber

Download history 139/week @ 2023-12-21 85/week @ 2023-12-28 145/week @ 2024-01-04 149/week @ 2024-01-11 115/week @ 2024-01-18 75/week @ 2024-01-25 81/week @ 2024-02-01 123/week @ 2024-02-08 155/week @ 2024-02-15 163/week @ 2024-02-22 255/week @ 2024-02-29 283/week @ 2024-03-07 215/week @ 2024-03-14 238/week @ 2024-03-21 347/week @ 2024-03-28 246/week @ 2024-04-04

1,096 downloads per month
Used in 56 crates (41 directly)

Apache-2.0

35KB
658 lines

vipers 😎

Crates.io License Build Status Contributors Code Coverage

Assorted checks and validations for writing safer Solana programs.

Motivation

Solana's fee mechanism is unlike Ethereum's, in that the number of bytecode instructions executed does not add to the cost of a transaction. Due to this, it is wise to design Solana code with excessive safety checks in order to minimize the chance of exploits.

This library provides several utilities for Anchor programs to validate account structs and check for invariants.

Support

For support, join the Saber Discord at chat.saber.so!

License

Apache 2.0

Dependencies

~10–23MB
~304K SLoC