Skip to content

Commit

Permalink
Fix nonce not starting at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed Jul 4, 2024
1 parent 3a09b39 commit c5766a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system-contracts/contracts/ContractDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ contract ContractDeployer is IContractDeployer, ISystemContract {
// Subtract 1 for EOA since the nonce has already been incremented for this transaction
uint256 senderNonce = msg.sender == tx.origin
? NONCE_HOLDER_SYSTEM_CONTRACT.getMinNonce(msg.sender) - 1
: NONCE_HOLDER_SYSTEM_CONTRACT.incrementDeploymentNonce(msg.sender);
: NONCE_HOLDER_SYSTEM_CONTRACT.incrementDeploymentNonce(msg.sender) + 1;
address newAddress = Utils.getNewAddressCreateEVM(msg.sender, senderNonce);
_evmDeployOnAddress(newAddress, _initCode);
return newAddress;
Expand Down

0 comments on commit c5766a0

Please sign in to comment.