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
State Variables (15) keyboard_arrow_up
Functions
lock keyboard_arrow_up
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
tokensLockedAtTime keyboard_arrow_up
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
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
Requirements 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
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
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
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
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
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
}
viewOwner keyboard_arrow_up
viewTransferCount keyboard_arrow_up
isTransferPending keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
One or more of the following:
-
newOwner
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
Source Code
function isTransferPending() public view returns (bool) {
require(msg.sender == owner || msg.sender == newOwner);
return newOwner != address(0);
}
acceptOwnership keyboard_arrow_up
pause keyboard_arrow_up
unpause keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
Source Code
function balanceOf(address _address) public view returns (uint256 remaining) {
require(_address != 0x0);
return balances[_address];
}
allowance keyboard_arrow_up
Source Code
function allowance(address _owner, address _spender)
public
view
returns (uint256 remaining)
{
require(_owner != 0x0);
require(_spender != 0x0);
return allowed[_owner][_spender];
}
transfer keyboard_arrow_up
Requirements help
UNKNOWN VALUE
must not be equal to
0x0
Source Code
function transfer(address _to, uint256 _value)
public
whenNotPaused
returns (bool success)
{
return _transfer(msg.sender, _to, _value);
}
approve keyboard_arrow_up
Requirements 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;
}
transferFrom keyboard_arrow_up
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
expenseOf keyboard_arrow_up
approveAndCall keyboard_arrow_up
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
Modifiers help
onlyOwner checks for the following:
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
Source Code
function isFrozenAccount(address _address) public view returns (bool frozen) {
require(_address != 0x0);
return frozenAccount[_address];
}
mint keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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
Requirements 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
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;
}
Internal Functions
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
Requirements help
UNKNOWN VALUE
must not be equal to
0x0
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;
}