ERC20
This contract is an ERC20 token.
Name
CRO
Symbol
CRO
Decimals
8
Total Supply
100,000,000,000 CRO
About
link
description
Crypto.com was founded in 2016 with the goal of accelerating the world’s transition to cryptocurrency. Key products include: the Crypto.com Wallet & Card App, a place to buy, sell, and pay with crypto, the MCO Visa Card, a metal card with no annual fees, and the Crypto.com Chain, which reportedly enables users to pay and be paid in crypto, anywhere, for free. Crypto.com is headquartered in Hong Kong with a team size of 120+. For more information, please visit: www.crypto.com
Stats
Public Functions
22
Event Types
9
Code Size
21,056 bytes
Events (9) 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) public returns (bool) {
require(_value <= balances[msg.sender]);
require(_to != address(0));
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
require(_to != address(0));
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
increaseApproval keyboard_arrow_up
Source Code
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
allowed[msg.sender][_spender] = (
allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
decreaseApproval keyboard_arrow_up
Source Code
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
upgrade keyboard_arrow_up
Requirements help
Source Code
function upgrade(uint256 value) public {
UpgradeState state = getUpgradeState();
require(state == UpgradeState.ReadyToUpgrade, "It's required that the upgrade state is ready.");
// Validate input value.
require(value > 0, "The upgrade value is required to be above 0.");
balances[msg.sender] = balances[msg.sender].sub(value);
// Take tokens out from circulation
totalSupply_ = totalSupply_.sub(value);
totalUpgraded = totalUpgraded.add(value);
// Upgrade agent reissues the tokens
upgradeAgent.upgradeFrom(msg.sender, value);
emit Upgrade(msg.sender, upgradeAgent, value);
}
setUpgradeAgent keyboard_arrow_up
Requirements help
null
Source Code
function setUpgradeAgent(address agent) external {
require(canUpgrade(), "It's required to be in canUpgrade() condition when setting upgrade agent.");
require(agent != address(0), "Agent is required to be an non-empty address when setting upgrade agent.");
// Only a master can designate the next agent
require(msg.sender == upgradeMaster, "Message sender is required to be the upgradeMaster when setting upgrade agent.");
// Upgrade has already begun for an agent
require(getUpgradeState() != UpgradeState.ReadyToUpgrade, "Upgrade state is required to not be upgrading when setting upgrade agent.");
require(address(upgradeAgent) == address(0), "upgradeAgent once set, cannot be reset");
upgradeAgent = UpgradeAgent(agent);
// Bad interface
require(upgradeAgent.isUpgradeAgent(), "The provided updateAgent contract is required to be compliant to the UpgradeAgent interface method when setting upgrade agent.");
// Make sure that token supplies match in source and target
require(upgradeAgent.originalSupply() == totalSupply_, "The provided upgradeAgent contract's originalSupply is required to be equivalent to existing contract's totalSupply_ when setting upgrade agent.");
emit UpgradeAgentSet(upgradeAgent);
}
getUpgradeState keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function getUpgradeState() public view returns (UpgradeState) {
if (!canUpgrade()) return UpgradeState.NotAllowed;
else if (address(upgradeAgent) == address(0)) return UpgradeState.WaitingForAgent;
else return UpgradeState.ReadyToUpgrade;
}
setUpgradeMaster keyboard_arrow_up
Requirements help
Source Code
function setUpgradeMaster(address master) public {
require(master != address(0), "The provided upgradeMaster is required to be a non-empty address when setting upgrade master.");
require(msg.sender == upgradeMaster, "Message sender is required to be the original upgradeMaster when setting (new) upgrade master.");
upgradeMaster = master;
}
canUpgrade keyboard_arrow_up
renounceOwnership keyboard_arrow_up
transferOwnership keyboard_arrow_up
mint keyboard_arrow_up
Modifiers help
hasMintPermission checks for the following:
canMint checks for the following:
Source Code
function mint(
address _to,
uint256 _amount
)
public
hasMintPermission
canMint
returns (bool)
{
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
}
finishMinting keyboard_arrow_up
setReleaseAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
Source Code
function setReleaseAgent(address addr) public onlyOwner inReleaseState(false) {
// We don't do interface check here as we might want to a normal wallet address to act as a release agent
releaseAgent = addr;
}
setTransferAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
Source Code
function setTransferAgent(address addr, bool state) public onlyOwner inReleaseState(false) {
transferAgents[addr] = state;
}
releaseTokenTransfer keyboard_arrow_up
transfer keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
canTransfer checks for the following:
One or more of the following:
-released must be true
Source Code
function transferFrom(address _from, address _to, uint _value) public canTransfer(_from) returns (bool success) {
// Call StandardToken.transferForm()
return super.transferFrom(_from, _to, _value);
}