fix build errors
This commit is contained in:
+18
-18
@@ -157,24 +157,24 @@ impl YellowstoneGrpc {
|
|||||||
// transactions
|
// transactions
|
||||||
// }
|
// }
|
||||||
|
|
||||||
pub fn get_subscribe_update_slot_request_filter(
|
// pub fn get_subscribe_update_slot_request_filter(
|
||||||
&self,
|
// &self,
|
||||||
account_include: Vec<String>,
|
// account_include: Vec<String>,
|
||||||
account_exclude: Vec<String>,
|
// account_exclude: Vec<String>,
|
||||||
account_required: Vec<String>,
|
// account_required: Vec<String>,
|
||||||
) -> TransactionsFilterMap {
|
// ) -> TransactionsFilterMap {
|
||||||
let mut transactions = HashMap::new();
|
// let mut transactions = HashMap::new();
|
||||||
transactions.insert(
|
// transactions.insert(
|
||||||
"client".to_string(),
|
// "client".to_string(),
|
||||||
SubscribeUpdateSlot {
|
// SubscribeUpdateSlot {
|
||||||
slot: 0,
|
// slot: 0,
|
||||||
parent: None,
|
// parent: None,
|
||||||
status: None,
|
// status: None,
|
||||||
dead_error: None,
|
// dead_error: None,
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
transactions
|
// transactions
|
||||||
}
|
// }
|
||||||
|
|
||||||
async fn handle_stream_message(
|
async fn handle_stream_message(
|
||||||
msg: SubscribeUpdate,
|
msg: SubscribeUpdate,
|
||||||
|
|||||||
+4
-4
@@ -221,13 +221,13 @@ impl PumpFun {
|
|||||||
).await
|
).await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn sell_by_percent_with_jito(
|
pub async fn sell_by_percent_with_tip(
|
||||||
&self,
|
&self,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
percent: u64,
|
percent: u64,
|
||||||
slippage_basis_points: Option<u64>,
|
slippage_basis_points: Option<u64>,
|
||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
pumpfun::sell::sell_by_percent_with_jito(
|
pumpfun::sell::sell_by_percent_with_tip(
|
||||||
self.rpc.clone(),
|
self.rpc.clone(),
|
||||||
self.fee_clients.clone(),
|
self.fee_clients.clone(),
|
||||||
self.payer.clone(),
|
self.payer.clone(),
|
||||||
@@ -239,13 +239,13 @@ impl PumpFun {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sell tokens using Jito
|
/// Sell tokens using Jito
|
||||||
pub async fn sell_with_jito(
|
pub async fn sell_with_tip(
|
||||||
&self,
|
&self,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
amount_token: Option<u64>,
|
amount_token: Option<u64>,
|
||||||
slippage_basis_points: Option<u64>,
|
slippage_basis_points: Option<u64>,
|
||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
pumpfun::sell::sell_with_jito(
|
pumpfun::sell::sell_with_tip(
|
||||||
self.rpc.clone(),
|
self.rpc.clone(),
|
||||||
self.fee_clients.clone(),
|
self.fee_clients.clone(),
|
||||||
self.payer.clone(),
|
self.payer.clone(),
|
||||||
|
|||||||
+3
-3
@@ -60,7 +60,7 @@ pub async fn sell_by_percent(
|
|||||||
sell(rpc, payer, mint, Some(amount), slippage_basis_points, priority_fee).await
|
sell(rpc, payer, mint, Some(amount), slippage_basis_points, priority_fee).await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn sell_by_percent_with_jito(
|
pub async fn sell_by_percent_with_tip(
|
||||||
rpc: Arc<SolanaRpcClient>,
|
rpc: Arc<SolanaRpcClient>,
|
||||||
fee_clients: Vec<Arc<FeeClient>>,
|
fee_clients: Vec<Arc<FeeClient>>,
|
||||||
payer: Arc<Keypair>,
|
payer: Arc<Keypair>,
|
||||||
@@ -75,11 +75,11 @@ pub async fn sell_by_percent_with_jito(
|
|||||||
|
|
||||||
let (balance_u64, _) = get_token_balance(rpc.as_ref(), payer.as_ref(), &mint).await?;
|
let (balance_u64, _) = get_token_balance(rpc.as_ref(), payer.as_ref(), &mint).await?;
|
||||||
let amount = balance_u64 * percent / 100;
|
let amount = balance_u64 * percent / 100;
|
||||||
sell_with_jito(rpc, fee_clients, payer, mint, Some(amount), slippage_basis_points, priority_fee).await
|
sell_with_tip(rpc, fee_clients, payer, mint, Some(amount), slippage_basis_points, priority_fee).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sell tokens using Jito
|
/// Sell tokens using Jito
|
||||||
pub async fn sell_with_jito(
|
pub async fn sell_with_tip(
|
||||||
rpc: Arc<SolanaRpcClient>,
|
rpc: Arc<SolanaRpcClient>,
|
||||||
fee_clients: Vec<Arc<FeeClient>>,
|
fee_clients: Vec<Arc<FeeClient>>,
|
||||||
payer: Arc<Keypair>,
|
payer: Arc<Keypair>,
|
||||||
|
|||||||
Reference in New Issue
Block a user