Drift Interface is a native Solana CPI for the Drift V2 program. This project is written in Rust and is designed to interact with the Drift V2 program on the Solana blockchain.
This project provides a native Solana CPI for the Drift V2 program. The IDL is downloaded from the Drift Labs protocol-v2 repository.
The project relies on the following dependencies:
- borsh = "^0.10"
- num-derive = "^0.3"
- num-traits = "^0.2"
- serde (optional) = "^1.0"
- solana-program = "^1.16"
- thiserror = "^1.0"
- This project only works with
solana-program = ^1.16
since it requiresborsh = ^0.10
which introduces the use of const generics in arrays. - The CPI was generated using solores with some minor fixes by Bulk Labs.
To use this CPI, follow these steps:
- Clone the repository.
- Build the project using
cargo build
. - Refer to the Solana documentation for deploying and interacting with the program.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
This project is licensed under the MIT License.