From 1e121ec34b4639039846477236f8dd69413bdd09 Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Tue, 26 Sep 2023 12:53:30 -0300 Subject: [PATCH] remove unused code from Nonces --- .gas-report | 2 +- contracts/Nonces.sol | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.gas-report b/.gas-report index 5c6a0fd..1efbbe0 100644 --- a/.gas-report +++ b/.gas-report @@ -1,7 +1,7 @@ | contracts/MiniMeToken.sol:MiniMeToken contract | | | | | | |------------------------------------------------|-----------------|-------|--------|-------|---------| | Deployment Cost | Deployment Size | | | | | -| 2088237 | 11855 | | | | | +| 1994000 | 11855 | | | | | | Function Name | min | avg | median | max | # calls | | DOMAIN_SEPARATOR | 387 | 387 | 387 | 387 | 10 | | allowance | 0 | 190 | 0 | 763 | 16 | diff --git a/contracts/Nonces.sol b/contracts/Nonces.sol index c512e33..d00b7b0 100644 --- a/contracts/Nonces.sol +++ b/contracts/Nonces.sol @@ -32,14 +32,4 @@ abstract contract Nonces { return _nonces[owner]++; } } - - /** - * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. - */ - function _useCheckedNonce(address owner, uint256 nonce) internal virtual { - uint256 current = _useNonce(owner); - if (nonce != current) { - revert InvalidAccountNonce(owner, current); - } - } }