diff --git a/crates/cli/src/commands/deposit.rs b/crates/cli/src/commands/deposit.rs index 9b007e46c..aeb67fc0e 100644 --- a/crates/cli/src/commands/deposit.rs +++ b/crates/cli/src/commands/deposit.rs @@ -1,19 +1,19 @@ -use clap::Parser; +use crate::transaction::TransactionArgs; +use alloy_primitives::{Address, U256}; +use alloy_sol_types::SolCall; use anyhow::Result; use clap::Args; -use alloy_primitives::{U256, Address}; +use clap::Parser; +use ethers_signers::{HDPath, Ledger}; use rain_orderbook_bindings::IOrderBookV3::depositCall; -use alloy_sol_types::SolCall; use rain_orderbook_transactions::execute::execute_transaction; -use crate::transaction::TransactionArgs; -use ethers_signers::{Ledger, HDPath}; #[derive(Parser)] pub struct Deposit { #[clap(flatten)] deposit_args: DepositArgs, #[clap(flatten)] - transaction_args: TransactionArgs + transaction_args: TransactionArgs, } impl Deposit { @@ -25,9 +25,14 @@ impl Deposit { self.transaction_args.orderbook_address.parse::
()?, U256::from(0), self.transaction_args.rpc_url, - Ledger::new(HDPath::LedgerLive(self.transaction_args.derivation_path.unwrap_or(0)), self.transaction_args.chain_id).await?, + Ledger::new( + HDPath::LedgerLive(self.transaction_args.derivation_path.unwrap_or(0)), + self.transaction_args.chain_id, + ) + .await?, self.transaction_args.blocknative_api_key, - ).await?; + ) + .await?; Ok(()) } } diff --git a/crates/cli/src/commands/mod.rs b/crates/cli/src/commands/mod.rs index c201cc0e1..b180b8b73 100644 --- a/crates/cli/src/commands/mod.rs +++ b/crates/cli/src/commands/mod.rs @@ -1,4 +1,4 @@ -mod order; mod deposit; +mod order; -pub use self::{order::*, deposit::*}; \ No newline at end of file +pub use self::{deposit::*, order::*}; diff --git a/crates/cli/src/commands/order.rs b/crates/cli/src/commands/order.rs index 8d5c0cf2e..abb6c8135 100644 --- a/crates/cli/src/commands/order.rs +++ b/crates/cli/src/commands/order.rs @@ -1,5 +1,5 @@ -use clap::Parser; use anyhow::Result; +use clap::Parser; #[derive(Parser)] pub enum Order { @@ -19,4 +19,4 @@ pub async fn ls() -> anyhow::Result<()> { let orders = rain_orderbook_subgraph_queries::orders::query().await?; dbg!(orders); Ok(()) -} \ No newline at end of file +} diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 3ea8a7079..9356c9465 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,7 +1,7 @@ use anyhow::Result; use clap::Subcommand; -use crate::commands::{Order, Deposit}; +use crate::commands::{Deposit, Order}; mod commands; mod transaction; @@ -20,4 +20,4 @@ impl Orderbook { Orderbook::Deposit(deposit) => deposit.execute().await, } } -} \ No newline at end of file +} diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 26ea48d14..71de8d4c6 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -1,5 +1,5 @@ -use clap::Parser; use anyhow::Result; +use clap::Parser; use rain_orderbook_cli::Orderbook; #[derive(Parser)] @@ -14,4 +14,4 @@ async fn main() -> Result<()> { let cli = Cli::parse(); cli.orderbook.execute().await -} \ No newline at end of file +} diff --git a/crates/cli/src/transaction.rs b/crates/cli/src/transaction.rs index 5a74a7d8b..489e55fa8 100644 --- a/crates/cli/src/transaction.rs +++ b/crates/cli/src/transaction.rs @@ -16,4 +16,4 @@ pub struct TransactionArgs { #[arg(short, long, help = "Blocknative API Key")] pub blocknative_api_key: Option, -} \ No newline at end of file +} diff --git a/crates/transaction/src/execute.rs b/crates/transaction/src/execute.rs index 316006278..77f86e617 100644 --- a/crates/transaction/src/execute.rs +++ b/crates/transaction/src/execute.rs @@ -1,4 +1,4 @@ -use alloy_primitives::{Address, U256, hex}; +use alloy_primitives::{hex, Address, U256}; use ethers::prelude::SignerMiddleware; use ethers::types::TransactionReceipt; use ethers::{ diff --git a/crates/transaction/src/lib.rs b/crates/transaction/src/lib.rs index cbc986e48..38b3a5d0b 100644 --- a/crates/transaction/src/lib.rs +++ b/crates/transaction/src/lib.rs @@ -1,2 +1,2 @@ pub mod execute; -pub mod gasoracle; \ No newline at end of file +pub mod gasoracle;