A Rust-based automation tool for cranking Stake Pool pools on the Solana blockchain using a CLI interface. It is designed to simplify and automate the process of sending cranking transactions using Solana RPC and a designated wallet.
- Rust (latest stable version)
- Solana CLI (for local key management, optional)
Create a .env file or export the following environment variables:
RPC_URL="https://api.mainnet-beta.solana.com"
FEE_PAYER_PRIVATE_KEY='' # Your Solana wallet's private key (Base64 or JSON)
STAKE_POOL_ADDRESS='' # Your Stake Pool address
SLACK_TOKEN='' # Slack Bot Token
SLACK_CHANNEL_ID='' # Slack channel id where bot should send the message
⚠️ Do not expose yourFEE_PAYER_PRIVATE_KEYin public repos. Use secrets managers or environment variables for secure deployment.
Do not forget to change the message that you want to send on your slack channel. To change the message update line no. 81 in main.rs
.
├── Cargo.lock # Cargo dependency lock file
├── Cargo.toml # Package mainfest
├── Readme.md # Project documentation
└── src
├── client.rs # Client functions to get stake_pool, validator_list etc.
├── config.rs # Loads and validates environment config
├── main.rs # CLI entry point
└── utils # Sets the compute budget instructions
├── compute_budget.rs
└── mod.rs
cargo build --releaseRPC_URL="https://api.mainnet-beta.solana.com" \
FEE_PAYER_PRIVATE_KEY='<your-private-key>' \
STAKE_POOL_ADDRESS='<your-stake-pool-address>' \
SLACK_TOKEN='<your-slack-token>' \
SLACK_CHANNEL_ID='<your-slack-channel-id>' \
cargo run --releaseWe welcome contributions from the community! To get started:
- Fork the repo
- Create your feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/your-feature) - Open a pull request
This project is licensed under the Apache 2.0 License.
Built and maintained by the Brew Labs team.