feat: add gas fee strategy system with examples

- Add GasFeeStrategy module supporting normal and high-low fee strategies
- Initialize gas fee strategies in all examples
- Update documentation and README with gas fee strategy configuration
- Improve nonce cache documentation emphasizing latest nonce usage
- Adjust default gas fee configuration parameters
- Remove duplicate imports and unused constant references
This commit is contained in:
ysq
2025-09-19 15:46:51 +08:00
parent e8abb65e2e
commit a53038855e
27 changed files with 342 additions and 83 deletions
+2
View File
@@ -35,6 +35,8 @@ async fn create_solana_trade_client() -> AnyResult<SolanaTrade> {
];
let trade_config = TradeConfig::new(rpc_url, swqos_configs, commitment);
let solana_trade_client = SolanaTrade::new(Arc::new(payer), trade_config).await;
// init gas fee strategy
sol_trade_sdk::common::GasFeeStrategy::init_builtin_fee_strategies();
println!("SolanaTrade client created successfully!");
Ok(solana_trade_client)
}