Blockwell

Deeper Network

ERC20

This contract is an ERC20 token.

Name Deeper Network
Symbol DPR
Decimals 18
Total Supply 10,000,000,000 DPR

About link description

Deeper Network (DPR) is a cryptocurrency and operates on the Ethereum platform. Deeper Network has a current supply of 10,000,000,000 with 386,168,082 in circulation. The last known price of Deeper Network is 0.07143695 USD and is down -4.84 over the last 24 hours. It is currently trading on 14 active market(s) with $1,201,347.53 traded over the last 24 hours. More information can be found at https://www.deeper.network.

Stats

Public Functions 31
Event Types 8
Code Size 17,742 bytes

Library Use

Uses SafeMath for uint256.

Events (8) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

FreezeAccount Event

Parameters help
_address
address help
frozen
bool help

Locked Event

Parameters help
_of
address help
_reason
bytes32 help
_amount
uint256 help
_validity
uint256 help

Pause Event

Parameters help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

TransferOwnership Event

Parameters help
_from
address help
_to
address help

Unlocked Event

Parameters help
_of
address help
_reason
bytes32 help
_amount
uint256 help

Unpause Event

Parameters help

ALREADY_LOCKED Constant

string help
Tokens already locked

NOT_LOCKED Constant

string help
No tokens locked

AMOUNT_ZERO Constant

string help
Amount can not be 0

MAX_TOTAL_SUPPLY Constant

uint256 help
10000000000

symbol Variable

string help

name Variable

string help

decimals Variable

uint8 help

paused Variable

bool help

_totalSupply Variable

uint256 help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

incomes Variable

mapping(address => uint256) help
Internal Variable

expenses Variable

mapping(address => uint256) help
Internal Variable

frozenAccount Variable

mapping(address => bool) help
Internal Variable

owner Variable

address help
Internal Variable

newOwner Variable

address help
Internal Variable

transferCount Variable

uint32 help
Internal Variable

lockReason Variable

mapping(address => bytes32[]) help
Internal Variable

locked Variable

mapping(address => mapping(bytes32 => lockToken)) help
Internal Variable

Functions Expand All Collapse All

lock keyboard_arrow_up

Parameters help

Name Type
_reason
bytes32 help
_amount
uint256 help
_time
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

UNKNOWN VALUE must not be equal to 0x0
Source Code
function lock(
  bytes32 _reason,
  uint256 _amount,
  uint256 _time
) public whenNotPaused returns (bool) {
  uint256 validUntil = now.add(_time); //solhint-disable-line

  // If tokens are already locked, then functions extendLock or
  // increaseLockAmount should be used to make any changes
  require(tokensLocked(msg.sender, _reason) == 0, ALREADY_LOCKED);
  require(_amount != 0, AMOUNT_ZERO);

  if (locked[msg.sender][_reason].amount == 0)
    lockReason[msg.sender].push(_reason);

  transfer(address(this), _amount);

  locked[msg.sender][_reason] = lockToken(_amount, validUntil, false);

  emit Locked(msg.sender, _reason, _amount, validUntil);
  return true;
}

tokensLocked keyboard_arrow_up

Parameters help

Name Type
_of
address help
_reason
bytes32 help

Properties

Visibility help public
Mutability help view
Source Code
function tokensLocked(address _of, bytes32 _reason)
  public
  view
  returns (uint256 amount)
{
  if (!locked[_of][_reason].claimed) amount = locked[_of][_reason].amount;
}

tokensLockedAtTime keyboard_arrow_up

Parameters help

Name Type
_of
address help
_reason
bytes32 help
_time
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function tokensLockedAtTime(
  address _of,
  bytes32 _reason,
  uint256 _time
) public view returns (uint256 amount) {
  if (locked[_of][_reason].validity > _time)
    amount = locked[_of][_reason].amount;
}

totalBalanceOf keyboard_arrow_up

Parameters help

Name Type
_of
address help

Properties

Visibility help public
Mutability help view
Source Code
function totalBalanceOf(address _of) public view returns (uint256 amount) {
  amount = balanceOf(_of);

  for (uint256 i = 0; i < lockReason[_of].length; i++) {
    amount = amount.add(tokensLocked(_of, lockReason[_of][i]));
  }
}

extendLock keyboard_arrow_up

Parameters help

Name Type
_reason
bytes32 help
_time
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function extendLock(bytes32 _reason, uint256 _time)
  public
  whenNotPaused
  returns (bool)
{
  require(tokensLocked(msg.sender, _reason) > 0, NOT_LOCKED);

  locked[msg.sender][_reason].validity = locked[msg.sender][_reason]
  .validity
  .add(_time);

  emit Locked(
    msg.sender,
    _reason,
    locked[msg.sender][_reason].amount,
    locked[msg.sender][_reason].validity
  );
  return true;
}

increaseLockAmount keyboard_arrow_up

Parameters help

Name Type
_reason
bytes32 help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

UNKNOWN VALUE must not be equal to 0x0
Source Code
function increaseLockAmount(bytes32 _reason, uint256 _amount)
  public
  whenNotPaused
  returns (bool)
{
  require(tokensLocked(msg.sender, _reason) > 0, NOT_LOCKED);
  transfer(address(this), _amount);

  locked[msg.sender][_reason].amount = locked[msg.sender][_reason].amount.add(
    _amount
  );

  emit Locked(
    msg.sender,
    _reason,
    locked[msg.sender][_reason].amount,
    locked[msg.sender][_reason].validity
  );
  return true;
}

tokensUnlockable keyboard_arrow_up

Parameters help

Name Type
_of
address help
_reason
bytes32 help

Properties

Visibility help public
Mutability help view
Source Code
function tokensUnlockable(address _of, bytes32 _reason)
  public
  view
  returns (uint256 amount)
{
  if (locked[_of][_reason].validity <= now && !locked[_of][_reason].claimed)
    //solhint-disable-line
    amount = locked[_of][_reason].amount;
}

unlock keyboard_arrow_up

Parameters help

Name Type
_of
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function unlock(address _of)
  public
  whenNotPaused
  returns (uint256 unlockableTokens)
{
  uint256 lockedTokens;

  for (uint256 i = 0; i < lockReason[_of].length; i++) {
    lockedTokens = tokensUnlockable(_of, lockReason[_of][i]);
    if (lockedTokens > 0) {
      unlockableTokens = unlockableTokens.add(lockedTokens);
      locked[_of][lockReason[_of][i]].claimed = true;
      emit Unlocked(_of, lockReason[_of][i], lockedTokens);
    }
  }

  if (unlockableTokens > 0) this.transfer(_of, unlockableTokens);
}

getUnlockableTokens keyboard_arrow_up

Parameters help

Name Type
_of
address help

Properties

Visibility help public
Mutability help view
Source Code
function getUnlockableTokens(address _of)
  public
  view
  returns (uint256 unlockableTokens)
{
  for (uint256 i = 0; i < lockReason[_of].length; i++) {
    unlockableTokens = unlockableTokens.add(
      tokensUnlockable(_of, lockReason[_of][i])
    );
  }
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  newOwner = _newOwner;
}

viewOwner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function viewOwner() public view returns (address) {
  return owner;
}

viewTransferCount keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function viewTransferCount() public view onlyOwner returns (uint32) {
  return transferCount;
}

isTransferPending keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function isTransferPending() public view returns (bool) {
  require(msg.sender == owner || msg.sender == newOwner);
  return newOwner != address(0);
}

acceptOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function acceptOwnership() public {
  require(msg.sender == newOwner);

  owner = newOwner;
  newOwner = address(0);
  transferCount++;

  emit TransferOwnership(owner, newOwner);
}

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pause() public onlyOwner whenNotPaused {
  paused = true;
  emit Pause();
}

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unpause() public onlyOwner whenPaused {
  paused = false;
  emit Unpause();
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function balanceOf(address _address) public view returns (uint256 remaining) {
  require(_address != 0x0);

  return balances[_address];
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function allowance(address _owner, address _spender)
  public
  view
  returns (uint256 remaining)
{
  require(_owner != 0x0);
  require(_spender != 0x0);
  return allowed[_owner][_spender];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transfer(address _to, uint256 _value)
  public
  whenNotPaused
  returns (bool success)
{
  return _transfer(msg.sender, _to, _value);
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approve(address _spender, uint256 _value)
  public
  whenNotPaused
  returns (bool success)
{
  require(_spender != 0x0);
  require(!frozenAccount[msg.sender]);
  require(!frozenAccount[_spender]);

  allowed[msg.sender][_spender] = _value;

  emit Approval(msg.sender, _spender, _value);

  return true;
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

UNKNOWN VALUE must not be equal to 0x0
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public whenNotPaused returns (bool success) {
  require(!frozenAccount[msg.sender]);
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
  return _transfer(_from, _to, _value);
}

incomeOf keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function incomeOf(address _address) public view returns (uint256 income) {
  require(_address != 0x0);

  return incomes[_address];
}

expenseOf keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function expenseOf(address _address) public view returns (uint256 expense) {
  require(_address != 0x0);

  return expenses[_address];
}

approveAndCall keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approveAndCall(
  address _spender,
  uint256 _value,
  bytes _data
) public whenNotPaused returns (bool success) {
  if (approve(_spender, _value)) {
    require(
      ApproveAndCallFallBack(_spender).receiveApproval(
        msg.sender,
        _value,
        this,
        _data
      ) == true
    );
    return true;
  }
  return false;
}

freezeAccount keyboard_arrow_up

Parameters help

Name Type
_address
address help
freeze
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeAccount(address _address, bool freeze)
  public
  onlyOwner
  returns (bool success)
{
  frozenAccount[_address] = freeze;
  emit FreezeAccount(_address, freeze);
  return true;
}

isFrozenAccount keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function isFrozenAccount(address _address) public view returns (bool frozen) {
  require(_address != 0x0);
  return frozenAccount[_address];
}

mint keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(uint256 amount) public onlyOwner returns (bool success) {
  uint256 newSupply = _totalSupply + amount;
  require(
    newSupply <= MAX_TOTAL_SUPPLY * 10**uint256(decimals),
    "ERC20: exceed maximum total supply"
  );

  _totalSupply = newSupply;
  balances[owner] += amount;
  emit Transfer(address(0), owner, amount);
  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function burn(uint256 amount) public whenNotPaused returns (bool success) {
  require(balances[msg.sender] >= amount);
  require(!frozenAccount[msg.sender]);
  balances[msg.sender] = balances[msg.sender].sub(amount);
  _totalSupply -= amount;

  emit Transfer(msg.sender, address(0), amount);
  return true;
}

transferWithLock keyboard_arrow_up

Parameters help

Name Type
_to
address help
_reason
bytes32 help
_amount
uint256 help
_time
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

UNKNOWN VALUE must not be equal to 0x0
Source Code
function transferWithLock(
  address _to,
  bytes32 _reason,
  uint256 _amount,
  uint256 _time
) public whenNotPaused returns (bool) {
  uint256 validUntil = now.add(_time); //solhint-disable-line

  require(tokensLocked(_to, _reason) == 0, ALREADY_LOCKED);
  require(_amount != 0, AMOUNT_ZERO);

  if (locked[_to][_reason].amount == 0) lockReason[_to].push(_reason);

  transfer(address(this), _amount);

  locked[_to][_reason] = lockToken(_amount, validUntil, false);

  emit Locked(_to, _reason, _amount, validUntil);
  return true;
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _value
) internal returns (bool success) {
  require(_to != 0x0);
  require(balances[_from] >= _value);
  require(!frozenAccount[_from]);
  require(!frozenAccount[_to]);

  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);

  incomes[_to] = incomes[_to].add(_value);
  expenses[_from] = expenses[_from].add(_value);

  emit Transfer(_from, _to, _value);

  return true;
}