Blockwell

POPCHAIN CASH

ERC20

This contract is an ERC20 token.

Name POPCHAIN CASH
Symbol PCH
Decimals 18
Total Supply 2,000,000,000 PCH

About link

POPCHAIN (PCH) is a cryptocurrency token and operates on the Ethereum platform. POPCHAIN has a current supply of 2,000,000,000 with 892,799,356.876 in circulation. The last known price of POPCHAIN is $0.000258 USD and is up 0.28% over the last 24 hours. It is currently trading on 1 active market(s) with $0 traded over the last 24 hours. More information can be found at https://popchain.co.

Stats

Public Functions 14
Event Types 3
Code Size 7,622 bytes

Library Use

Uses SafeMath for uint256.

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

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));
        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 onlyNewOwner returns(bool) {
        uint256 ownerAmount = _balances[owner];
        _balances[owner] = _balances[owner].sub(ownerAmount);
        _balances[newOwner] = _balances[newOwner].add(ownerAmount);
        emit Transfer(owner, newOwner, ownerAmount);   
        owner = newOwner;
        newOwner = address(0);
        emit OwnershipTransferred(owner, newOwner);

        return true;
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

balanceOf keyboard_arrow_up

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help view
Source Code
    function balanceOf(address _holder) public view returns (uint256 balance) {
        return _balances[_holder].add(_lockupBalances[_holder]);
    }

allowance keyboard_arrow_up

Parameters help

Name Type
_holder
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
    function allowance(address _holder, address _spender) public view returns (uint256) {
        return _allowed[_holder][_spender];
    }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

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

        // SafeMath.sub will throw if there is not enough balance.
        _balances[msg.sender] = _balances[msg.sender].sub(_value);
        _balances[_to] = _balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

transferFrom keyboard_arrow_up

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) {
        require(_from != address(0));
        require(_to != address(0));
        require(_to != address(this));
        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);
        emit Transfer(_from, _to, _value);
        return true;
    }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function approve(address _spender, uint256 _value) public returns (bool) {
        require(_value > 0);
        _allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

lockupBalanceOf keyboard_arrow_up

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help view
Source Code
    function lockupBalanceOf(address _holder) public view returns (uint256 balance) {
        return _lockupBalances[_holder];
    }

unlockTimeOf keyboard_arrow_up

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help view
Source Code
    function unlockTimeOf(address _holder) public view returns (uint256 lockTime) {
        return _lockupExpireTime[_holder];
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

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(_value <= _balances[msg.sender]);
        address burner = msg.sender;
        _balances[burner] = _balances[burner].sub(_value);
        _totalSupply = _totalSupply.sub(_value);
        return true;
    }

distribute keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help
_lockupRate
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function distribute(address _to, uint256 _value, uint256 _lockupRate) public onlyOwner returns (bool) {
        require(_to != address(0));
        require(_to != address(this));
        //Do not allow multiple distributions of the same address. Avoid locking time reset.
        require(_lockupBalances[_to] == 0);     
        require(_value <= _balances[owner]);
        require(_lockupRate == 50 || _lockupRate == 100);

        _balances[owner] = _balances[owner].sub(_value);

        uint256 lockupValue = _value.mul(_lockupRate).div(100);
        uint256 givenValue = _value.sub(lockupValue);
        uint256 ExpireTime = now + LOCKUP_TERM; //six months

        if (_lockupRate == 100) {
            ExpireTime += LOCKUP_TERM;          //one year.
        }
        
        _balances[_to] = _balances[_to].add(givenValue);
        _lockupBalances[_to] = _lockupBalances[_to].add(lockupValue);
        _lockupExpireTime[_to] = ExpireTime;

        emit Transfer(owner, _to, _value);
        return true;
    }

unlock keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function unlock() public returns(bool) {
        address tokenHolder = msg.sender;
        require(_lockupBalances[tokenHolder] > 0);
        require(_lockupExpireTime[tokenHolder] <= now);

        uint256 value = _lockupBalances[tokenHolder];

        _balances[tokenHolder] = _balances[tokenHolder].add(value);  
        _lockupBalances[tokenHolder] = 0;

        return true;
    }