Blockwell

Eximchain Token

ERC20

This contract is an ERC20 token.

Name Eximchain Token
Symbol EXC
Decimals 18
Total Supply 150,000,000 EXC

About

Stats

Public Functions 19
Event Types 9
Code Size 13,607 bytes

Events (9) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Finalized Event

Parameters help

Frozen Event

Parameters help

OpsAddressUpdated Event

Parameters help
_newAddress
address help

OwnershipTransferCompleted Event

Parameters help
_newOwner
address help

OwnershipTransferInitiated Event

Parameters help
_proposedOwner
address help

TokensBurnt Event

Parameters help
_account
address help
_amount
uint256 help

TokensReclaimed Event

Parameters help
_amount
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

TOKEN_SYMBOL Constant

string help
EXC

TOKEN_NAME Constant

string help
Eximchain Token

TOKEN_DECIMALS Constant

uint8 help
18

DECIMALSFACTOR Constant

uint256 help
UNKNOWN VALUE

TOKEN_TOTALSUPPLY Constant

uint256 help

frozen Variable

bool help

opsAddress Variable

address help

owner Variable

address help

proposedOwner Variable

address help

finalized Variable

bool help

tokenName Variable

string help
Internal Variable

tokenSymbol Variable

string help
Internal Variable

tokenDecimals Variable

uint8 help
Internal Variable

tokenTotalSupply Variable

uint256 help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

isOwner keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOwner(address _address) public view returns (bool) {
  return (_address == owner);
}

initiateOwnershipTransfer keyboard_arrow_up

Parameters help

Name Type
_proposedOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function initiateOwnershipTransfer(address _proposedOwner)
  public
  onlyOwner
  returns (bool)
{
  require(_proposedOwner != address(0));
  require(_proposedOwner != address(this));
  require(_proposedOwner != owner);

  proposedOwner = _proposedOwner;

  OwnershipTransferInitiated(proposedOwner);

  return true;
}

completeOwnershipTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function completeOwnershipTransfer() public returns (bool) {
  require(msg.sender == proposedOwner);

  owner = msg.sender;
  proposedOwner = address(0);

  OwnershipTransferCompleted(owner);

  return true;
}

finalize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function finalize() public onlyOwner returns (bool) {
  require(!finalized);

  finalized = true;

  Finalized();

  return true;
}

isOps keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOps(address _address) public view returns (bool) {
  return (opsAddress != address(0) && _address == opsAddress);
}

isOwnerOrOps keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOwnerOrOps(address _address) public view returns (bool) {
  return (isOwner(_address) || isOps(_address));
}

setOpsAddress keyboard_arrow_up

Parameters help

Name Type
_newOpsAddress
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function setOpsAddress(address _newOpsAddress) public onlyOwner returns (bool) {
  require(_newOpsAddress != owner);
  require(_newOpsAddress != address(this));

  opsAddress = _newOpsAddress;

  OpsAddressUpdated(opsAddress);

  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view returns (string) {
  return tokenName;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() public view returns (string) {
  return tokenSymbol;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function decimals() public view returns (uint8) {
  return tokenDecimals;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return tokenTotalSupply;
}

Parameters help

Name Type
_owner
address help

Properties

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

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 remaining)
{
  return allowed[_owner][_spender];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
  require(!frozen);

  return super.transfer(_to, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool success) {
  require(!frozen);

  return super.transferFrom(_from, _to, _value);
}

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 success)
{
  allowed[msg.sender][_spender] = _value;

  Approval(msg.sender, _spender, _value);

  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _amount) public returns (bool) {
  require(_amount > 0);

  address account = msg.sender;
  require(_amount <= balanceOf(account));

  balances[account] = balances[account].sub(_amount);
  tokenTotalSupply = tokenTotalSupply.sub(_amount);

  TokensBurnt(account, _amount);

  return true;
}

reclaimTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function reclaimTokens() public onlyOwner returns (bool) {
  address account = address(this);
  uint256 amount = balanceOf(account);

  if (amount == 0) {
    return false;
  }

  balances[account] = balances[account].sub(amount);
  balances[owner] = balances[owner].add(amount);

  Transfer(account, owner, amount);

  TokensReclaimed(amount);

  return true;
}

freeze keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function freeze() public onlyOwner returns (bool) {
  require(!frozen);

  frozen = true;

  Frozen();

  return true;
}

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 FinalizableToken.validateTransfer keyboard_arrow_up

Parameters help

Name Type
_sender
address help
_to
address help

Properties

Visibility help private
Mutability help view

Requirements help

null
Source Code
function validateTransfer(address _sender, address _to) private view {
  // Once the token is finalized, everybody can transfer tokens.
  if (finalized) {
    return;
  }

  if (isOwner(_to)) {
    return;
  }

  // Before the token is finalized, only owner and ops are allowed to initiate transfers.
  // This allows them to move tokens while the sale is still ongoing for example.
  require(isOwnerOrOps(_sender));
}