style: run rustfmt

This commit is contained in:
hookenful
2026-03-14 18:16:55 +02:00
parent 0ec826fcbd
commit 2abcf3839e
76 changed files with 1763 additions and 1352 deletions
+15 -4
View File
@@ -1,7 +1,13 @@
use sol_trade_sdk::{
SolanaTrade, TradeTokenType, common::{
AnyResult, TradeConfig, fast_fn::get_associated_token_address_with_program_id_fast_use_seed
}, swqos::SwqosConfig, trading::{core::params::{PumpSwapParams, DexParamEnum}, factory::DexType}
common::{
fast_fn::get_associated_token_address_with_program_id_fast_use_seed, AnyResult, TradeConfig,
},
swqos::SwqosConfig,
trading::{
core::params::{DexParamEnum, PumpSwapParams},
factory::DexType,
},
SolanaTrade, TradeTokenType,
};
use solana_commitment_config::CommitmentConfig;
use solana_sdk::signature::Keypair;
@@ -54,7 +60,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let rpc = client.infrastructure.rpc.clone();
let payer = client.payer.pubkey();
let program_id = sol_trade_sdk::constants::TOKEN_PROGRAM_2022;
let account = get_associated_token_address_with_program_id_fast_use_seed(&payer, &mint_pubkey, &program_id, client.use_seed_optimize);
let account = get_associated_token_address_with_program_id_fast_use_seed(
&payer,
&mint_pubkey,
&program_id,
client.use_seed_optimize,
);
let balance = rpc.get_token_account_balance(&account).await?;
let amount_token = balance.amount.parse::<u64>().unwrap();
let sell_params = sol_trade_sdk::TradeSellParams {