Blockwell

CosmoCoin

ERC20

This contract is an ERC20 token.

Name CosmoCoin
Symbol COSM
Decimals 18
Total Supply 1,098,000,000 COSM

About link

Cosmo Coin (COSM) is a cryptocurrency and operates on the Ethereum platform. Cosmo Coin has a current supply of 923,000,000 with 670,780,888.57439 in circulation. The last known price of Cosmo Coin is 0.00058532 USD and is down -33.75 over the last 24 hours. It is currently trading on 3 active market(s) with $4,181.69 traded over the last 24 hours. More information can be found at https://cosmochain.io/.

Stats

Public Functions 20
Event Types 11
Code Size 8,757 bytes

Events (11) keyboard_arrow_up

AddBlackListAddress Event

Parameters help
_address
address help

AddWhiteListAddress Event

Parameters help
_address
address help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
from
address help
at
address help
value
uint256 help

Mint Event

Parameters help
to
address help
value
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters help

RemoveBlackListAddress Event

Parameters help
_address
address help

RemoveWhiteListAddress Event

Parameters help
_address
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unpause Event

Parameters help

owner Variable

address help

newOwner Variable

address help

paused Variable

bool help

whitelist Variable

mapping(address => bool) help

blacklist Variable

mapping(address => bool) help

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_decimals Variable

uint8 help
Internal Variable

totalTokenSupply Variable

uint256 help
Internal Variable

Functions Expand All Collapse All

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  require(_newOwner != address(0));
  newOwner = _newOwner;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function acceptOwnership() public onlyNewOwner returns (bool) {
  emit OwnershipTransferred(owner, newOwner);
  owner = newOwner;
  newOwner = address(0);
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function AddBlacklist(address account) public onlyOwner returns (bool) {
  require(account != address(0));
  require(blacklist[account] == false);
  require(account != address(this));
  require(account != owner);

  blacklist[account] = true;
  emit AddBlackListAddress(account);
  return true;
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function RemoveBlacklist(address account) public onlyOwner returns (bool) {
  require(account != address(0));
  require(blacklist[account] == true);
  blacklist[account] = false;
  emit RemoveBlackListAddress(account);
  return true;
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function AddWhitelist(address account) public onlyOwner returns (bool) {
  require(account != address(0));
  require(whitelist[account] == false);
  require(account != address(this));
  whitelist[account] = true;
  emit AddWhiteListAddress(account);
  return true;
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function RemoveWhiltelist(address account) public onlyOwner returns (bool) {
  require(account != address(0));
  require(whitelist[account] == true);
  require(account != owner);
  whitelist[account] = false;
  emit RemoveWhiteListAddress(account);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pause() public onlyOwner whenNotPaused {
  paused = true;
  emit Pause();
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unpause() public onlyOwner whenPaused {
  paused = false;
  emit Unpause();
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_who
address help

Properties

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

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 allowed[_owner][_spender];
}

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address _to, uint256 _amount)
  public
  whenNotPaused
  returns (bool)
{
  require(_to != address(0));
  require(_to != address(this));
  require(_amount > 0);
  require(_amount <= balances[msg.sender]);
  require(blacklist[msg.sender] == false);
  require(blacklist[_to] == false);

  balances[msg.sender] = balances[msg.sender].sub(_amount);
  balances[_to] = balances[_to].add(_amount);
  emit Transfer(msg.sender, _to, _amount);
  return true;
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _amount
) public whenNotPaused returns (bool) {
  require(_to != address(0));
  require(_to != address(this));
  require(_amount <= balances[_from]);
  require(_amount <= allowed[_from][msg.sender]);
  require(blacklist[_from] == false);
  require(blacklist[_to] == false);
  require(blacklist[msg.sender] == false);

  balances[_from] = balances[_from].sub(_amount);
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
  balances[_to] = balances[_to].add(_amount);
  emit Transfer(_from, _to, _amount);
  return true;
}

Parameters help

Name Type
_spender
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function approve(address _spender, uint256 _amount) public returns (bool) {
  // reduce spender's allowance to 0 then set desired value after to avoid race condition
  require((_amount == 0) || (allowed[msg.sender][_spender] == 0));
  allowed[msg.sender][_spender] = _amount;
  emit Approval(msg.sender, _spender, _amount);
  return true;
}

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 payable
Source Code
function() external payable {
  revert();
}

Parameters help

Name Type
_address
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(address _address, uint256 _value) external whenNotPaused {
  require(_value <= balances[_address]);
  require(
    (whitelist[msg.sender] == true && _address == msg.sender) ||
      (msg.sender == owner)
  );
  balances[_address] = balances[_address].sub(_value);
  totalTokenSupply = totalTokenSupply.sub(_value);
  emit Burn(msg.sender, _address, _value);
  emit Transfer(_address, address(0), _value);
}

Parameters help

Name Type
_beneficiary
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintTokens(address _beneficiary, uint256 _value) external onlyOwner {
  require(_beneficiary != address(0));
  require(blacklist[_beneficiary] == false);
  require(_value > 0);
  balances[_beneficiary] = balances[_beneficiary].add(_value);
  totalTokenSupply = totalTokenSupply.add(_value);
  emit Mint(_beneficiary, _value);
  emit Transfer(address(0), _beneficiary, _value);
}

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.