You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that the current implementation does not allow querying for the last used or first unused (depends on the preference) nonce. So the client applications would need to keep track of all the nonces, and this could prove to be an issue in case the client application looses the nonce history as it would have to retry all the nonces until it finds the first unused one.
Perhaps something like this would allow the client app to query for the first unused nonce:
mapping(address => uint) nonces;
function getNonce(address spender) public view returns (uint) {
return nonces[spender] + 1;
}
The text was updated successfully, but these errors were encountered:
Great work!
It seems to me that the current implementation does not allow querying for the last used or first unused (depends on the preference) nonce. So the client applications would need to keep track of all the nonces, and this could prove to be an issue in case the client application looses the nonce history as it would have to retry all the nonces until it finds the first unused one.
Perhaps something like this would allow the client app to query for the first unused nonce:
The text was updated successfully, but these errors were encountered: