feat: bonding_curve is transmitted from the outside
This commit is contained in:
@@ -51,20 +51,7 @@ impl InstructionBuilder for PumpFunInstructionBuilder {
|
||||
)
|
||||
.await?
|
||||
} else {
|
||||
let (bonding_curve, _) =
|
||||
get_bonding_curve_account_v2(&PumpFun::get_instance().get_rpc(), ¶ms.mint)
|
||||
.await?;
|
||||
Arc::new(BondingCurveAccount {
|
||||
discriminator: bonding_curve.discriminator,
|
||||
account: get_bonding_curve_pda(¶ms.mint).unwrap(),
|
||||
virtual_token_reserves: bonding_curve.virtual_token_reserves,
|
||||
virtual_sol_reserves: bonding_curve.virtual_sol_reserves,
|
||||
real_token_reserves: bonding_curve.real_token_reserves,
|
||||
real_sol_reserves: bonding_curve.real_sol_reserves,
|
||||
token_total_supply: bonding_curve.token_total_supply,
|
||||
complete: bonding_curve.complete,
|
||||
creator: params.creator,
|
||||
})
|
||||
protocol_params.bonding_curve.clone().unwrap()
|
||||
};
|
||||
|
||||
let max_sol_cost = calculate_with_slippage_buy(
|
||||
@@ -108,8 +95,6 @@ impl InstructionBuilder for PumpFunInstructionBuilder {
|
||||
},
|
||||
));
|
||||
|
||||
println!("max_sol_cost: {:?}", max_sol_cost);
|
||||
|
||||
Ok(instructions)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user