Advanced token management program for interacting with the Mayhem protocol on Solana.
github/
├── docs/ # Documentation
│ ├── CONNECTION_GUIDE.md # How to connect to programs
│ └── CUSTOM_PROGRAM_GUIDE.md # Build custom programs
│
├── program/ # Solana program source
│ ├── src/
│ │ └── lib.rs # Main program code
│ ├── Cargo.toml # Rust dependencies
│ ├── Anchor.toml # Anchor configuration
│ └── README.md # Program documentation
│
└── README.md # This file
- Solana CLI tools installed
- Anchor framework (v0.29.0)
- Rust toolchain
- Node.js & npm/yarn
- Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"- Install Anchor
cargo install --git https://github.com/coral-xyz/anchor --tag v0.29.0 anchor-cli- Configure for Devnet
solana config set --url https://api.devnet.solana.com- Build Program
cd program
anchor build- Deploy to Devnet
anchor deploy --provider.cluster devnet- CONNECTION_GUIDE.md - Learn how to connect to Mayhem and the controller
- CUSTOM_PROGRAM_GUIDE.md - Build custom programs that interact with Mayhem
✅ Mint Management - Control token creation with authority
✅ Fee Collection - Automated fee gathering system
✅ Buyback Operations - Strategic token buybacks
✅ Burn Mechanism - Supply reduction controls
✅ Authority Takeover - Gain control of token mints
MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e
Devnet: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
Mainnet: [TO BE DEPLOYED]
- Token Creators: Manage minting and burning post-launch
- DAOs: Automated fee collection and redistribution
- Market Makers: Buyback mechanisms for price stability
- Protocols: Takeover and manage abandoned tokens
- Authority-based access control
- PDA-based configuration
- Emergency pause mechanism
- Input validation on all operations
- Tested on devnet before mainnet
// Initialize controller
await program.methods
.initialize(
MAYHEM_PROGRAM_ID,
feeCollector,
buybackWallet
)
.rpc();
// Mint tokens
await program.methods
.mintTokens(new BN(1000000))
.accounts({ mint, recipient })
.rpc();
// Burn tokens
await program.methods
.burnTokens(new BN(500000))
.accounts({ mint, tokenAccount })
.rpc();Deploy directly to Solana Playground:
- Visit https://beta.solpg.io
- Create new Anchor project
- Copy code from
program/src/lib.rs - Build & Deploy
Contributions welcome! Please:
- Test thoroughly on devnet
- Follow Rust/Anchor best practices
- Document new features
- Submit PRs with clear descriptions
This program is provided as-is for educational purposes. Always audit code before deploying to mainnet with real funds.
MIT License - see LICENSE file for details