Skip to content

Commit

Permalink
fix: nonce decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
taturosati committed Sep 4, 2024
1 parent 3dd2268 commit 1b8c291
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions batcher/aligned/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ pub struct SubmitArgs {
long = "max_fee",
default_value = "1300000000000000" // 13_000 gas per proof * 100 gwei gas price (upper bound)
)]
max_fee: String,
max_fee: String, // String because U256 expects hex
#[arg(name = "Nonce", long = "nonce")]
nonce: Option<U256>,
nonce: Option<String>, // String because U256 expects hex
}

#[derive(Parser, Debug)]
Expand Down Expand Up @@ -304,8 +304,8 @@ async fn main() -> Result<(), AlignedError> {

let batcher_eth_address = submit_args.payment_service_addr.clone();

let nonce = match submit_args.nonce {
Some(nonce) => nonce,
let nonce = match &submit_args.nonce {
Some(nonce) => U256::from_dec_str(nonce).map_err(|_| SubmitError::InvalidNonce)?,
None => {
get_nonce(
&eth_rpc_url,
Expand Down

0 comments on commit 1b8c291

Please sign in to comment.