Blockwell

CRO

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 Coin (CRO) is a cryptocurrency and operates on the Ethereum platform. Crypto.com Coin has a current supply of 30,263,013,692 with 25,263,013,692 in circulation. The last known price of Crypto.com Coin is 0.11197736 USD and is down -1.67 over the last 24 hours. It is currently trading on 107 active market(s) with $68,305,874.00 traded over the last 24 hours. More information can be found at https://www.crypto.com/en/chain.

Stats

Public Functions 22
Event Types 9
Code Size 21,056 bytes

Events (9) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Mint Event

Parameters help
to
address help
amount
uint256 help

MintFinished Event

Parameters help

OwnershipRenounced Event

Parameters help
previousOwner
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

UpdatedTokenInformation Event

Parameters help
newName
string help
newSymbol
string help

Upgrade Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

UpgradeAgentSet Event

Parameters help
agent
address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

secondarySaleReserveWallet Variable

address help

mainNetLaunchIncentiveReserveWallet Variable

address help

capitalReserveWallet Variable

address help

ecosystemGrantsReserveWallet Variable

address help

airdropReserveWallet Variable

address help

releaseAgent Variable

address help

released Variable

bool help

owner Variable

address help

mintingFinished Variable

bool help

upgradeMaster Variable

address help

upgradeAgent Variable

address help

totalUpgraded Variable

uint256 help

transferAgents Variable

mapping(address => bool) help

allowed Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

totalSupply_ Variable

uint256 help
Internal Variable

canUpgrade_ Variable

bool help
Internal Variable

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return totalSupply_.sub(balances[address(0)]);
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _owner) public view returns (uint256) {
  return balances[_owner];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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;
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address _owner, address _spender)
  public
  view
  returns (uint256)
{
  return allowed[_owner][_spender];
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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;
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_spender
address help
_addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_spender
address help
_subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
agent
address help

Properties

Visibility help public
Mutability help transaction
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.

Properties

Visibility help public
Mutability help view
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

Parameters help

Name Type
master
address help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function canUpgrade() public view returns (bool) {
  return released && super.canUpgrade();
}

renounceOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function renounceOwnership() public onlyOwner {
  emit OwnershipRenounced(owner);
  owner = address(0);
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  _transferOwnership(_newOwner);
}

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finishMinting() public onlyOwner canMint returns (bool) {
  mintingFinished = true;
  emit MintFinished();
  return true;
}

setReleaseAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
addr
address help
state
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setTransferAgent(address addr, bool state)
  public
  onlyOwner
  inReleaseState(false)
{
  transferAgents[addr] = state;
}

releaseTokenTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function releaseTokenTransfer() public onlyReleaseAgent {
  mintingFinished = true;
  super.releaseTokenTransfer();
}

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transfer(address _to, uint256 _value)
  public
  canTransfer(msg.sender)
  returns (bool success)
{
  // Call StandardToken.transfer()
  return super.transfer(_to, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public canTransfer(_from) returns (bool success) {
  // Call StandardToken.transferForm()
  return super.transferFrom(_from, _to, _value);
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal Ownable._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferOwnership(address _newOwner) internal {
  require(_newOwner != address(0));
  emit OwnershipTransferred(owner, _newOwner);
  owner = _newOwner;
}

internal Ownable._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferOwnership(address _newOwner) internal {
  require(_newOwner != address(0));
  emit OwnershipTransferred(owner, _newOwner);
  owner = _newOwner;
}