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
State Variables (7) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
OwnershipTransferred(owner, _newOwner);
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
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);
}
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Requirements help
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;
}
approve keyboard_arrow_up
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
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
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
Modifiers help
onlyOwner checks for the following:
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
walletLockBothForever keyboard_arrow_up
walletUnlock keyboard_arrow_up
isWalletLocked_Send keyboard_arrow_up
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
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
isMyWalletLocked_Receive keyboard_arrow_up
registerManoContract keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function registerManoContract(address manoAddr, bool registered)
public
onlyOwner
{
manoContracts[manoAddr] = registered;
ManoContractRegistered(manoAddr, registered);
}
transferAndLockUntil keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferAndLockUntil(
address _to,
uint256 _apisWei,
uint256 _timeLockUpEnd
) public onlyOwner {
require(transfer(_to, _apisWei));
walletLockBoth(_to, _timeLockUpEnd);
}
transferAndLockForever keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferAndLockForever(address _to, uint256 _apisWei)
public
onlyOwner
{
require(transfer(_to, _apisWei));
walletLockBothForever(_to);
}
burn keyboard_arrow_up
Requirements help
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);
}
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.