fixd
This commit is contained in:
@@ -470,6 +470,7 @@ impl PumpFun {
|
|||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
if trade_platform == PUMPFUN {
|
if trade_platform == PUMPFUN {
|
||||||
pumpfun::sell::sell_by_percent_with_tip(
|
pumpfun::sell::sell_by_percent_with_tip(
|
||||||
|
self.rpc.clone(),
|
||||||
self.fee_clients.clone(),
|
self.fee_clients.clone(),
|
||||||
self.payer.clone(),
|
self.payer.clone(),
|
||||||
mint,
|
mint,
|
||||||
@@ -513,6 +514,7 @@ impl PumpFun {
|
|||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
if trade_platform == PUMPFUN {
|
if trade_platform == PUMPFUN {
|
||||||
pumpfun::sell::sell_by_amount_with_tip(
|
pumpfun::sell::sell_by_amount_with_tip(
|
||||||
|
self.rpc.clone(),
|
||||||
self.fee_clients.clone(),
|
self.fee_clients.clone(),
|
||||||
self.payer.clone(),
|
self.payer.clone(),
|
||||||
mint,
|
mint,
|
||||||
@@ -554,6 +556,7 @@ impl PumpFun {
|
|||||||
recent_blockhash: Hash,
|
recent_blockhash: Hash,
|
||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
pumpfun::sell::sell_with_tip(
|
pumpfun::sell::sell_with_tip(
|
||||||
|
self.rpc.clone(),
|
||||||
self.fee_clients.clone(),
|
self.fee_clients.clone(),
|
||||||
self.payer.clone(),
|
self.payer.clone(),
|
||||||
mint,
|
mint,
|
||||||
|
|||||||
+6
-1
@@ -98,6 +98,7 @@ pub async fn sell_by_amount(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn sell_by_percent_with_tip(
|
pub async fn sell_by_percent_with_tip(
|
||||||
|
rpc: Arc<SolanaRpcClient>,
|
||||||
fee_clients: Vec<Arc<FeeClient>>,
|
fee_clients: Vec<Arc<FeeClient>>,
|
||||||
payer: Arc<Keypair>,
|
payer: Arc<Keypair>,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
@@ -113,6 +114,7 @@ pub async fn sell_by_percent_with_tip(
|
|||||||
}
|
}
|
||||||
let amount = amount_token * percent / 100;
|
let amount = amount_token * percent / 100;
|
||||||
sell_with_tip(
|
sell_with_tip(
|
||||||
|
rpc,
|
||||||
fee_clients,
|
fee_clients,
|
||||||
payer,
|
payer,
|
||||||
mint,
|
mint,
|
||||||
@@ -126,6 +128,7 @@ pub async fn sell_by_percent_with_tip(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn sell_by_amount_with_tip(
|
pub async fn sell_by_amount_with_tip(
|
||||||
|
rpc: Arc<SolanaRpcClient>,
|
||||||
fee_clients: Vec<Arc<FeeClient>>,
|
fee_clients: Vec<Arc<FeeClient>>,
|
||||||
payer: Arc<Keypair>,
|
payer: Arc<Keypair>,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
@@ -139,6 +142,7 @@ pub async fn sell_by_amount_with_tip(
|
|||||||
return Err(anyhow!("Amount must be greater than 0"));
|
return Err(anyhow!("Amount must be greater than 0"));
|
||||||
}
|
}
|
||||||
sell_with_tip(
|
sell_with_tip(
|
||||||
|
rpc,
|
||||||
fee_clients,
|
fee_clients,
|
||||||
payer,
|
payer,
|
||||||
mint,
|
mint,
|
||||||
@@ -153,6 +157,7 @@ pub async fn sell_by_amount_with_tip(
|
|||||||
|
|
||||||
/// Sell tokens using Jito
|
/// Sell tokens using Jito
|
||||||
pub async fn sell_with_tip(
|
pub async fn sell_with_tip(
|
||||||
|
rpc: Arc<SolanaRpcClient>,
|
||||||
fee_clients: Vec<Arc<FeeClient>>,
|
fee_clients: Vec<Arc<FeeClient>>,
|
||||||
payer: Arc<Keypair>,
|
payer: Arc<Keypair>,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
@@ -167,7 +172,7 @@ pub async fn sell_with_tip(
|
|||||||
let protocol_params = Box::new(PumpFunSellParams {});
|
let protocol_params = Box::new(PumpFunSellParams {});
|
||||||
// 创建卖出参数
|
// 创建卖出参数
|
||||||
let sell_params = SellParams {
|
let sell_params = SellParams {
|
||||||
rpc: None,
|
rpc: Some(rpc.clone()),
|
||||||
payer: payer.clone(),
|
payer: payer.clone(),
|
||||||
mint,
|
mint,
|
||||||
creator,
|
creator,
|
||||||
|
|||||||
Reference in New Issue
Block a user