-
-
Save jmrocco/5b3bb78ec9f272ab88fb1648aaeaa670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^ 0.5.2; | |
import "openzeppelin-solidity/contracts/access/Roles.sol"; | |
contract someRoles { | |
using Roles for Roles.Role; | |
Roles.Role private roleOne; | |
function onlyRoleOne() public { | |
//only roleOne can use this function | |
require(roleOne.has(msg.sender), "You must be roleOne"); | |
} | |
function anyone() public { | |
//anyone can use this function | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment