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
State Variables (11) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
AddBlacklist keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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;
}
RemoveBlacklist keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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;
}
AddWhitelist keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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;
}
RemoveWhiltelist keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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;
}
pause keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
whenNotPaused checks for the following:
One or more of the following:
-paused must not be true - OR
whitelist for the sender's address
must be equal to
true
Source Code
function pause() public onlyOwner whenNotPaused {
paused = true;
emit Pause();
}
unpause keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
One or more of the following:
-paused must not be true - OR
whitelist for the sender's address
must be equal to
true
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;
}
transferFrom keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
One or more of the following:
-paused must not be true - OR
whitelist for the sender's address
must be equal to
true
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;
}
approve keyboard_arrow_up
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;
}
name keyboard_arrow_up
symbol keyboard_arrow_up
decimals keyboard_arrow_up
constructor keyboard_arrow_up
burn keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
One or more of the following:
-paused must not be true - OR
whitelist for the sender's address
must be equal to
true
Requirements help
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);
}
mintTokens keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.