ERC20
This contract is an ERC20 token.
Name
DRAGON
Symbol
DRG
Decimals
8
Total Supply
442,695,970 DRG
About link
Dragon Coins (DRG) is a cryptocurrency and operates on the Ethereum platform. Dragon Coins has a current supply of 442,695,970.07088 with 348,657,484.0176098 in circulation. The last known price of Dragon Coins is 0.00288235 USD and is up 3.11 over the last 24 hours. It is currently trading on 2 active market(s) with $0.00 traded over the last 24 hours. More information can be found at https://drgtoken.io/.
Stats
Public Functions
14
Event Types
4
Code Size
6,042 bytes
Events (4) keyboard_arrow_up
State Variables (10) keyboard_arrow_up
Functions
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value) returns (bool ok) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
appendTokenHolders(_to);
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
burnCheck(_to, _value);
return true;
}
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) returns (bool success) {
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
appendTokenHolders(_to);
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value) returns (bool success) {
allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
allowance keyboard_arrow_up
changeOwnership keyboard_arrow_up
setBurner keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setBurner(address _burner) onlyOwner {
require(!burnerSet);
burner = _burner;
burnerSet = true;
}
burnDragons keyboard_arrow_up
getAccountCount keyboard_arrow_up
getAddress keyboard_arrow_up
approveAndCall keyboard_arrow_up
Source Code
function approveAndCall(
address _spender,
uint256 _value,
bytes _extraData
) returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
burn keyboard_arrow_up
Requirements help
Source Code
function burn(uint256 _value) returns (bool success) {
if (balanceOf[msg.sender] < _value) throw;
if (totalSupply - _value < 2100000000000000) throw;
balanceOf[msg.sender] -= _value;
totalSupply -= _value;
Burn(msg.sender, _value);
return true;
}
burnFrom keyboard_arrow_up
Requirements help
Source Code
function burnFrom(address _from, uint256 _value) returns (bool success) {
if (totalSupply - _value < 2100000000000000) throw;
if (balanceOf[_from] < _value) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
allowance[_from][msg.sender] -= _value;
totalSupply -= _value;
Burn(_from, _value);
return true;
}
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 Dragon.burnCheck keyboard_arrow_up
internal Dragon.appendTokenHolders keyboard_arrow_up
Source Code
function appendTokenHolders(address tokenHolder) private {
if (balanceOf[tokenHolder] == 0) {
if (tokenHolder == burner) return;
accountIndex[accountCount] = tokenHolder;
accountCount++;
}
}