Blockwell

CrypteriumToken

ERC20

This contract is an ERC20 token.

Name CrypteriumToken
Symbol CRPT
Decimals 18
Total Supply 99,489,833 CRPT

About

Stats

Public Functions 11
Event Types 5
Code Size 6,339 bytes

Events (5) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
burner
address help
value
uint256 help

Mint Event

Parameters help
to
address help
amount
uint256 help

MintFinished Event

Parameters help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

name Constant

string help
CrypteriumToken

symbol Constant

string help
CRPT

decimals Constant

uint32 help
18

restrictedPercent Constant

uint help
30

restricted Constant

address help
0x1d907C982B0B093b5173574FAbe7965181522c7B

start Constant

uint help
1509458400

period Constant

uint help
87

hardcap Constant

uint256 help
300000000 * 1 ether

totalSupply Variable

uint256 help

transferAllowed Variable

bool help

mintingFinished Variable

bool help

owner Variable

address help

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferOwnership(address newOwner) public onlyOwner {
  require(newOwner != address(0));
  owner = newOwner;
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenTransferAllowed checks for the following:
Source Code
function transfer(address _to, uint256 _value)
  public
  whenTransferAllowed
  returns (bool)
{
  require(_to != address(0));
  require(_value <= balances[msg.sender]);

  balances[msg.sender] = balances[msg.sender] - _value;
  balances[_to] = balances[_to] + _value;
  //assert(balances[_to] >= _value); no need to check, since mint has limited hardcap
  Transfer(msg.sender, _to, _value);
  return true;
}

Parameters help

Name Type
_owner
address help

Properties

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenTransferAllowed checks for the following:
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public whenTransferAllowed returns (bool) {
  require(_to != address(0));
  require(_value <= balances[_from]);
  require(_value <= allowed[_from][msg.sender]);

  balances[_from] = balances[_from] - _value;
  balances[_to] = balances[_to] + _value;
  //assert(balances[_to] >= _value); no need to check, since mint has limited hardcap
  allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value;
  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) {
  //NOTE: To prevent attack vectors like the one discussed here:
  //https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729,
  //clients SHOULD make sure to create user interfaces in such a way
  //that they set the allowance first to 0 before setting it to another value for the same spender.

  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function allowTransfer() public onlyOwner {
  transferAllowed = true;
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(address _to, uint256 _value)
  public
  onlyOwner
  saleIsOn
  canMint
  returns (bool)
{
  require(_to != address(0));

  uint256 restrictedTokens = (_value * restrictedPercent) /
    (100 - restrictedPercent);
  uint256 _amount = _value + restrictedTokens;
  assert(_amount >= _value);

  if (_amount + totalSupply <= hardcap) {
    totalSupply = totalSupply + _amount;

    assert(totalSupply >= _amount);

    balances[msg.sender] = balances[msg.sender] + _amount;
    assert(balances[msg.sender] >= _amount);
    Mint(msg.sender, _amount);

    transfer(_to, _value);
    transfer(restricted, restrictedTokens);
  }
  return true;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _value) public returns (bool) {
  require(_value <= balances[msg.sender]);
  // no need to require value <= totalSupply, since that would imply the
  // sender's balance is greater than the totalSupply, which *should* be an assertion failure
  balances[msg.sender] = balances[msg.sender] - _value;
  totalSupply = totalSupply - _value;
  Burn(msg.sender, _value);
  return true;
}

Parameters help

Name Type
_from
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burnFrom(address _from, uint256 _value) public returns (bool success) {
  require(_value <= balances[_from]);
  require(_value <= allowed[_from][msg.sender]);
  balances[_from] = balances[_from] - _value;
  allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value;
  totalSupply = totalSupply - _value;
  Burn(_from, _value);
  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.