Blockwell

Proton Token

ERC20

This contract is an ERC20 token.

Name Proton Token
Symbol PTT
Decimals 18
Total Supply 10,000,000,000 PTT

About

Stats

Public Functions 11
Event Types 4
Code Size 6,219 bytes

Events (4) keyboard_arrow_up

Burn Event

Parameters help
from
address help
value
uint256 help

FrozenFunds Event

Parameters help
target
address help
frozen
bool help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

owner Variable

address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

totalSupply Variable

uint256 help

frozenAccount Variable

mapping(address => bool) help

freezeOf Variable

mapping(address => uint256) help

balanceOf Variable

mapping(address => uint256) help

allowance Variable

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

Functions Expand All Collapse All

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 {
  _transfer(msg.sender, _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(_value <= allowance[_from][msg.sender]);
  allowance[_from][msg.sender] = SafeMath.safeSub(
    allowance[_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 success)
{
  allowance[msg.sender][_spender] = _value;
  return true;
}

approveAndCall keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help
_extraData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function approveAndCall(
  address _spender,
  uint256 _value,
  bytes _extraData
) public returns (bool success) {
  tokenRecipient spender = tokenRecipient(_spender);
  if (approve(_spender, _value)) {
    spender.receiveApproval(msg.sender, _value, this, _extraData);
    return true;
  }
}

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 {
  require(newOwner != address(0));
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

burnFrom keyboard_arrow_up

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
  onlyOwner
  returns (bool success)
{
  require(balanceOf[_from] >= _value);
  require(_value <= allowance[_from][msg.sender]);
  balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value);
  allowance[_from][msg.sender] = SafeMath.safeSub(
    allowance[_from][msg.sender],
    _value
  );
  totalSupply = SafeMath.safeSub(totalSupply, _value);
  Burn(_from, _value);
  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _value) public onlyOwner returns (bool success) {
  require(balanceOf[msg.sender] >= _value);
  balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value);
  totalSupply = SafeMath.safeSub(totalSupply, _value);
  Burn(msg.sender, _value);
  return true;
}

freezeAccount keyboard_arrow_up

Parameters help

Name Type
target
address help
freeze
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeAccount(address target, bool freeze) public onlyOwner {
  frozenAccount[target] = freeze;
  FrozenFunds(target, freeze);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() public payable {}

withdrawEther keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function withdrawEther(uint256 amount) public onlyOwner {
  msg.sender.transfer(amount);
}

withdrawMytoken keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function withdrawMytoken(uint256 amount) public onlyOwner {
  _transfer(this, msg.sender, amount);
}

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 MyToken._transfer keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _value
) internal {
  require(_to != 0x0);
  require(balanceOf[_from] >= _value);
  require(balanceOf[_to] + _value > balanceOf[_to]);
  require(!frozenAccount[_from]);
  require(!frozenAccount[_to]);
  balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value);
  balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value);
  Transfer(_from, _to, _value);
}

internal TokenERC20._transfer keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _value
) internal {
  require(_to != 0x0);
  require(balanceOf[_from] >= _value);
  require(balanceOf[_to] + _value > balanceOf[_to]);
  uint256 previousBalances = SafeMath.safeAdd(balanceOf[_from], balanceOf[_to]);
  balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value);
  balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value);
  Transfer(_from, _to, _value);
  assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}

internal SafeMath.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
  uint256 c = a * b;
  assert(a == 0 || c / a == b);
  return c;
}

internal SafeMath.safeDiv keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
  assert(b > 0);
  uint256 c = a / b;
  assert(a == b * c + (a % b));
  return c;
}

internal SafeMath.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
  uint256 c = a + b;
  assert(c >= a && c >= b);
  return c;
}