Skip to content

Commit

Permalink
fix: add back removed zksync zkcast subcommands (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
dutterbutter authored Feb 7, 2024
1 parent 2e9e62a commit 98865f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/zkcast/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ async fn main() -> Result<()> {
println!("{}", Cast::new(&provider).transaction(tx_hash, field, raw, json).await?)
}

Subcommands::ZkSendTx(cmd) => cmd.run().await?,
Subcommands::ZkDepositTx(cmd) => cmd.run().await?,

// 4Byte
Subcommands::FourByte { selector } => {
let selector = stdin::unwrap_line(selector)?;
Expand Down
13 changes: 13 additions & 0 deletions crates/zkcast/bin/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::cmd::{
access_list::AccessListArgs, bind::BindArgs, call::CallArgs, create2::Create2Args,
estimate::EstimateArgs, find_block::FindBlockArgs, interface::InterfaceArgs, logs::LogsArgs,
rpc::RpcArgs, run::RunArgs, send::SendTxArgs, storage::StorageArgs, wallet::WalletSubcommands,
zk_deposit::ZkDepositTxArgs, zk_send::ZkSendTxArgs,
};
use alloy_primitives::{Address, B256, U256};
use clap::{Parser, Subcommand, ValueHint};
Expand Down Expand Up @@ -435,6 +436,18 @@ pub enum Subcommands {
#[clap(name = "send", visible_alias = "s")]
SendTx(SendTxArgs),

/// Sends zkSync specific transactions for L2 → L1 Withdrawals
#[clap(name = "zk-send")]
#[clap(visible_aliases = ["zks", "zksend"])]
#[clap(about = "Sign and publish a zksync transaction.")]
ZkSendTx(ZkSendTxArgs),

/// Sends zkSync specific transactions for L1 → L2 Deposits
#[clap(name = "zk-deposit")]
#[clap(visible_aliases = ["zkd", "zkdeposit"])]
#[clap(about = "Bridge Assets from L1 to L2.")]
ZkDepositTx(ZkDepositTxArgs),

/// Publish a raw transaction to the network.
#[clap(name = "publish", visible_alias = "p")]
PublishTx {
Expand Down

0 comments on commit 98865f2

Please sign in to comment.