ICE ROCK MINING
ERC20
This contract is an ERC20 token.
Name
ICE ROCK MINING
Symbol
ROCK2
Decimals
Total Supply
NaN ROCK2
About
link
ICE ROCK MINING (ROCK2) is a cryptocurrency token and operates on the Ethereum platform. ICE ROCK MINING has a current supply of 15,724,272. The last known price of ICE ROCK MINING is $0.026549 USD and is up 5.59% over the last 24 hours. It is currently trading on 1 active market(s) with $33,818.65 traded over the last 24 hours. More information can be found at https://icerockmining.io/.
Stats
Public Functions
16
Event Types
4
Code Size
8,881 bytes
Library Use
Uses itMaps for itMaps.itMapAddressUint.
Events (4) keyboard_arrow_up
Functions
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address to, uint value) public returns (bool success) {
if (balances.get(msg.sender) >= value && value > 0) {
balances.insert(msg.sender, balances.get(msg.sender)-value);
if (balances.contains(to)) {
balances.insert(to, balances.get(to)+value);
}
else {
balances.insert(to, value);
}
Transfer(msg.sender, to, value);
return true;
} else return false;
}
transferFrom keyboard_arrow_up
approve keyboard_arrow_up
Source Code
function approve(address spender, uint value) public returns (bool success) {
if ((value != 0) && (balances.get(msg.sender) >= value)){
allowed[msg.sender][spender] = value;
Approval(msg.sender, spender, value);
return true;
} else{
return false;
}
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
if (balances.get(from) >= value && allowed[from][msg.sender] >= value && value > 0) {
uint amountToInsert = value;
if (balances.contains(to))
amountToInsert = amountToInsert+balances.get(to);
balances.insert(to, amountToInsert);
balances.insert(from, balances.get(from) - value);
allowed[from][msg.sender] = allowed[from][msg.sender] - value;
Transfer(from, to, value);
return true;
} else
return false;
}
setCurrentExchangeRate keyboard_arrow_up
setBonus keyboard_arrow_up
send keyboard_arrow_up
constructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function () public payable{
uint amountInUSDollars = msg.value * currentUSDExchangeRate / 10**18;
uint valueToPass = amountInUSDollars / priceUSD;
valueToPass = (valueToPass * (100 + bonus))/100;
if (balances.get(IceRockMiningAddress) >= valueToPass) {
if (balances.contains(msg.sender)) {
balances.insert(msg.sender, balances.get(msg.sender)+valueToPass);
}
else {
balances.insert(msg.sender, valueToPass);
}
balances.insert(IceRockMiningAddress, balances.get(IceRockMiningAddress)-valueToPass);
Transfer(IceRockMiningAddress, msg.sender, valueToPass);
}
}
approveDividends keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function approveDividends (uint totalDividendsAmount) public onlyOwner {
uint256 dividendsPerToken = totalDividendsAmount*10**18 / initialSupply;
for (uint256 i = 0; i<balances.size(); i += 1) {
address tokenHolder = balances.getKeyByIndex(i);
if (balances.get(tokenHolder)>0)
approvedDividends[tokenHolder] = balances.get(tokenHolder)*dividendsPerToken;
}
}
burnUnsold keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Source Code
function burnUnsold() public onlyOwner returns (bool success) {
uint burningAmount = balances.get(IceRockMiningAddress);
initialSupply -= burningAmount;
balances.insert(IceRockMiningAddress, 0);
Burned(IceRockMiningAddress, burningAmount);
return true;
}
approvedDividendsOf keyboard_arrow_up
transferAllDividends keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Source Code
function transferAllDividends() public onlyOwner{
for (uint256 i = 0; i< balances.size(); i += 1) {
address tokenHolder = balances.getKeyByIndex(i);
if (approvedDividends[tokenHolder] > 0)
{
tokenHolder.transfer(approvedDividends[tokenHolder]);
DividendsTransfered (tokenHolder, approvedDividends[tokenHolder]);
approvedDividends[tokenHolder] = 0;
}
}
}