Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyjosh committed Jan 8, 2024
1 parent 69969ea commit 2af497c
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
21 changes: 13 additions & 8 deletions crates/cli/src/commands/deposit.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -25,9 +25,14 @@ impl Deposit {
self.transaction_args.orderbook_address.parse::<Address>()?,
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(())
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mod order;
mod deposit;
mod order;

pub use self::{order::*, deposit::*};
pub use self::{deposit::*, order::*};
4 changes: 2 additions & 2 deletions crates/cli/src/commands/order.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::Parser;
use anyhow::Result;
use clap::Parser;

#[derive(Parser)]
pub enum Order {
Expand All @@ -19,4 +19,4 @@ pub async fn ls() -> anyhow::Result<()> {
let orders = rain_orderbook_subgraph_queries::orders::query().await?;
dbg!(orders);
Ok(())
}
}
4 changes: 2 additions & 2 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::Subcommand;

use crate::commands::{Order, Deposit};
use crate::commands::{Deposit, Order};

mod commands;
mod transaction;
Expand All @@ -20,4 +20,4 @@ impl Orderbook {
Orderbook::Deposit(deposit) => deposit.execute().await,
}
}
}
}
4 changes: 2 additions & 2 deletions crates/cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::Parser;
use anyhow::Result;
use clap::Parser;
use rain_orderbook_cli::Orderbook;

#[derive(Parser)]
Expand All @@ -14,4 +14,4 @@ async fn main() -> Result<()> {

let cli = Cli::parse();
cli.orderbook.execute().await
}
}
2 changes: 1 addition & 1 deletion crates/cli/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ pub struct TransactionArgs {

#[arg(short, long, help = "Blocknative API Key")]
pub blocknative_api_key: Option<String>,
}
}
2 changes: 1 addition & 1 deletion crates/transaction/src/execute.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion crates/transaction/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod execute;
pub mod gasoracle;
pub mod gasoracle;

0 comments on commit 2af497c

Please sign in to comment.