ERC20
This contract is an ERC20 token.
Name
DICE
Symbol
ROL
Decimals
16
Total Supply
7,001,623 ROL
About link description
Etheroll (DICE) is a cryptocurrency and operates on the Ethereum platform. Etheroll has a current supply of 7,001,622.64879442 with 0 in circulation. The last known price of Etheroll is 1.00844192 USD and is up 6.86 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://etheroll.com/.
Stats
Public Functions
7
Event Types
3
Code Size
7,551 bytes
State Variables (13) keyboard_arrow_up
Functions
ownerTransferOwnership keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
if (tokensFrozen && msg.sender != priviledgedAddress) return false; /* transfer only by priviledgedAddress during crowdfund or reward phases */
if (balanceOf[msg.sender] < _value) return false; /* check if the sender has enough */
if (balanceOf[_to] + _value < balanceOf[_to]) return false; /* check for overflows */
balanceOf[msg.sender] -= _value; /* subtract from the sender */
balanceOf[_to] += _value; /* add the same to the recipient */
Transfer(msg.sender, _to, _value); /* notify anyone listening that this transfer took place */
return true;
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
if (tokensFrozen && msg.sender != priviledgedAddress) return false; /* transfer only by priviledgedAddress during crowdfund or reward phases */
if (balanceOf[_from] < _value) return false; /* check if the sender has enough */
if (balanceOf[_to] + _value < balanceOf[_to]) return false; /* check for overflows */
if (_value > allowance[_from][msg.sender]) return false; /* check allowance */
balanceOf[_from] -= _value; /* subtract from the sender */
balanceOf[_to] += _value; /* add the same to the recipient */
allowance[_from][msg.sender] -= _value; /* reduce allowance */
Transfer(_from, _to, _value); /* notify anyone listening that this transfer took place */
return true;
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
/* set allowance for _spender on behalf of msg.sender */
allowance[msg.sender][_spender] = _value;
/* log event about transaction */
Approval(msg.sender, _spender, _value);
return true;
}
priviledgedAddressBurnUnsoldCoins keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyBy checks for the following:
Source Code
function priviledgedAddressBurnUnsoldCoins()
public
/* only crowdfund contract can call this */
onlyBy(priviledgedAddress)
{
/* totalSupply should equal total tokens in circulation */
totalSupply = safeSub(totalSupply, balanceOf[priviledgedAddress]);
/* burns unsold tokens from crowdfund address */
balanceOf[priviledgedAddress] = 0;
}
updateTokenStatus keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function updateTokenStatus() public {
/* locks tokens during initial crowdfund period */
if (now < crowdfundDeadline) {
tokensFrozen = true;
LogTokensFrozen(tokensFrozen);
}
/* locks tokens */
if (now >= nextFreeze) {
tokensFrozen = true;
LogTokensFrozen(tokensFrozen);
}
/* unlocks tokens */
if (now >= nextThaw) {
tokensFrozen = false;
nextFreeze = now + 12 * 1 weeks;
nextThaw = now + 13 * 1 weeks;
LogTokensFrozen(tokensFrozen);
}
}
ownerSetPriviledgedAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function ownerSetPriviledgedAddress(address _newPriviledgedAddress)
public
onlyOwner
{
priviledgedAddress = _newPriviledgedAddress;
}
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 DSSafeAddSub.safeToAdd keyboard_arrow_up
internal DSSafeAddSub.safeAdd keyboard_arrow_up
Source Code
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
if (!safeToAdd(a, b)) throw;
return a + b;
}
internal DSSafeAddSub.safeToSubtract keyboard_arrow_up
internal DSSafeAddSub.safeSub keyboard_arrow_up
Requirements help
Source Code
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
if (!safeToSubtract(a, b)) throw;
return a - b;
}