Documentation
Complete guides, API reference, and troubleshooting resources
Quick Start Guide
Get the program up and running in minutes. Follow these steps to build and test locally.
1. Prerequisites
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
# Install AVM (Anchor Version Manager)
cargo install --git https://github.com/coral-xyz/anchor avm --force
# Install Anchor 0.31.1
avm install 0.31.1
avm use 0.31.1
# Install Node dependencies
npm install -g yarn
yarn --version2. Clone & Setup
# Clone the repository
git clone https://github.com/rz1989s/meteora-cp-amm-fee-routing.git
cd meteora-cp-amm-fee-routing
# Install project dependencies
npm install
# Verify Anchor installation
anchor --version # Should show: anchor-cli 0.31.13. Build the Program
# Build with Anchor (recommended)
anchor build
# Alternative: Build with cargo-build-sbf
cargo build-sbf
# Expected output:
# ✓ Compiling fee-routing v0.1.0
# ✓ Finished release profile [optimized]
# ✓ Binary: target/deploy/fee_routing.so (371KB)4. Run Tests
# Run all tests (integration + unit)
anchor test
# Run only unit tests
cargo test --manifest-path programs/fee-routing/Cargo.toml --lib
# Run integration tests without rebuild
anchor test --skip-build
# Expected output:
# ✓ 54 passing (Triple-Bundle: 22 local + 15 E2E + 10 devnet + 7 unit)
# ✓ 0 failingConfiguration
Ensure your environment is properly configured. If anchor --version shows wrong version:
# Add AVM to PATH
export PATH="$HOME/.avm/bin:$PATH"
# Make it permanent (zsh)
echo 'export PATH="$HOME/.avm/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Make it permanent (bash)
echo 'export PATH="$HOME/.avm/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify
anchor --version # Should now show: anchor-cli 0.31.1Need More Information?
The full README.md contains comprehensive documentation covering architecture, implementation details, testing strategies, and deployment guides.
Read Full README on GitHub