Skip to content

Commit

Permalink
Merge branch 'nish-fix-nonce-updates' of github.com:matter-labs/found…
Browse files Browse the repository at this point in the history
…ry-zksync into nish-fix-nonce-updates
  • Loading branch information
nbaztec committed Jan 17, 2025
2 parents 7e04766 + a88ce2c commit f5da1db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/cheatcodes/spec/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,11 +908,11 @@ interface Vm {
#[cheatcode(group = Testing, safety = Safe)]
function zkRegisterContract(string calldata name, bytes32 evmBytecodeHash, bytes calldata evmDeployedBytecode, bytes calldata evmBytecode, bytes32 zkBytecodeHash, bytes calldata zkDeployedBytecode) external pure;

/// Gets the transaction nonce of an zksync account.
/// Gets the transaction nonce of a zksync account.
#[cheatcode(group = Evm, safety = Safe)]
function zkGetTransactionNonce(address account) external view returns (uint64 nonce);

/// Gets the deployment nonce of an zksync account.
/// Gets the deployment nonce of a zksync account.
#[cheatcode(group = Evm, safety = Safe)]
function zkGetDeploymentNonce(address account) external view returns (uint64 nonce);

Expand Down
2 changes: 1 addition & 1 deletion crates/zksync/core/src/vm/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ where

let initiator_nonce_key = get_nonce_key(&initiator_address);

// NOTE(zk) We need to revert the tx nonce of the initiator as we intercept and dispatch
// NOTE(zk): We need to revert the tx nonce of the initiator as we intercept and dispatch
// CALLs and CREATEs to the zkEVM. The CREATEs always increment the deployment nonce
// which must be persisted, but the tx nonce increase must be reverted.
if let Some(initiator_nonce) = modified_storage.get_mut(&initiator_nonce_key) {
Expand Down

0 comments on commit f5da1db

Please sign in to comment.