Blockwell

ROOK

ERC20

This contract is an ERC20 token.

Name ROOK
Symbol ROOK
Decimals 18
Total Supply 1,189,000 ROOK

About link

KeeperDAO (ROOK) is a cryptocurrency and operates on the Ethereum platform. KeeperDAO has a current supply of 1,189,000 with 580,061.86953662 in circulation. The last known price of KeeperDAO is 114.48785688 USD and is down -1.04 over the last 24 hours. It is currently trading on 21 active market(s) with $884,322.23 traded over the last 24 hours. More information can be found at https://app.keeperdao.com/.

Stats

Public Functions 25
Event Types 6
Code Size 33,438 bytes

Events (6) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

MinterAdded Event

Parameters help
account
address help

MinterRemoved Event

Parameters help
account
address help

OperatorAdded Event

Parameters help
account
address help

OperatorRemoved Event

Parameters help
account
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_decimals Variable

uint8 help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

initialized Variable

bool help
Internal Variable

initializing Variable

bool help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

_balances Variable

mapping(address => uint256) help
Internal Variable

_allowances Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

_totalSupply Variable

uint256 help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

_minters Variable

Roles.Role help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

______gap Variable

uint256[] help
Internal Variable

recoverableTokensBlacklist Variable

mapping(address => bool) help
Internal Variable

_operators Variable

Roles.Role help
Internal Variable

operators Variable

address[] help
Internal Variable

Functions Expand All Collapse All

initialize keyboard_arrow_up

Parameters help

Name Type
sender
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function initialize(address sender) public initializer {
  MinterRole.initialize(sender);
}

isOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOperator(address account) public view returns (bool) {
  return _operators.has(account);
}

addOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function addOperator(address account) public onlyOperator {
  _addOperator(account);
}

renounceOperator keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function renounceOperator() public {
  _removeOperator(msg.sender);
}

blacklistRecoverableToken keyboard_arrow_up

Parameters help

Name Type
_token
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function blacklistRecoverableToken(address _token) public onlyOperator {
  recoverableTokensBlacklist[_token] = true;
}

recoverTokens keyboard_arrow_up

Parameters help

Name Type
_token
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function recoverTokens(address _token) external onlyOperator {
  require(
    !recoverableTokensBlacklist[_token],
    "CanReclaimTokens: token is not recoverable"
  );

  if (_token == address(0x0)) {
    (bool success, ) = msg.sender.call.value(address(this).balance)("");
    require(success, "Transfer Failed");
  } else {
    ERC20(_token).safeTransfer(
      msg.sender,
      ERC20(_token).balanceOf(address(this))
    );
  }
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return _totalSupply;
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address account) public view returns (uint256) {
  return _balances[account];
}

Parameters help

Name Type
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address recipient, uint256 amount) public returns (bool) {
  _transfer(_msgSender(), recipient, amount);
  return true;
}

Parameters help

Name Type
owner
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address owner, address spender)
  public
  view
  returns (uint256)
{
  return _allowances[owner][spender];
}

Parameters help

Name Type
spender
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approve(address spender, uint256 amount) public returns (bool) {
  _approve(_msgSender(), spender, amount);
  return true;
}

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address sender,
  address recipient,
  uint256 amount
) public returns (bool) {
  _transfer(sender, recipient, amount);
  _approve(
    sender,
    _msgSender(),
    _allowances[sender][_msgSender()].sub(
      amount,
      "ERC20: transfer amount exceeds allowance"
    )
  );
  return true;
}

Parameters help

Name Type
spender
address help
addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function increaseAllowance(address spender, uint256 addedValue)
  public
  returns (bool)
{
  _approve(
    _msgSender(),
    spender,
    _allowances[_msgSender()][spender].add(addedValue)
  );
  return true;
}

Parameters help

Name Type
spender
address help
subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
  public
  returns (bool)
{
  _approve(
    _msgSender(),
    spender,
    _allowances[_msgSender()][spender].sub(
      subtractedValue,
      "ERC20: decreased allowance below zero"
    )
  );
  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burn(uint256 amount) public {
  _burn(_msgSender(), amount);
}

burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burnFrom(address account, uint256 amount) public {
  _burnFrom(account, amount);
}

isMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function isMinter(address account) public view returns (bool) {
  return _minters.has(account);
}

addMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
function addMinter(address account) public onlyMinter {
  _addMinter(account);
}

renounceMinter keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function renounceMinter() public {
  _removeMinter(_msgSender());
}

mint keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null

Requirements help

Source Code
function mint(address account, uint256 amount)
  public
  onlyMinter
  returns (bool)
{
  _mint(account, amount);
  return true;
}

initialize keyboard_arrow_up

Parameters help

Name Type
name
string help
symbol
string help
decimals
uint8 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function initialize(
  string memory name,
  string memory symbol,
  uint8 decimals
) public initializer {
  // Initialize the minter and pauser roles
  ERC20Mintable.initialize(msg.sender);
  CanReclaimTokens.initialize(msg.sender);
  ERC20Detailed.initialize(name, symbol, decimals);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view returns (string memory) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() public view returns (string memory) {
  return _symbol;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function decimals() public view returns (uint8) {
  return _decimals;
}

initialize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function initialize() public initializer {
  // Initialize the StandardToken
  StandardToken.initialize("ROOK", "ROOK", 18);
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal ERC20._transfer keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address sender,
  address recipient,
  uint256 amount
) internal {
  require(sender != address(0), "ERC20: transfer from the zero address");
  require(recipient != address(0), "ERC20: transfer to the zero address");

  _balances[sender] = _balances[sender].sub(
    amount,
    "ERC20: transfer amount exceeds balance"
  );
  _balances[recipient] = _balances[recipient].add(amount);
  emit Transfer(sender, recipient, amount);
}

internal ERC20._mint keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address account, uint256 amount) internal {
  require(account != address(0), "ERC20: mint to the zero address");

  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);
  emit Transfer(address(0), account, amount);
}

internal ERC20._burn keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(address account, uint256 amount) internal {
  require(account != address(0), "ERC20: burn from the zero address");

  _balances[account] = _balances[account].sub(
    amount,
    "ERC20: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);
  emit Transfer(account, address(0), amount);
}

internal ERC20._approve keyboard_arrow_up

Parameters help

Name Type
owner
address help
spender
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address owner,
  address spender,
  uint256 amount
) internal {
  require(owner != address(0), "ERC20: approve from the zero address");
  require(spender != address(0), "ERC20: approve to the zero address");

  _allowances[owner][spender] = amount;
  emit Approval(owner, spender, amount);
}

internal ERC20._burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burnFrom(address account, uint256 amount) internal {
  _burn(account, amount);
  _approve(
    account,
    _msgSender(),
    _allowances[account][_msgSender()].sub(
      amount,
      "ERC20: burn amount exceeds allowance"
    )
  );
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal MinterRole._addMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _addMinter(address account) internal {
  _minters.add(account);
  emit MinterAdded(account);
}

internal MinterRole._removeMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _removeMinter(address account) internal {
  _minters.remove(account);
  emit MinterRemoved(account);
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal ERC20._transfer keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address sender,
  address recipient,
  uint256 amount
) internal {
  require(sender != address(0), "ERC20: transfer from the zero address");
  require(recipient != address(0), "ERC20: transfer to the zero address");

  _balances[sender] = _balances[sender].sub(
    amount,
    "ERC20: transfer amount exceeds balance"
  );
  _balances[recipient] = _balances[recipient].add(amount);
  emit Transfer(sender, recipient, amount);
}

internal ERC20._mint keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address account, uint256 amount) internal {
  require(account != address(0), "ERC20: mint to the zero address");

  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);
  emit Transfer(address(0), account, amount);
}

internal ERC20._burn keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(address account, uint256 amount) internal {
  require(account != address(0), "ERC20: burn from the zero address");

  _balances[account] = _balances[account].sub(
    amount,
    "ERC20: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);
  emit Transfer(account, address(0), amount);
}

internal ERC20._approve keyboard_arrow_up

Parameters help

Name Type
owner
address help
spender
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address owner,
  address spender,
  uint256 amount
) internal {
  require(owner != address(0), "ERC20: approve from the zero address");
  require(spender != address(0), "ERC20: approve to the zero address");

  _allowances[owner][spender] = amount;
  emit Approval(owner, spender, amount);
}

internal ERC20._burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burnFrom(address account, uint256 amount) internal {
  _burn(account, amount);
  _approve(
    account,
    _msgSender(),
    _allowances[account][_msgSender()].sub(
      amount,
      "ERC20: burn amount exceeds allowance"
    )
  );
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}

internal KRoles._addOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _addOperator(address account) internal {
  _operators.add(account);
  emit OperatorAdded(account);
}

internal KRoles._removeOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _removeOperator(address account) internal {
  _operators.remove(account);
  emit OperatorRemoved(account);
}

internal Initializable.isConstructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function isConstructor() private view returns (bool) {
  // extcodesize checks the size of the code stored in an address, and
  // address returns the current address. Since the code is still not
  // deployed when running a constructor, any checks on its code size will
  // yield zero, making it an effective way to detect if a contract is
  // under construction or not.
  address self = address(this);
  uint256 cs;
  assembly {
    cs := extcodesize(self)
  }
  return cs == 0;
}