PWNRevokedNonce.sol contract is used for revoking offers and loan requests. Each offer or loan request has a unique nonce value which can be revoked. It is also possible to set a minimal nonce value to revoke all nonces up to a set value. One PWNRevokedNonce contract corresponds with one offer or loan type.
2. Important links
3. Contract details
PWNRevokedNonce.sol is written in Solidity version 0.8.16
Features
Revoke nonce
Revoke nonce on behalf of the owner
Set a minimal nonce value
Functions
revokeNonce(uint256 nonce)
Overview
Revokes supplied nonce for msg.sender.
This function takes one argument supplied by the caller:
Sets a minimal nonce for msg.sender, thus revoking all nonces with a smaller nonce.
This function takes one argument supplied by the caller:
uint256minNonce
Implementation
functionsetMinNonce(uint256 minNonce) external {// Check that nonce is greater than current min nonceuint256 currentMinNonce = minNonces[msg.sender];if (currentMinNonce >= minNonce)revertInvalidMinNonce();// Set new min nonce value minNonces[msg.sender] = minNonce;// Emit eventemitMinNonceSet(msg.sender, minNonce);}
View Functions
isNonceRevoked
Overview
This function returns a boolean determining if the supplied nonce is valid for a given address.
This function takes two arguments supplied by the caller: