Skip to content

Commit

Permalink
Update contracts/ERC7432/ERC7432.sol
Browse files Browse the repository at this point in the history
Co-authored-by: Ernani São Thiago <ernani@orium.network>
  • Loading branch information
karacurt and ernanirst authored Sep 19, 2023
1 parent 9ac8501 commit 354d7ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/ERC7432/ERC7432.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ contract ERC7432 is IERC7432 {
address _caller
) internal {
bool _isRevocable = roleAssignments[_revoker][_grantee][_tokenAddress][_tokenId][_role].revocable;
require(_isRevocable || _caller == _grantee, "ERC7432: Account can't revoke this role");
require(_isRevocable, "ERC7432: Role is not revocable");
require(_caller == _grantee, "ERC7432: Caller is not allowed to revoke this role");
delete roleAssignments[_revoker][_grantee][_tokenAddress][_tokenId][_role];
delete latestGrantees[_revoker][_tokenAddress][_tokenId][_role];
emit RoleRevoked(_role, _tokenAddress, _tokenId, _revoker, _grantee);
Expand Down

0 comments on commit 354d7ae

Please # to comment.