Blockwell

Bridge Mutual

ERC20

This contract is an ERC20 token.

Name Bridge Mutual
Symbol BMI
Decimals 18
Total Supply 160,000,000 BMI

About link

Bridge Mutual (BMI) is a cryptocurrency and operates on the Ethereum platform. Bridge Mutual has a current supply of 160,000,000 with 52,615,203.5006837 in circulation. The last known price of Bridge Mutual is 0.52667987 USD and is up 0.97 over the last 24 hours. It is currently trading on 10 active market(s) with $200,341.88 traded over the last 24 hours. More information can be found at https://bridgemutual.io.

Stats

Public Functions 14
Event Types 2
Code Size 32,640 bytes

Events (2) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

TOTAL_SUPPLY Constant

uint256 help
160 * UNKNOWN VALUE * UNKNOWN VALUE

_nonces Variable

mapping(address => Counters.Counter) help
Internal Variable

_PERMIT_TYPEHASH Variable

bytes32 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

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_decimals Variable

uint8 help
Internal Variable

_CACHED_DOMAIN_SEPARATOR Variable

bytes32 help
Internal Variable

_CACHED_CHAIN_ID Variable

uint256 help
Internal Variable

_HASHED_NAME Variable

bytes32 help
Internal Variable

_HASHED_VERSION Variable

bytes32 help
Internal Variable

_TYPE_HASH Variable

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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view override 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 override 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
  virtual
  override
  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
  virtual
  override
  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
  virtual
  override
  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 virtual override 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
  virtual
  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
  virtual
  returns (bool)
{
  _approve(
    _msgSender(),
    spender,
    _allowances[_msgSender()][spender].sub(
      subtractedValue,
      "ERC20: decreased allowance below zero"
    )
  );
  return true;
}

permit keyboard_arrow_up

Parameters help

Name Type
owner
address help
spender
address help
value
uint256 help
deadline
uint256 help
v
uint8 help
r
bytes32 help
s
bytes32 help

Properties

Visibility help public
Mutability help transaction
Source Code
function permit(
  address owner,
  address spender,
  uint256 value,
  uint256 deadline,
  uint8 v,
  bytes32 r,
  bytes32 s
) public virtual override {
  // solhint-disable-next-line not-rely-on-time
  require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

  bytes32 structHash = keccak256(
    abi.encode(
      _PERMIT_TYPEHASH,
      owner,
      spender,
      value,
      _nonces[owner].current(),
      deadline
    )
  );

  bytes32 hash = _hashTypedDataV4(structHash);

  address signer = recover(hash, v, r, s);
  require(signer == owner, "ERC20Permit: invalid signature");

  _nonces[owner].increment();
  _approve(owner, spender, value);
}

nonces keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function nonces(address owner) public view override returns (uint256) {
  return _nonces[owner].current();
}

DOMAIN_SEPARATOR keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function DOMAIN_SEPARATOR() external view override returns (bytes32) {
  return _domainSeparatorV4();
}

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

Parameters help

Name Type
name
string help

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor(string memory name) internal EIP712(name, "1") {}

internal ERC20Permit.recover keyboard_arrow_up

Parameters help

Name Type
hash
bytes32 help
v
uint8 help
r
bytes32 help
s
bytes32 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function recover(
  bytes32 hash,
  uint8 v,
  bytes32 r,
  bytes32 s
) internal pure returns (address) {
  // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
  // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
  // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
  // signatures from current libraries generate a unique signature with an s-value in the lower half order.
  //
  // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
  // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
  // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
  // these malleable signatures as well.
  require(
    uint256(s) <=
      0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
    "ECDSA: invalid signature 's' value"
  );
  require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

  // If the signature is valid (and not malleable), return the signer address
  address signer = ecrecover(hash, v, r, s);
  require(signer != address(0), "ECDSA: invalid signature");

  return signer;
}

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 virtual {
  require(sender != address(0), "ERC20: transfer from the zero address");
  require(recipient != address(0), "ERC20: transfer to the zero address");

  _beforeTokenTransfer(sender, recipient, amount);

  _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 virtual {
  require(account != address(0), "ERC20: mint to the zero address");

  _beforeTokenTransfer(address(0), account, amount);

  _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 virtual {
  require(account != address(0), "ERC20: burn from the zero address");

  _beforeTokenTransfer(account, address(0), amount);

  _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 virtual {
  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._setupDecimals keyboard_arrow_up

Parameters help

Name Type
decimals_
uint8 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setupDecimals(uint8 decimals_) internal {
  _decimals = decimals_;
}

internal ERC20._beforeTokenTransfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _beforeTokenTransfer(
  address from,
  address to,
  uint256 amount
) internal virtual {}

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 virtual 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 virtual returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal EIP712.constructor keyboard_arrow_up

Parameters help

Name Type
name
string help
version
string help

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor(string memory name, string memory version) internal {
  bytes32 hashedName = keccak256(bytes(name));
  bytes32 hashedVersion = keccak256(bytes(version));
  bytes32 typeHash = keccak256(
    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
  );
  _HASHED_NAME = hashedName;
  _HASHED_VERSION = hashedVersion;
  _CACHED_CHAIN_ID = _getChainId();
  _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(
    typeHash,
    hashedName,
    hashedVersion
  );
  _TYPE_HASH = typeHash;
}

internal EIP712._domainSeparatorV4 keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _domainSeparatorV4() internal view returns (bytes32) {
  if (_getChainId() == _CACHED_CHAIN_ID) {
    return _CACHED_DOMAIN_SEPARATOR;
  } else {
    return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
  }
}

internal EIP712._buildDomainSeparator keyboard_arrow_up

Parameters help

Name Type
typeHash
bytes32 help
name
bytes32 help
version
bytes32 help

Properties

Visibility help private
Mutability help view
Source Code
function _buildDomainSeparator(
  bytes32 typeHash,
  bytes32 name,
  bytes32 version
) private view returns (bytes32) {
  return
    keccak256(
      abi.encode(typeHash, name, version, _getChainId(), address(this))
    );
}

internal EIP712._hashTypedDataV4 keyboard_arrow_up

Parameters help

Name Type
structHash
bytes32 help

Properties

Visibility help internal
Mutability help view
Source Code
function _hashTypedDataV4(bytes32 structHash) internal view returns (bytes32) {
  return
    keccak256(abi.encodePacked("\x19\x01", _domainSeparatorV4(), structHash));
}

internal EIP712._getChainId keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function _getChainId() private view returns (uint256 chainId) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  // solhint-disable-next-line no-inline-assembly
  assembly {
    chainId := chainid()
  }
}