Blockwell

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

Airdrop Event

Parameters help
_owner
address help
_amount
uint help
_balance
uint help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Burn Event

Parameters help
burner
address help
value
uint256 help

Distr Event

Parameters help
to
address help
amount
uint256 help

DistrFinished Event

Parameters help

TokensPerEthUpdated Event

Parameters help
_tokensPerEth
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

name Constant

string help
CyberMusic

symbol Constant

string help
CYMT

decimals Constant

uint help
8

MIN_PURCHASE Constant

uint256 help
1 ether / 100

totalSupply Variable

uint256 help

totalDistributed Variable

uint256 help

tokensPerEth Variable

uint256 help

distributionFinished Variable

bool help

totalSupply Variable

uint256 help

owner Variable

address help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

Parameters help

Name Type
_owner
address help

Properties

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

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _owner, address _spender)
  public
  constant
  returns (uint256)
{
  return allowed[_owner][_spender];
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address newOwner) public onlyOwner {
  if (newOwner != address(0)) {
    owner = newOwner;
  }
}

finishDistribution keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finishDistribution() public onlyOwner canDistr returns (bool) {
  distributionFinished = true;
  emit DistrFinished();
  return true;
}

transferTokenTo keyboard_arrow_up

Parameters help

Name Type
_participant
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferTokenTo(address _participant, uint256 _amount)
  public
  onlyOwner
{
  doAirdrop(_participant, _amount);
}

transferTokenToMultiple keyboard_arrow_up

Parameters help

Name Type
_addresses
address[] help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_tokensPerEth
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function updateTokensPerEth(uint256 _tokensPerEth) public onlyOwner {
  tokensPerEth = _tokensPerEth;
  emit TokensPerEthUpdated(_tokensPerEth);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() external payable {
  getTokens();
}

getTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers 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

Parameters help

Name Type
tokenAddress
address help
who
address help

Properties

Visibility help public
Mutability help constant
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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function withdraw() public onlyOwner {
  address myAddress = this;
  uint256 etherBalance = myAddress.balance;
  owner.transfer(etherBalance);
}

burn keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_tokenContract
address help

Properties

Visibility help public
Mutability help transaction
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 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 CyberMusicToken.distr keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help private
Mutability help transaction

Modifiers help

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

Parameters help

Name Type
_participant
address help
_amount
uint help

Properties

Visibility help internal
Mutability help transaction
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);
}