use aspens::commands::trading::send_order::arborter_pb::{SendOrderResponse, TransactionHash};
fn main() {
let response = SendOrderResponse {
order_in_book: true,
order: None,
trades: vec![],
transaction_hashes: vec![
TransactionHash {
hash_type: "deposit".to_string(),
hash_value: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
.to_string(),
},
TransactionHash {
hash_type: "settlement".to_string(),
hash_value: "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
.to_string(),
},
],
current_orderbook: vec![],
order_id: 0,
};
println!("=== CLI Output Example ===");
println!("{}", response);
println!("\n=== Formatted Transaction Hashes ===");
for formatted_hash in response.get_formatted_transaction_hashes() {
println!(" {}", formatted_hash);
}
println!("\n=== REPL Output Example ===");
println!("aspens> buy 1000000000000000000 --limit-price 2500000000000000000000000000000000000");
println!("Order sent successfully!");
println!("Transaction hashes:");
for formatted_hash in response.get_formatted_transaction_hashes() {
println!(" {}", formatted_hash);
}
}