The Pump.fun Smart Contract is a Rust/Anchor smart contract designed for Pump.fun, facilitating various decentralized finance (DeFi) functionalities. This contract enables users to interact with liquidity pools and create Raydium pools on the Solana blockchain.
-
Add Virtual LP
Allows users to add virtual liquidity to the Pump.fun platform, increasing pool liquidity without requiring actual token deposits. Useful for simulating and testing liquidity scenarios. -
Remove LP
Enables users to remove liquidity from the Pump.fun platform, reducing pool liquidity and allowing users to withdraw LP tokens. -
Create Raydium Pool
Allows users to create a new Raydium pool, facilitating decentralized trading and liquidity provision.
- Clone the repository
git clone https://github.com/muffin819/Solana-Pumpfun-SC.git cd Solana-Pumpfun-SC
- Install dependencies
anchor build
- Deploy the contract
anchor deploy
To interact with the smart contract, you can use the Anchor CLI or integrate it into your Solana dApp.
Example: Calling the add_virtual_lp
function
pub fn add_virtual_lp(ctx: Context<AddVirtualLP>, amount: u64) -> Result<()> {
let liquidity_pool = &mut ctx.accounts.liquidity_pool;
liquidity_pool.amount += amount;
Ok(())
}
Feel free to open an issue or submit a pull request if you have any suggestions or improvements!
- Telegram: dogewhiz
This project is licensed under the MIT License.