Add solidity language to missing code snippets (#3992)

This commit is contained in:
Ernesto García
2023-01-24 15:00:03 -06:00
committed by GitHub
parent b1c2c43d6a
commit a34dd8bb1b
9 changed files with 13 additions and 12 deletions

View File

@ -19,14 +19,14 @@ import "../utils/introspection/ERC165.sol";
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...