Skip to content

Commit

Permalink
Merge branch 'main' into 2024-01-29-cli-refactoring-args
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Jan 30, 2024
2 parents 1700e7b + dd7d1cf commit 058b77e
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 23 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/manual-rs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Manual rs release
on: [workflow_dispatch]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2

- run: nix develop --command cargo release
3 changes: 1 addition & 2 deletions crates/bindings/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "rain_orderbook_bindings"
description = "Bindings for the Rain Orderbook Solidity contracts to Rust types."
version = "0.1.0"
edition.workspace = true
license.workspace = true
homepage.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
alloy-sol-types = { workspace = true, features = ["json"] }
alloy-primitives = { workspace = true }
6 changes: 3 additions & 3 deletions crates/cli/src/commands/order/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use std::path::PathBuf;
#[derive(Args, Clone)]
pub struct CliOrderAddArgs {
#[arg(
short = 'p',
short = 'f',
long,
help = "Path to the .rain file specifying the order"
)]
dotrain_path: PathBuf,
dotrain_file: PathBuf,

#[clap(flatten)]
pub transaction_args: CliTransactionArgs,
Expand All @@ -25,7 +25,7 @@ impl TryFrom<CliOrderAddArgs> for AddOrderArgs {
type Error = anyhow::Error;

fn try_from(val: CliOrderAddArgs) -> Result<Self> {
let text = read_to_string(val.dotrain_path).map_err(|e| anyhow!(e))?;
let text = read_to_string(val.dotrain_file).map_err(|e| anyhow!(e))?;
Ok(Self { dotrain: text })
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/detail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::info;

#[derive(Args, Clone)]
pub struct CliOrderDetailArgs {
#[arg(short, long, help = "ID of the Order")]
#[arg(short='i', long, help = "ID of the Order")]
order_id: String,

#[clap(flatten)]
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rain_orderbook_common::transaction::TransactionArgs;

#[derive(Args, Clone)]
pub struct CliOrderRemoveArgs {
#[arg(short, long, help = "ID of the Order")]
#[arg(short='i', long, help = "ID of the Order")]
order_id: String,

#[clap(flatten)]
Expand Down
6 changes: 3 additions & 3 deletions crates/cli/src/commands/vault/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ use rain_orderbook_common::{deposit::DepositArgs, transaction::TransactionArgs};

#[derive(Args, Clone)]
pub struct CliVaultDepositArgs {
#[arg(short='i', long, help = "The ID of the vault")]
vault_id: U256,

#[arg(short, long, help = "The token address in hex format")]
token: Address,

#[arg(short, long, help = "The ID of the vault")]
vault_id: U256,

#[arg(short, long, help = "The amount to deposit")]
amount: U256,

Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/vault/detail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::info;

#[derive(Args, Clone)]
pub struct CliVaultDetailArgs {
#[arg(short, long, help = "ID of the Vault")]
#[arg(short='i', long, help = "ID of the Vault")]
vault_id: String,

#[clap(flatten)]
Expand Down
6 changes: 3 additions & 3 deletions crates/cli/src/commands/vault/withdraw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ use rain_orderbook_common::withdraw::WithdrawArgs;

#[derive(Args, Clone)]
pub struct CliVaultWithdrawArgs {
#[arg(short='i', long, help = "The ID of the vault")]
vault_id: U256,

#[arg(short, long, help = "The token address in hex format")]
token: Address,

#[arg(short, long, help = "The ID of the vault")]
vault_id: U256,

#[arg(short = 'a', long, help = "The target amount to withdraw")]
target_amount: U256,

Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 058b77e

Please sign in to comment.