Remove 'external' functions (#2162)
* Remove _grantRole and _revokeRole, replace with _setupRole * Make all external AccessControl functions public * Remove Ownable._transferOwnership * Rename ERC721's _safeTransferFrom and _transferFrom to _safeTransfer and _transfer * Make all ERC721 external functions public * Make all miscelaneous external functions public instead * Add changelog entry * Move calldata arguments to memory * Update contracts/access/AccessControl.sol Co-Authored-By: Francisco Giordano <frangio.1@gmail.com> * Restrict setupRole to the constructor * Replace isConstructor for !isContract Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -4,10 +4,14 @@ import "../access/AccessControl.sol";
|
||||
|
||||
contract AccessControlMock is AccessControl {
|
||||
constructor() public {
|
||||
_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
|
||||
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
|
||||
}
|
||||
|
||||
function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {
|
||||
_setRoleAdmin(roleId, adminRoleId);
|
||||
}
|
||||
|
||||
function setupRole(bytes32 roleId, address account) public {
|
||||
_setupRole(roleId, account);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user