Skip to content

Commit

Permalink
chore: add notice in Natspec for isValidSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Nov 3, 2023
1 parent c0090c6 commit fbd6ee0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,11 @@ abstract contract LSP0ERC725AccountCore is
* @param signature A signature that can validate the previous parameter (Hash).
*
* @return returnedStatus A `bytes4` value that indicates if the signature is valid or not.
*
* @custom:warning This function does not enforce by default including the address of this contract in the signature digest.
* It is recommended that protocols or applications using this contract to include the targeted address (= this contract) in the data to sign.
* To ensure that this signature should be valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed
* across different LSP0ERC725Accounts.
*/
function isValidSignature(
bytes32 dataHash,
Expand Down
5 changes: 5 additions & 0 deletions contracts/LSP6KeyManager/LSP6KeyManagerCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ abstract contract LSP6KeyManagerCore is
* If the signer is a controller with the permission `SIGN`, it will return the ERC1271 success value.
*
* @return returnedStatus `0x1626ba7e` on success, or `0xffffffff` on failure.
*
* @custom:warning This function does not enforce by default including the address of this contract in the signature digest.
* It is recommended that protocols or applications using this contract to include the targeted address (= this contract) in the data to sign.
* To ensure that this signature should be valid for a specific LSP6KeyManager and prevent signatures from the same EOA to be replayed
* across different LSP6KeyManager.
*/
function isValidSignature(
bytes32 dataHash,
Expand Down

0 comments on commit fbd6ee0

Please sign in to comment.