Skip to content

Commit

Permalink
fix(zk:link): new nonce types
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrq committed Jan 24, 2025
1 parent 7a75263 commit b41be0d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
70 changes: 35 additions & 35 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions crates/strategy/zksync/src/executor/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ impl ZksyncExecutorStrategyRunner {
// fetch the full nonce to preserve account's tx nonce
let full_nonce = executor.backend.storage(address, slot)?;
let full_nonce = foundry_zksync_core::state::parse_full_nonce(full_nonce);
let new_full_nonce = foundry_zksync_core::state::new_full_nonce(full_nonce.tx_nonce, nonce);
let new_full_nonce =
foundry_zksync_core::state::new_full_nonce(full_nonce.tx_nonce, nonce as u128);
executor.backend.insert_account_storage(address, slot, new_full_nonce)?;

Ok(())
Expand Down Expand Up @@ -113,7 +114,7 @@ impl ExecutorStrategyRunner for ZksyncExecutorStrategyRunner {
let full_nonce = executor.backend.storage(address, slot)?;
let full_nonce = foundry_zksync_core::state::parse_full_nonce(full_nonce);

Ok(full_nonce.tx_nonce)
Ok(full_nonce.tx_nonce as u64)
}

fn link(
Expand Down

0 comments on commit b41be0d

Please sign in to comment.