{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/Permissions.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol",
        "lib/openzeppelin-contracts/contracts/access/AccessControl.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
        "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract Permissions is AccessControl, ReentrancyGuard {\n  using SafeERC20 for ERC20;\n\n  // Timelock has absolute power across the system\n  bytes32 public constant TIMELOCK_ROLE =\n    0xf66846415d2bf9eabda9e84793ff9c0ea96d87f50fc41e66aa16469c6a442f05;\n  bytes32 public constant ADMIN_ROLE =\n    0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775;\n  bytes32 public constant INTERNAL_WHITELIST_ROLE =\n    0xe5b3f2579db3f05863c923698749c1a62f6272567d652899a476ff0172381367;\n\n  IRepository public repository;\n\n  function _initialSetup(address _repository) internal {\n    require(_repository != address(0), \"Perm: Repo setup 0x0\");\n    _setRoleAdmin(TIMELOCK_ROLE, TIMELOCK_ROLE);\n    _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);\n    _setRoleAdmin(INTERNAL_WHITELIST_ROLE, ADMIN_ROLE);\n\n    repository = IRepository(_repository);\n  }\n\n  function grantRoleMultiple(bytes32 role, address[] calldata addresses)\n    external\n    onlyRoleMalt(getRoleAdmin(role), \"Only role admin\")\n  {\n    uint256 length = addresses.length;\n    for (uint256 i; i < length; ++i) {\n      address account = addresses[i];\n      require(account != address(0), \"0x0\");\n      _grantRole(role, account);\n    }\n  }\n\n  function emergencyWithdrawGAS(address payable destination)\n    external\n    onlyRoleMalt(TIMELOCK_ROLE, \"Only timelock can assign roles\")\n  {\n    require(destination != address(0), \"Withdraw: addr(0)\");\n    // Transfers the entire balance of the Gas token to destination\n    (bool success, ) = destination.call{value: address(this).balance}(\"\");\n    require(success, \"emergencyWithdrawGAS error\");\n  }\n\n  function emergencyWithdraw(address _token, address destination)\n    external\n    onlyRoleMalt(TIMELOCK_ROLE, \"Must have timelock role\")\n  {\n    require(destination != address(0), \"Withdraw: addr(0)\");\n    // Transfers the entire balance of an ERC20 token at _token to destination\n    ERC20 token = ERC20(_token);\n    token.safeTransfer(destination, token.balanceOf(address(this)));\n  }\n\n  function partialWithdrawGAS(address payable destination, uint256 amount)\n    external\n    onlyRoleMalt(TIMELOCK_ROLE, \"Must have timelock role\")\n  {\n    require(destination != address(0), \"Withdraw: addr(0)\");\n    (bool success, ) = destination.call{value: amount}(\"\");\n    require(success, \"partialWithdrawGAS error\");\n  }\n\n  function partialWithdraw(\n    address _token,\n    address destination,\n    uint256 amount\n  ) external onlyRoleMalt(TIMELOCK_ROLE, \"Only timelock can assign roles\") {\n    require(destination != address(0), \"Withdraw: addr(0)\");\n    ERC20 token = ERC20(_token);\n    token.safeTransfer(destination, amount);\n  }\n\n  function hasRole(bytes32 role, address account)\n    public\n    view\n    override\n    returns (bool)\n  {\n    return super.hasRole(role, account) || repository.hasRole(role, account);\n  }\n\n  /*\n   * INTERNAL METHODS\n   */\n  function _transferRole(\n    address newAccount,\n    address oldAccount,\n    bytes32 role\n  ) internal {\n    _revokeRole(role, oldAccount);\n    _grantRole(role, newAccount);\n  }\n\n  function _roleSetup(bytes32 role, address account) internal {\n    _grantRole(role, account);\n    _setRoleAdmin(role, ADMIN_ROLE);\n  }\n\n  function _onlyRoleMalt(bytes32 role, string memory reason) internal view {\n    require(hasRole(role, _msgSender()), reason);\n  }\n\n  // Using internal function calls here reduces compiled bytecode size\n  modifier onlyRoleMalt(bytes32 role, string memory reason) {\n    _onlyRoleMalt(role, reason);\n    _;\n  }\n\n  // verifies that the caller is not a contract.\n  modifier onlyEOA() {\n    require(\n      hasRole(INTERNAL_WHITELIST_ROLE, _msgSender()) || msg.sender == tx.origin,\n      \"Perm: Only EOA\"\n    );\n    _;\n  }\n}"
}