File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ contract SignatureChecker is Ownable {
1212 /// valid digests for a given address
1313 mapping (address => bytes32 ) public digests;
1414
15- uint256 public constant BN254_MODULUS =
16- 21888242871839275222246405745257275088548364400416034343698204186575808495617 ;
17-
1815 /// @notice Error for invalid signatures
1916 error InvalidSignature ();
2017 /// @notice Error for invalid notary addresses
@@ -23,6 +20,8 @@ contract SignatureChecker is Ownable {
2320 error InvalidDigest ();
2421 /// @notice Error for invalid signature length
2522 error InvalidSignatureLength ();
23+ /// @notice Error for duplicate proof, meaning the proofs is already associated with another address
24+ error DuplicateProof ();
2625
2726 /// @notice Constructor configures the notary address
2827 /// @param _notaryAddress The address of the notary to add
@@ -81,6 +80,10 @@ contract SignatureChecker is Ownable {
8180 if (recoveredSigner != signer) {
8281 revert InvalidSignature ();
8382 }
83+ if (digests[msg .sender ] == digest) {
84+ revert DuplicateProof ();
85+ }
86+
8487 digests[msg .sender ] = digest;
8588 return true ;
8689 }
You can’t perform that action at this time.
0 commit comments