docs: update gas fee strategy examples to remove data_size_limit parameters
Remove obsolete data_size_limit parameters from all gas fee strategy function calls in documentation and examples, following the recent API changes. Changes: - Update README.md and README_CN.md gas fee strategy examples - Update all example files using set_global_fee_strategy (from 8 params to 6 params) - Update gas_fee_strategy example for set_normal_fee_strategy and set_high_low_fee_strategy - Remove the last two parameters (256 * 1024, 0) from all calls 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
321f4c4a25
commit
b17f1157b6
@@ -615,7 +615,7 @@ async fn handle_buy_pumpfun(
|
||||
let sol_lamports = sol_str_to_lamports(sol_amount.to_string().as_str()).unwrap();
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let buy_params = TradeBuyParams {
|
||||
dex_type: DexType::PumpFun,
|
||||
@@ -669,7 +669,7 @@ async fn handle_buy_pumpswap(
|
||||
let sol_lamports = sol_str_to_lamports(sol_amount.to_string().as_str()).unwrap();
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let buy_params = TradeBuyParams {
|
||||
dex_type: DexType::PumpSwap,
|
||||
@@ -722,7 +722,7 @@ async fn handle_buy_bonk(
|
||||
let sol_lamports = sol_str_to_lamports(sol_amount.to_string().as_str()).unwrap();
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let buy_params = TradeBuyParams {
|
||||
dex_type: DexType::Bonk,
|
||||
@@ -779,7 +779,7 @@ async fn handle_buy_raydium_v4(
|
||||
let sol_lamports = sol_str_to_lamports(sol_amount.to_string().as_str()).unwrap();
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let buy_params = TradeBuyParams {
|
||||
dex_type: DexType::RaydiumAmmV4,
|
||||
@@ -836,7 +836,7 @@ async fn handle_buy_raydium_cpmm(
|
||||
let sol_lamports = sol_str_to_lamports(sol_amount.to_string().as_str()).unwrap();
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let buy_params = TradeBuyParams {
|
||||
dex_type: DexType::RaydiumCpmm,
|
||||
@@ -1003,7 +1003,7 @@ async fn handle_sell_pumpfun(
|
||||
let recent_blockhash = client.rpc.get_latest_blockhash().await?;
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let sell_params = TradeSellParams {
|
||||
dex_type: DexType::PumpFun,
|
||||
@@ -1061,7 +1061,7 @@ async fn handle_sell_pumpswap(
|
||||
let recent_blockhash = client.rpc.get_latest_blockhash().await?;
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let sell_params = TradeSellParams {
|
||||
dex_type: DexType::PumpSwap,
|
||||
@@ -1118,7 +1118,7 @@ async fn handle_sell_bonk(
|
||||
let recent_blockhash = client.rpc.get_latest_blockhash().await?;
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let sell_params = TradeSellParams {
|
||||
dex_type: DexType::Bonk,
|
||||
@@ -1178,7 +1178,7 @@ async fn handle_sell_raydium_v4(
|
||||
let recent_blockhash = client.rpc.get_latest_blockhash().await?;
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let sell_params = TradeSellParams {
|
||||
dex_type: DexType::RaydiumAmmV4,
|
||||
@@ -1238,7 +1238,7 @@ async fn handle_sell_raydium_cpmm(
|
||||
let recent_blockhash = client.rpc.get_latest_blockhash().await?;
|
||||
|
||||
let gas_fee_strategy = sol_trade_sdk::common::GasFeeStrategy::new();
|
||||
gas_fee_strategy.set_global_fee_strategy(150000,150000, 500000,500000, 0.001, 0.001, 256 * 1024, 0);
|
||||
gas_fee_strategy.set_global_fee_strategy(150000, 150000, 500000, 500000, 0.001, 0.001);
|
||||
|
||||
let sell_params = TradeSellParams {
|
||||
dex_type: DexType::RaydiumCpmm,
|
||||
|
||||
Reference in New Issue
Block a user