- feat(gas): add comprehensive gas fee strategy management system * Implement GasFeeStrategyType with Default/LowTipHighCuPrice/HighTipLowCuPrice strategies * Add dynamic gas fee configuration per SWQOS service and trade type * Integrate arc-swap for thread-safe strategy updates - docs: restructure documentation with dedicated guides * Add ADDRESS_LOOKUP_TABLE.md/CN.md for lookup table configuration * Add NONCE_CACHE.md/CN.md for nonce management documentation * Add TRADING_PARAMETERS.md/CN.md for comprehensive parameter guides * Simplify main README.md with focused overview - refactor: update all examples with new gas fee strategy integration * Modernize 14 trading examples with consistent parameter handling * Improve error handling and configuration management * Enhance parallel trading implementation
23 lines
578 B
Rust
Executable File
23 lines
578 B
Rust
Executable File
use crate::swqos::SwqosConfig;
|
|
use solana_sdk::commitment_config::CommitmentConfig;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct TradeConfig {
|
|
pub rpc_url: String,
|
|
pub swqos_configs: Vec<SwqosConfig>,
|
|
pub commitment: CommitmentConfig,
|
|
}
|
|
|
|
impl TradeConfig {
|
|
pub fn new(
|
|
rpc_url: String,
|
|
swqos_configs: Vec<SwqosConfig>,
|
|
commitment: CommitmentConfig,
|
|
) -> Self {
|
|
Self { rpc_url, swqos_configs, commitment }
|
|
}
|
|
}
|
|
|
|
pub type SolanaRpcClient = solana_client::nonblocking::rpc_client::RpcClient;
|
|
pub type AnyResult<T> = anyhow::Result<T>;
|