feat: add transaction simulation support and close_mint_token_ata parameter
- Add `simulate` parameter to TradeBuyParams and TradeSellParams for transaction simulation - Add `close_mint_token_ata` parameter to TradeSellParams for closing mint token ATA - Implement simulate_transaction function to validate transactions without blockchain submission - Update all examples to include new parameters (simulate: false, close_mint_token_ata: false) - Add comprehensive documentation for transaction simulation feature - Show detailed simulation output including logs, compute units, and errors - Print timing metrics in English for better international compatibility
This commit is contained in:
@@ -102,6 +102,7 @@ async fn test_middleware() -> AnyResult<()> {
|
||||
durable_nonce: None,
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
};
|
||||
client.buy(buy_params).await?;
|
||||
println!("tip: This transaction will not succeed because we're using a test account. You can modify the code to initialize the payer with your own private key");
|
||||
|
||||
Reference in New Issue
Block a user