feat: Refactor pump.fun buy transaction creation

Removes the `dev_buy_token` and `dev_sol_cost` parameters from the buy process to simplify the interface and reduce redundancy.
This commit is contained in:
ysq
2025-06-20 18:14:26 +08:00
parent 148cce8253
commit 7024e100b9
6 changed files with 7 additions and 60 deletions
-4
View File
@@ -281,8 +281,6 @@ async fn test_sell() -> AnyResult<()> {
};
let pumpfun_client = PumpFun::new(Arc::new(payer), &cluster).await;
let creator = Pubkey::from_str("43tFsRkZyhE1JXGivxWthApHPqWCnDqs7E1ZNdy7gkNz")?;
let dev_buy_token = 0;
let dev_sol_cost = 0;
let buy_sol_cost = 500_000; // 0.0005 SOL
let slippage_basis_points = Some(100);
let rpc = RpcClient::new(cluster.rpc_url);
@@ -294,8 +292,6 @@ async fn test_sell() -> AnyResult<()> {
.copy_buy(
mint_pubkey,
creator,
dev_buy_token,
dev_sol_cost,
buy_sol_cost,
slippage_basis_points,
recent_blockhash,