Blockwell

APIS

ERC20

This contract is an ERC20 token.

Name APIS
Symbol APIS
Decimals 18
Total Supply 9,520,000,000 APIS

About

Stats

Public Functions 22
Event Types 9
Code Size 39,621 bytes

Events (9) 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

Locked Event

Parameters help
target
address help
timeLockUpEnd
uint help
sendLock
bool help
receiveLock
bool help

ManoContractRegistered Event

Parameters help
manoContract
address help
registered
bool help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

RejectedPaymentFromLockedUpWallet Event

Parameters help
from
address help
to
address help
value
uint256 help

RejectedPaymentToLockedUpWallet Event

Parameters help
from
address help
to
address help
value
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unlocked Event

Parameters help
target
address help

LockedInfo Struct

Members
timeLockUpEnd
uint help
sendLock
bool help
receiveLock
bool help

name Constant

string help
APIS

symbol Constant

string help
APIS

decimals Constant

uint8 help
18

totalSupply Variable

uint256 help

owner Variable

address help

newOwner Variable

address help

manoContracts Variable

mapping(address => bool) help

lockedWalletInfo Variable

mapping(address => LockedInfo) help
Internal Variable

allowed Variable

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

balances Variable

mapping(address => uint256) help
Internal Variable

Functions Expand All Collapse All

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);
  newOwner = _newOwner;
}

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);

  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
  newOwner = address(0);
}

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
_to
address help
_apisWei
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address _to, uint256 _apisWei) public returns (bool) {
  // 자신에게 송금하는 것을 방지한다
  require(_to != address(this));

  // 마스터노드 컨트렉트일 경우, APIS 송수신에 제한을 두지 않는다
  if (manoContracts[msg.sender] || manoContracts[_to]) {
    return super.transfer(_to, _apisWei);
  }

  // 송금 기능이 잠긴 지갑인지 확인한다.
  if (
    lockedWalletInfo[msg.sender].timeLockUpEnd > now &&
    lockedWalletInfo[msg.sender].sendLock == true
  ) {
    RejectedPaymentFromLockedUpWallet(msg.sender, _to, _apisWei);
    return false;
  }
  // 입금 받는 기능이 잠긴 지갑인지 확인한다
  else if (
    lockedWalletInfo[_to].timeLockUpEnd > now &&
    lockedWalletInfo[_to].receiveLock == true
  ) {
    RejectedPaymentToLockedUpWallet(msg.sender, _to, _apisWei);
    return false;
  }
  // 제한이 없는 경우, 송금을 진행한다.
  else {
    return super.transfer(_to, _apisWei);
  }
}

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool) {
  require(_to != address(0));
  require(_value <= balances[_from]);
  require(_value <= allowed[_from][msg.sender]);

  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_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) {
  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  returns (bool)
{
  allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(
    _addedValue
  );
  Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  returns (bool)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue > oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  }
  Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

walletLock keyboard_arrow_up

Parameters help

Name Type
_targetWallet
address help
_timeLockEnd
uint help
_sendLock
bool help
_receiveLock
bool help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function walletLock(
  address _targetWallet,
  uint256 _timeLockEnd,
  bool _sendLock,
  bool _receiveLock
) public onlyOwner {
  require(_targetWallet != 0x0);

  // If all locks are unlocked, set the _timeLockEnd to zero.
  if (_sendLock == false && _receiveLock == false) {
    _timeLockEnd = 0;
  }

  lockedWalletInfo[_targetWallet].timeLockUpEnd = _timeLockEnd;
  lockedWalletInfo[_targetWallet].sendLock = _sendLock;
  lockedWalletInfo[_targetWallet].receiveLock = _receiveLock;

  if (_timeLockEnd > 0) {
    Locked(_targetWallet, _timeLockEnd, _sendLock, _receiveLock);
  } else {
    Unlocked(_targetWallet);
  }
}

walletLockBoth keyboard_arrow_up

Parameters help

Name Type
_targetWallet
address help
_timeLockUpEnd
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function walletLockBoth(address _targetWallet, uint256 _timeLockUpEnd)
  public
  onlyOwner
{
  walletLock(_targetWallet, _timeLockUpEnd, true, true);
}

walletLockBothForever keyboard_arrow_up

Parameters help

Name Type
_targetWallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function walletLockBothForever(address _targetWallet) public onlyOwner {
  walletLock(_targetWallet, 999999999999, true, true);
}

walletUnlock keyboard_arrow_up

Parameters help

Name Type
_targetWallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function walletUnlock(address _targetWallet) public onlyOwner {
  walletLock(_targetWallet, 0, false, false);
}

isWalletLocked_Send keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help constant

Requirements help

Source Code
function isWalletLocked_Send(address _addr)
  public
  constant
  returns (bool isSendLocked, uint256 until)
{
  require(_addr != 0x0);

  isSendLocked = (lockedWalletInfo[_addr].timeLockUpEnd > now &&
    lockedWalletInfo[_addr].sendLock == true);

  if (isSendLocked) {
    until = lockedWalletInfo[_addr].timeLockUpEnd;
  } else {
    until = 0;
  }
}

isWalletLocked_Receive keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help constant

Requirements help

Source Code
function isWalletLocked_Receive(address _addr)
  public
  constant
  returns (bool isReceiveLocked, uint256 until)
{
  require(_addr != 0x0);

  isReceiveLocked = (lockedWalletInfo[_addr].timeLockUpEnd > now &&
    lockedWalletInfo[_addr].receiveLock == true);

  if (isReceiveLocked) {
    until = lockedWalletInfo[_addr].timeLockUpEnd;
  } else {
    until = 0;
  }
}

isMyWalletLocked_Send keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant

Requirements help

Source Code
function isMyWalletLocked_Send()
  public
  constant
  returns (bool isSendLocked, uint256 until)
{
  return isWalletLocked_Send(msg.sender);
}

isMyWalletLocked_Receive keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant

Requirements help

Source Code
function isMyWalletLocked_Receive()
  public
  constant
  returns (bool isReceiveLocked, uint256 until)
{
  return isWalletLocked_Receive(msg.sender);
}

registerManoContract keyboard_arrow_up

Parameters help

Name Type
manoAddr
address help
registered
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function registerManoContract(address manoAddr, bool registered)
  public
  onlyOwner
{
  manoContracts[manoAddr] = registered;

  ManoContractRegistered(manoAddr, registered);
}

transferAndLockUntil keyboard_arrow_up

Parameters help

Name Type
_to
address help
_apisWei
uint256 help
_timeLockUpEnd
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferAndLockUntil(
  address _to,
  uint256 _apisWei,
  uint256 _timeLockUpEnd
) public onlyOwner {
  require(transfer(_to, _apisWei));

  walletLockBoth(_to, _timeLockUpEnd);
}

transferAndLockForever keyboard_arrow_up

Parameters help

Name Type
_to
address help
_apisWei
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferAndLockForever(address _to, uint256 _apisWei)
  public
  onlyOwner
{
  require(transfer(_to, _apisWei));

  walletLockBothForever(_to);
}

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 {
  require(_value <= balances[msg.sender]);
  require(_value <= totalSupply);

  address burner = msg.sender;
  balances[burner] -= _value;
  totalSupply -= _value;

  Burn(burner, _value);
}

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.