refactor: Update GasFeeStrategy to instance-based API and update docs

This commit is contained in:
ysq
2025-10-07 23:12:37 +08:00
parent e13c891cc9
commit 85154f6c01
28 changed files with 269 additions and 120 deletions
+5 -1
View File
@@ -133,8 +133,12 @@ let client = SolanaTrade::new(Arc::new(payer), trade_config).await;
#### 2. Configure Gas Fee Strategy
For detailed information about Gas Fee Strategy, see the [Gas Fee Strategy Reference](docs/GAS_FEE_STRATEGY.md).
```rust
GasFeeStrategy::set_global_fee_strategy(150000, 500000, 0.001, 0.001);
// Create GasFeeStrategy instance
let gas_fee_strategy = GasFeeStrategy::new();
// Set global strategy
gas_fee_strategy.set_global_fee_strategy(150000, 500000, 0.001, 0.001);
```
#### 3. Build Trading Parameters