Blockwell

W GREEN PAY

ERC20

This contract is an ERC20 token.

Name W GREEN PAY
Symbol WGP
Decimals 18
Total Supply 600,000,000 WGP

About link description

W Green Pay (WGP) is a cryptocurrency and operates on the Ethereum platform. W Green Pay has a current supply of 600,000,000 with 17,630,267.351556 in circulation. The last known price of W Green Pay is 0.01049579 USD and is down -0.14 over the last 24 hours. It is currently trading on 1 active market(s) with $21,208.25 traded over the last 24 hours. More information can be found at https://wpay.sg/.

Stats

Public Functions 29
Event Types 9
Code Size 9,359 bytes

Library Use

Uses SafeMath for uint256.

Events (9) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
from
address help
amount
uint256 help

ChangeAllowICOStatus Event

Parameters help
allow
bool help

ChangeLockStatusFrom Event

Parameters help
investor
address help
locked
bool help

ChangeOwnerShip Event

Parameters help
newOwner
address help

ChangeReceiveWallet Event

Parameters help
newAddress
address help

ChangeTokenLockStatus Event

Parameters help
locked
bool help

Mint Event

Parameters help
from
address help
to
address help
amount
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

_name Constant

string help
W GREEN PAY

_symbol Constant

string help
WGP

_decimals Constant

uint8 help
18

_maxCap Constant

uint256 help
600000000 ether

_icoStartDate Variable

uint256 help
Internal Variable

_icoEndDate Variable

uint256 help
Internal Variable

_totalsupply Variable

uint256 help
Internal Variable

_owner Variable

address help
Internal Variable

_ethFundMain Variable

address help
Internal Variable

_lockToken Variable

bool help
Internal Variable

_allowICO Variable

bool help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

locked Variable

mapping(address => bool) help
Internal Variable

Functions Expand All Collapse All

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
investor
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address investor) public view returns (uint256) {
  return balances[investor];
}

Parameters help

Name Type
_from
address help
_spender
address help

Properties

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

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _amount
) public onlyFinishedICO onlyUnlockToken returns (bool) {
  require(_to != address(0), "Receiver can not be 0x0");
  require(balances[_from] >= _amount, "Source's balance is not enough");
  require(allowed[_from][msg.sender] >= _amount, "Allowance is not enough");
  require(!locked[_from], "From address is locked");
  require(!locked[_to], "Receiver address is locked");
  balances[_from] = (balances[_from]).sub(_amount);
  allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_amount);
  balances[_to] = (balances[_to]).add(_amount);
  emit Transfer(_from, _to, _amount);
  return true;
}

Parameters help

Name Type
_spender
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _amount)
  public
  onlyFinishedICO
  onlyUnlockToken
  returns (bool)
{
  require(_spender != address(0), "Address can not be 0x0");
  require(
    balances[msg.sender] >= _amount,
    "Balance does not have enough tokens"
  );
  require(!locked[msg.sender], "Sender address is locked");
  require(!locked[_spender], "Spender address is locked");
  allowed[msg.sender][_spender] = _amount;
  emit Approval(msg.sender, _spender, _amount);
  return true;
}

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _amount)
  public
  onlyFinishedICO
  onlyUnlockToken
  returns (bool)
{
  require(_to != address(0), "Receiver can not be 0x0");
  require(
    balances[msg.sender] >= _amount,
    "Balance does not have enough tokens"
  );
  require(!locked[msg.sender], "Sender address is locked");
  require(!locked[_to], "Receiver address is locked");
  balances[msg.sender] = (balances[msg.sender]).sub(_amount);
  balances[_to] = (balances[_to]).add(_amount);
  emit Transfer(msg.sender, _to, _amount);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function name() public pure returns (string memory) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function symbol() public pure returns (string memory) {
  return _symbol;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function decimals() public pure returns (uint8) {
  return _decimals;
}

maxCap keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function maxCap() public pure returns (uint256) {
  return _maxCap;
}

owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

ethFundMain keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

icoStartDate keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

icoEndDate keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

lockToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function lockToken() public view returns (bool) {
  return _lockToken;
}

allowICO keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function allowICO() public view returns (bool) {
  return _allowICO;
}

lockStatusOf keyboard_arrow_up

Parameters help

Name Type
investor
address help

Properties

Visibility help public
Mutability help view
Source Code
function lockStatusOf(address investor) public view returns (bool) {
  return locked[investor];
}

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) {
  require(
    balances[msg.sender] >= _value,
    "Balance does not have enough tokens"
  );
  balances[msg.sender] = (balances[msg.sender]).sub(_value);
  _totalsupply = _totalsupply.sub(_value);
  emit Burn(msg.sender, _value);
  return true;
}

stopTransferToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function stopTransferToken() external onlyOwner onlyFinishedICO {
  _lockToken = true;
  emit ChangeTokenLockStatus(true);
}

startTransferToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function startTransferToken() external onlyOwner onlyFinishedICO {
  _lockToken = false;
  emit ChangeTokenLockStatus(false);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() external payable onlyICO onlyAllowICO {}

manualMint keyboard_arrow_up

Parameters help

Name Type
receiver
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function manualMint(address receiver, uint256 _value) public onlyOwner {
  uint256 value = _value.mul(10**18);
  mint(_owner, receiver, value);
}

haltCrowdSale keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function haltCrowdSale() external onlyOwner {
  _allowICO = false;
  emit ChangeAllowICOStatus(false);
}

resumeCrowdSale keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function resumeCrowdSale() external onlyOwner {
  _allowICO = true;
  emit ChangeAllowICOStatus(true);
}

changeReceiveWallet keyboard_arrow_up

Parameters help

Name Type
newAddress
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeReceiveWallet(address payable newAddress) external onlyOwner {
  require(newAddress != address(0), "Address can not be 0x0");
  _ethFundMain = newAddress;
  emit ChangeReceiveWallet(newAddress);
}

assignOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function assignOwnership(address newOwner) external onlyOwner {
  require(newOwner != address(0), "Address can not be 0x0");
  _owner = newOwner;
  emit ChangeOwnerShip(newOwner);
}

forwardFunds keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function forwardFunds() external onlyOwner {
  require(_ethFundMain != address(0));
  _ethFundMain.transfer(address(this).balance);
}

haltTokenTransferFromAddress keyboard_arrow_up

Parameters help

Name Type
investor
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function haltTokenTransferFromAddress(address investor) external onlyOwner {
  locked[investor] = true;
  emit ChangeLockStatusFrom(investor, true);
}

resumeTokenTransferFromAddress keyboard_arrow_up

Parameters help

Name Type
investor
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function resumeTokenTransferFromAddress(address investor) external onlyOwner {
  locked[investor] = false;
  emit ChangeLockStatusFrom(investor, false);
}

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 WGP.mint keyboard_arrow_up

Parameters help

Name Type
from
address help
receiver
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function mint(
  address from,
  address receiver,
  uint256 value
) internal {
  require(receiver != address(0), "Address can not be 0x0");
  require(value > 0, "Value should larger than 0");
  balances[receiver] = balances[receiver].add(value);
  _totalsupply = _totalsupply.add(value);
  require(_totalsupply <= _maxCap, "CrowdSale hit max cap");
  emit Mint(from, receiver, value);
  emit Transfer(address(0), receiver, value);
}