Skip to content

Commit

Permalink
fix: nonce limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Oct 12, 2023
1 parent 96b97db commit 8110aaf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,12 @@ export class HardhatNode extends EventEmitter {
)?.[1];

if (overridenAccount?.nonce !== undefined) {
const MAX_NONCE = 2n ** 64n - 1n;
if (overridenAccount.nonce > MAX_NONCE) {
throw new InvalidInputError(
`The 'nonce' property should occupy a maximum of 8 bytes (nonce=${nonce}).`
);
}
return overridenAccount.nonce;
}

Expand Down

0 comments on commit 8110aaf

Please sign in to comment.