trident_client/
lib.rs

1//! Trident is a suite of tools and libraries for testing, auditing and developing
2//! [Solana](https://solana.com/) / [Anchor](https://book.anchor-lang.com/chapter_1/what_is_anchor.html) programs (smart contracts).
3//!
4//! Trident could be useful for writing Rust dApps, too.
5
6mod cleaner;
7mod commander;
8mod idl_loader;
9// mod source_code_generators;
10mod test_generator;
11mod test_generator_gitignore;
12mod test_generator_manifest;
13mod test_generator_template;
14mod utils;
15
16pub mod ___private {
17    pub use super::cleaner::*;
18    pub use super::commander::Commander;
19    pub use super::commander::Error;
20    pub use super::idl_loader::*;
21    // pub use super::source_code_generators::*;
22    pub use super::test_generator::TestGenerator;
23}
24
25mod constants {
26    // tomls
27    pub(crate) const CARGO_TOML: &str = "Cargo.toml";
28    pub(crate) const TRIDENT_TOML: &str = "Trident.toml";
29    pub(crate) const ANCHOR_TOML: &str = "Anchor.toml";
30
31    // tests
32    pub(crate) const TESTS_WORKSPACE_DIRECTORY: &str = "trident-tests";
33    pub(crate) const INSTRUCTIONS_DIRECTORY: &str = "instructions";
34    pub(crate) const TRANSACTIONS_DIRECTORY: &str = "transactions";
35
36    // fuzz
37    // fuzz
38    pub(crate) const FUZZ_TRANSACTIONS_FILE_NAME: &str = "fuzz_transactions.rs";
39    pub(crate) const TYPES_FILE_NAME: &str = "types.rs";
40    pub(crate) const FUZZ_TEST: &str = "test_fuzz.rs";
41
42    // honggfuzz
43    pub(crate) const CARGO_TARGET_DIR_DEFAULT_HFUZZ: &str =
44        "trident-tests/fuzzing/honggfuzz/hfuzz_target";
45
46    // afl
47    pub(crate) const CARGO_TARGET_DIR_DEFAULT_AFL: &str = "trident-tests/fuzzing/afl/afl_target";
48
49    // workspace
50    pub(crate) const GIT_IGNORE: &str = ".gitignore";
51
52    // Formatting
53    pub(crate) const SKIP: &str = "\x1b[33mSkip\x1b[0m";
54    pub(crate) const FINISH: &str = "\x1b[92mFinished\x1b[0m";
55    pub(crate) const ERROR: &str = "\x1b[31mError\x1b[0m";
56}