From 91d55087f86dcb771a747c46d7117265b6c88472 Mon Sep 17 00:00:00 2001 From: Cashmaney Date: Tue, 23 Jan 2024 15:27:55 +0000 Subject: [PATCH] deploy: 2750921a34087758c1a7078830b5c3d04b49a764 --- contracts/access/{Permission.sol => Permissioned.sol} | 4 ++-- docs/Permissioned.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename contracts/access/{Permission.sol => Permissioned.sol} (94%) diff --git a/contracts/access/Permission.sol b/contracts/access/Permissioned.sol similarity index 94% rename from contracts/access/Permission.sol rename to contracts/access/Permissioned.sol index 32c8edb..941177e 100644 --- a/contracts/access/Permission.sol +++ b/contracts/access/Permissioned.sol @@ -20,7 +20,7 @@ abstract contract Permissioned is EIP712 { /// @notice Modifier that requires the provided signature to be signed by the message sender /// @param permission Data structure containing the public key and the signature to be verified - modifier onlySignedPublicKey(Permission memory permission) { + modifier onlySender(Permission memory permission) { bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( keccak256("Permissioned(bytes32 publicKey)"), permission.publicKey @@ -34,7 +34,7 @@ abstract contract Permissioned is EIP712 { /// @notice Modifier that requires the provided signature to be signed by a specific owner address /// @param permission Data structure containing the public key and the signature to be verified /// @param owner The expected owner of the public key to match against the recovered signer - modifier onlySignedPublicKeyOwner(Permission memory permission, address owner) { + modifier onlyPermitted(Permission memory permission, address owner) { bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( keccak256("Permissioned(bytes32 publicKey)"), permission.publicKey diff --git a/docs/Permissioned.md b/docs/Permissioned.md index 493be27..1dff047 100644 --- a/docs/Permissioned.md +++ b/docs/Permissioned.md @@ -31,10 +31,10 @@ constructor() internal _Constructor that initializes EIP712 domain separator with a name and version solhint-disable-next-line func-visibility, no-empty-blocks_ -### onlySignedPublicKey +### onlySender ```solidity -modifier onlySignedPublicKey(struct Permission permission) +modifier onlySender(struct Permission permission) ``` Modifier that requires the provided signature to be signed by the message sender @@ -45,10 +45,10 @@ Modifier that requires the provided signature to be signed by the message sender | ---- | ---- | ----------- | | permission | struct Permission | Data structure containing the public key and the signature to be verified | -### onlySignedPublicKeyOwner +### onlyPermitted ```solidity -modifier onlySignedPublicKeyOwner(struct Permission permission, address owner) +modifier onlyPermitted(struct Permission permission, address owner) ``` Modifier that requires the provided signature to be signed by a specific owner address