CyberMusic
ERC20
This contract is an ERC20 token.
Name
CyberMusic
Symbol
CYMT
Decimals
8
Total Supply
15,500,000,000 CYMT
About link
CyberMusic (CYMT) is a cryptocurrency and operates on the Ethereum platform. CyberMusic has a current supply of 15,500,000,000. The last known price of CyberMusic is 0.00000371 USD and is up 10.86 over the last 24 hours. It is currently trading on 5 active market(s) with $1,778.61 traded over the last 24 hours. More information can be found at https://cybermusic.io.
Stats
Public Functions
16
Event Types
9
Code Size
8,980 bytes
Library Use
Uses SafeMath for uint256.
Events (9) keyboard_arrow_up
State Variables (8) keyboard_arrow_up
Functions
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
onlyPayloadSize checks for the following:
Requirements help
Source Code
function transfer(address _to, uint256 _amount)
public
onlyPayloadSize(2 * 32)
returns (bool success)
{
require(_to != address(0));
require(_amount <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
emit Transfer(msg.sender, _to, _amount);
return true;
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
onlyPayloadSize checks for the following:
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount
) public onlyPayloadSize(3 * 32) returns (bool success) {
require(_to != address(0));
require(_amount <= balances[_from]);
require(_amount <= allowed[_from][msg.sender]);
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
Source Code
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
// mitigates the ERC20 spend/approval race condition
if (_value != 0 && allowed[msg.sender][_spender] != 0) {
return false;
}
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;
}
}
finishDistribution keyboard_arrow_up
transferTokenTo keyboard_arrow_up
transferTokenToMultiple keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferTokenToMultiple(address[] _addresses, uint256 _amount)
public
onlyOwner
{
for (uint256 i = 0; i < _addresses.length; i++)
doAirdrop(_addresses[i], _amount);
}
updateTokensPerEth keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function updateTokensPerEth(uint256 _tokensPerEth) public onlyOwner {
tokensPerEth = _tokensPerEth;
emit TokensPerEthUpdated(_tokensPerEth);
}
constructor keyboard_arrow_up
getTokens keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
canDistr checks for the following:
Requirements help
Source Code
function getTokens() public payable canDistr {
uint256 tokens = 0;
// minimum contribution
require(msg.value >= MIN_PURCHASE);
require(msg.value > 0);
// get baseline number of tokens
tokens = tokensPerEth.mul(msg.value) / 1 ether;
address investor = msg.sender;
if (tokens > 0) {
distr(investor, tokens);
}
if (totalDistributed >= totalSupply) {
distributionFinished = true;
}
}
getTokenBalance keyboard_arrow_up
Source Code
function getTokenBalance(address tokenAddress, address who)
public
constant
returns (uint256)
{
ForeignToken t = ForeignToken(tokenAddress);
uint256 bal = t.balanceOf(who);
return bal;
}
withdraw keyboard_arrow_up
burn keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function burn(uint256 _value) public onlyOwner {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = balances[burner].sub(_value);
totalSupply = totalSupply.sub(_value);
totalDistributed = totalDistributed.sub(_value);
emit Burn(burner, _value);
}
withdrawForeignTokens keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function withdrawForeignTokens(address _tokenContract)
public
onlyOwner
returns (bool)
{
ForeignToken token = ForeignToken(_tokenContract);
uint256 amount = token.balanceOf(address(this));
return token.transfer(owner, amount);
}
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.
internal CyberMusicToken.distr keyboard_arrow_up
Modifiers help
canDistr checks for the following:
Source Code
function distr(address _to, uint256 _amount) private canDistr returns (bool) {
totalDistributed = totalDistributed.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Distr(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
}
internal CyberMusicToken.doAirdrop keyboard_arrow_up
Requirements help
Source Code
function doAirdrop(address _participant, uint256 _amount) internal {
require(_amount > 0);
require(totalDistributed < totalSupply);
balances[_participant] = balances[_participant].add(_amount);
totalDistributed = totalDistributed.add(_amount);
if (totalDistributed >= totalSupply) {
distributionFinished = true;
}
// log
emit Airdrop(_participant, _amount, balances[_participant]);
emit Transfer(address(0), _participant, _amount);
}