Solana Development Utilities
A collection of utilities and macros to enhance Solana program development, focusing on compute unit logging and instruction discriminant generation.
Features
- Generate unique instruction discriminants for Anchor programs
- Log compute units for functions and code blocks
- Utility functions for Solana-specific operations
Installation
Add the following to your Cargo.toml
:
[]
= "0.1.0"
= "0.1.0"
= "0.1.0"
Usage
Instruction Discriminants
Handles the global namespace automatically if no namespace is provided.
use anchor_discriminant;
match discriminant
Compute Unit Logging
- Function-level logging
use compute_fn;
- Code block logging
use compute_fn;
compute_fn!;
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.