ERC20
This contract is an ERC20 token.
Name
Cajutel
Symbol
CAJ
Decimals
18
Total Supply
1,780,000 CAJ
About
link
description
Cajutel (CAJ) is a cryptocurrency token and operates on the Ethereum platform. Cajutel has a current supply of 1,780,000 with 1,352,388.808 in circulation. The last known price of Cajutel is $2.81 USD and is up 57.86% over the last 24 hours. It is currently trading on 3 active market(s) with $4,801.62 traded over the last 24 hours. More information can be found at https://cajutel.io.
Stats
Public Functions
17
Event Types
5
Code Size
55,663 bytes
Events (5) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
acceptOwnership keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
onlyPayloadSize checks for the following:
Source Code
function transfer(address _to, uint256 _value) public onlyPayloadSize(2) {
require(locked == false);
bool status = transferInternal(msg.sender, _to, _value);
require(status == true);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value) public returns (bool success) {
if (locked) {
return false;
}
allowance[msg.sender][_spender] = _value;
return true;
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
if (locked) {
return false;
}
if (allowance[_from][msg.sender] < _value) {
return false;
}
bool _success = transferInternal(_from, _to, _value);
if (_success) {
allowance[_from][msg.sender] -= _value;
}
return _success;
}
addDividend keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function addDividend(uint256 recycleTime) public payable onlyOwner {
require(msg.value > 0);
uint256 id = dividends.length;
uint256 _totalSupply = totalSupply;
dividends.push(
Dividend(
id,
block.number,
now,
msg.value,
0,
0,
_totalSupply,
recycleTime,
false
)
);
DividendTransfered(id, msg.sender, block.number, msg.value, _totalSupply);
}
claimDividend keyboard_arrow_up
Source Code
function claimDividend(uint256 dividendId) public returns (bool) {
if ((dividends.length).sub(1) < dividendId) {
return false;
}
Dividend storage dividend = dividends[dividendId];
if (dividend.claimed[msg.sender] == true) {
return false;
}
if (dividend.recycled == true) {
return false;
}
if (now >= dividend.time.add(dividend.recycleTime)) {
return false;
}
uint256 balance = valueAt(loggedBalances[msg.sender], dividend.block);
if (balance == 0) {
return false;
}
uint256 claim = balance.mul(dividend.amount).div(dividend.totalSupply);
dividend.claimed[msg.sender] = true;
dividend.claimedAmount = dividend.claimedAmount.add(claim);
if (claim > 0) {
msg.sender.transfer(claim);
DividendClaimed(dividendId, msg.sender, claim);
return true;
}
return false;
}
claimDividends keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
Source Code
function claimDividends() public {
require(dividendsClaimed[msg.sender] < dividends.length);
for (uint i = dividendsClaimed[msg.sender]; i < dividends.length; i++) {
if ((dividends[i].claimed[msg.sender] == false) && (dividends[i].recycled == false)) {
dividendsClaimed[msg.sender] = i.add(1);
claimDividend(i);
}
}
}
recycleDividend keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function recycleDividend(uint256 dividendId) public onlyOwner returns (bool success) {
if (dividends.length.sub(1) < dividendId) {
return false;
}
Dividend storage dividend = dividends[dividendId];
if (dividend.recycled) {
return false;
}
dividend.recycled = true;
return true;
}
refundUnclaimedEthers keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function refundUnclaimedEthers(uint256 dividendId) public onlyOwner returns (bool success) {
if ((dividends.length).sub(1) < dividendId) {
return false;
}
Dividend storage dividend = dividends[dividendId];
if (dividend.recycled == false) {
if (now < (dividend.time).add(dividend.recycleTime)) {
return false;
}
}
uint256 claimedBackAmount = (dividend.amount).sub(dividend.claimedAmount);
dividend.transferedBack = claimedBackAmount;
if (claimedBackAmount > 0) {
owner.transfer(claimedBackAmount);
UnclaimedDividendTransfer(dividendId, claimedBackAmount);
return true;
}
return false;
}
constructor keyboard_arrow_up
getIcoTokensAmount keyboard_arrow_up
Source Code
function getIcoTokensAmount(uint256 _collectedEthers, uint256 value) public constant returns (uint256) {
uint256 amount;
uint256 newCollectedEthers = _collectedEthers;
uint256 remainingValue = value;
for (uint i = 0; i < phases.length; i++) {
Phase storage phase = phases[i];
if (phase.maxAmount > newCollectedEthers) {
if (newCollectedEthers.add(remainingValue) > phase.maxAmount) {
uint256 diff = phase.maxAmount.sub(newCollectedEthers);
amount = amount.add(diff.mul(1 ether).div(phase.price));
remainingValue = remainingValue.sub(diff);
newCollectedEthers = newCollectedEthers.add(diff);
} else {
amount += remainingValue * 1 ether / phase.price;
newCollectedEthers += remainingValue;
remainingValue = 0;
}
}
if (remainingValue == 0) {
break;
}
}
if (remainingValue > 0) {
return 0;
}
return amount;
}
setMigrateAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setMigrateAddress(address _address) public onlyOwner {
migrateAddress = _address;
}
transferEthers keyboard_arrow_up
setLocked keyboard_arrow_up
setIcoDates keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setIcoDates(uint256 _icoSince, uint256 _icoTill) public onlyOwner {
icoSince = _icoSince;
icoTill = _icoTill;
}
setMigratedBalance keyboard_arrow_up
Modifiers help
onlyMigrate checks for the following:
Requirements help
UNKNOWN VALUE
must be greater than or equal to
0
Source Code
function setMigratedBalance(address _holderAddress, uint256 _value) public onlyMigrate {
require(balanceOf[this].sub(_value) >= 0);
setBalance(_holderAddress, _value);
setBalance(this, balanceOf[this].sub(_value));
Transfer(this, _holderAddress, _value);
}