Blockwell

BioPassport Coin

ERC20

This contract is an ERC20 token.

Name BioPassport Coin
Symbol BIOT
Decimals 9
Total Supply 8,800,000,000 BIOT

About link description

BioPassport Token (BIOT) is a cryptocurrency and operates on the Ethereum platform. BioPassport Token has a current supply of 8,800,000,000 with 516,482,722 in circulation. The last known price of BioPassport Token is 0.01430333 USD and is down -6.35 over the last 24 hours. It is currently trading on 3 active market(s) with $83,162.18 traded over the last 24 hours. More information can be found at https://biopassport.io.

Stats

Public Functions 26
Event Types 8
Code Size 29,440 bytes

Events (8) keyboard_arrow_up

AdminChanged Event

Parameters help
previousAdmin
address help
newAdmin
address help

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

OwnerChanged Event

Parameters help
previousOwner
address help
newOwner
address help

ReserveChanged Event

Parameters help
_address
address help
amount
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

VaultChanged Event

Parameters help
previousVault
address help
newVault
address help

reserves Variable

mapping(address => uint) help

noOfTokens Variable

uint help
Internal Variable

vault Variable

address help
Internal Variable

owner Variable

address help
Internal Variable

admin Variable

address help
Internal Variable

_cap 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

_minters Variable

Roles.Role help
Internal Variable

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_decimals Variable

uint8 help
Internal Variable

Functions Expand All Collapse All

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;
}

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());
}

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
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value) public returns (bool) {
  // check the reserve
  require(balanceOf(msg.sender).sub(_value) >= reserveOf(msg.sender));
  return super.transfer(_to, _value);
}

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
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool) {
  require(_from != vault);
  require(_value <= balanceOf(_from).sub(reserves[_from]));
  return super.transferFrom(_from, _to, _value);
}

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;
}

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;
}

cap keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

setReserve keyboard_arrow_up

Parameters help

Name Type
_address
address help
_reserve
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function setReserve(address _address, uint256 _reserve) public onlyAdmin {
  require(_reserve <= totalSupply());
  require(_address != address(0));

  reserves[_address] = _reserve;
  emit ReserveChanged(_address, _reserve);
}

setVault keyboard_arrow_up

Parameters help

Name Type
_newVault
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setVault(address _newVault) public onlyOwner {
  require(_newVault != address(0));
  require(_newVault != vault);

  address _oldVault = vault;

  // change vault address
  vault = _newVault;
  emit VaultChanged(_oldVault, _newVault);
}

setOwner keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setOwner(address _newOwner) public onlyVault {
  require(_newOwner != address(0));
  require(_newOwner != owner);

  emit OwnerChanged(owner, _newOwner);
  owner = _newOwner;
}

setAdmin keyboard_arrow_up

Parameters help

Name Type
_newAdmin
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setAdmin(address _newAdmin) public onlyOwnerOrVault {
  require(_newAdmin != address(0));
  require(_newAdmin != admin);

  emit AdminChanged(admin, _newAdmin);
  admin = _newAdmin;
}

getOwner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getOwner() public view returns (address) {
  return owner;
}

getVault keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getVault() public view returns (address) {
  return vault;
}

getAdmin keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getAdmin() public view returns (address) {
  return admin;
}

getOneBiotCoin keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getOneBiotCoin() public view returns (uint256) {
  return (10**uint256(decimals()));
}

reserveOf keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view
Source Code
function reserveOf(address _address) public view returns (uint256 _reserve) {
  return reserves[_address];
}

reserve keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function reserve() public view returns (uint256 _reserve) {
  return reserves[msg.sender];
}

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 ERC20Capped._mint keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address account, uint256 value) internal {
  require(totalSupply().add(value) <= _cap, "ERC20Capped: cap exceeded");
  super._mint(account, value);
}

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 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 MinterRole.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

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 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;
}