remove unused code from Nonces

This commit is contained in:
Ricardo Guilherme Schmidt 2023-09-26 12:53:30 -03:00
parent 6642de6bbb
commit d4ad61b935
2 changed files with 1 additions and 11 deletions

View File

@ -1,7 +1,7 @@
| contracts/MiniMeToken.sol:MiniMeToken contract | | | | | | | contracts/MiniMeToken.sol:MiniMeToken contract | | | | | |
|------------------------------------------------|-----------------|-------|--------|-------|---------| |------------------------------------------------|-----------------|-------|--------|-------|---------|
| Deployment Cost | Deployment Size | | | | | | Deployment Cost | Deployment Size | | | | |
| 2088237 | 11855 | | | | | | 1994000 | 11855 | | | | |
| Function Name | min | avg | median | max | # calls | | Function Name | min | avg | median | max | # calls |
| DOMAIN_SEPARATOR | 387 | 387 | 387 | 387 | 10 | | DOMAIN_SEPARATOR | 387 | 387 | 387 | 387 | 10 |
| allowance | 0 | 190 | 0 | 763 | 16 | | allowance | 0 | 190 | 0 | 763 | 16 |

View File

@ -32,14 +32,4 @@ abstract contract Nonces {
return _nonces[owner]++; 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);
}
}
} }