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