Blockwell

PILLAR

ERC20

This contract is an ERC20 token.

Name PILLAR
Symbol PLR
Decimals 18
Total Supply 800,000,000 PLR

About link description

Pillar (PLR) is a cryptocurrency and operates on the Ethereum platform. Pillar has a current supply of 800,000,000 with 259,348,201 in circulation. The last known price of Pillar is 0.0290663 USD and is down -5.60 over the last 24 hours. It is currently trading on 10 active market(s) with $162,930.54 traded over the last 24 hours. More information can be found at pillar.fi.

Stats

Public Functions 17
Event Types 5
Code Size 18,244 bytes

Library Use

Uses SafeMath for uint.

Events (5) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint help

Migrate Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

MoneyAddedForRefund Event

Parameters help
_from
address help
_value
uint256 help
_total
uint256 help

Refund Event

Parameters help
_from
address help
_value
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help

name Constant

string help
PILLAR

symbol Constant

string help
PLR

decimals Constant

uint help
18

minTokensForSale Constant

uint help
32000000e18

maxPresaleTokens Constant

uint help
48000000e18

totalAvailableForSale Constant

uint help
528000000e18

futureTokens Constant

uint help
120000000e18

twentyThirtyTokens Constant

uint help
80000000e18

lockedTeamAllocationTokens Constant

uint help
16000000e18

unlockedTeamAllocationTokens Constant

uint help
8000000e18

coldStorageYears Constant

uint help
10

futureStorageYears Constant

uint help
3

tokenPrice Constant

uint help
0.0005 ether

teamAllocation Variable

address help

unsoldTokens Variable

address help

twentyThirtyAllocation Variable

address help

futureSaleAllocation Variable

address help

unlockedTeamStorageVault Variable

address help

twentyThirtyVault Variable

address help

futureSaleVault Variable

address help

pillarTokenFactory Variable

address help

totalSupply Variable

uint help

owner Variable

address help

unsoldVault Variable

address help
Internal Variable

totalPresale Variable

uint help
Internal Variable

fundingStartBlock Variable

uint help
Internal Variable

fundingStopBlock Variable

uint help
Internal Variable

fundingMode Variable

bool help
Internal Variable

totalUsedTokens Variable

uint help
Internal Variable

allowed Variable

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

balances Variable

mapping(address => uint) 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
Source Code
function transferOwnership(address newOwner) onlyOwner {
  if (newOwner != address(0)) {
    owner = newOwner;
  }
}

Parameters help

Name Type
_owner
address help

Properties

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

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) {
  balances[msg.sender] = balances[msg.sender].sub(_value);
  balances[_to] = balances[_to].add(_value);
  Transfer(msg.sender, _to, _value);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) onlyPayloadSize(3 * 32) {
  var _allowance = allowed[_from][msg.sender];

  // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
  // if (_value > _allowance) throw;

  balances[_to] = balances[_to].add(_value);
  balances[_from] = balances[_from].sub(_value);
  allowed[_from][msg.sender] = _allowance.sub(_value);
  Transfer(_from, _to, _value);
}

Parameters help

Name Type
_spender
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function approve(address _spender, uint256 _value) {
  // To change the approve amount you first have to reduce the addresses`
  //  allowance to zero by calling `approve(_spender, 0)` if it is not
  //  already 0 to mitigate the race condition described here:
  //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
  if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw;

  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers help

Requirements help

Source Code
function() external payable isFundable {
  purchase();
}

purchase keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers help

Requirements help

Source Code
function purchase() payable isFundable {
  if (block.number < fundingStartBlock) throw;
  if (block.number > fundingStopBlock) throw;
  if (totalUsedTokens >= totalAvailableForSale) throw;

  if (msg.value < tokenPrice) throw;

  uint256 numTokens = msg.value.div(tokenPrice);
  if (numTokens < 1) throw;
  //transfer money to PillarTokenFactory MultisigWallet
  pillarTokenFactory.transfer(msg.value);

  uint256 tokens = numTokens.mul(1e18);
  totalUsedTokens = totalUsedTokens.add(tokens);
  if (totalUsedTokens > totalAvailableForSale) throw;

  balances[msg.sender] = balances[msg.sender].add(tokens);

  //fire the event notifying the transfer of tokens
  Transfer(0, msg.sender, tokens);
}

numberOfTokensLeft keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function numberOfTokensLeft() constant returns (uint256) {
  uint256 tokensAvailableForSale = totalAvailableForSale.sub(totalUsedTokens);
  return tokensAvailableForSale;
}

finalize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finalize() external isFundable onlyOwner {
  if (block.number <= fundingStopBlock) throw;

  if (totalUsedTokens < minTokensForSale) throw;

  if (unsoldVault == address(0)) throw;

  // switch funding mode off
  fundingMode = false;

  //Allot team tokens to a smart contract which will frozen for 9 months
  teamAllocation = new TeamAllocation();
  balances[address(teamAllocation)] = lockedTeamAllocationTokens;

  //allocate unsold tokens to iced storage
  uint256 totalUnSold = numberOfTokensLeft();
  if (totalUnSold > 0) {
    unsoldTokens = new UnsoldAllocation(
      coldStorageYears,
      unsoldVault,
      totalUnSold
    );
    balances[address(unsoldTokens)] = totalUnSold;
  }

  //transfer any balance available to Pillar Multisig Wallet
  pillarTokenFactory.transfer(this.balance);
}

refund keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function refund() external isFundable {
  if (block.number <= fundingStopBlock) throw;
  if (totalUsedTokens >= minTokensForSale) throw;

  uint256 plrValue = balances[msg.sender];
  if (plrValue == 0) throw;

  balances[msg.sender] = 0;

  uint256 ethValue = plrValue.mul(tokenPrice).div(1e18);
  msg.sender.transfer(ethValue);
  Refund(msg.sender, ethValue);
}

allocateForRefund keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function allocateForRefund() external payable onlyOwner returns (uint256) {
  //does nothing just accepts and stores the ether
  MoneyAddedForRefund(msg.sender, msg.value, this.balance);
  return this.balance;
}

allocateTokens keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function allocateTokens(address _to, uint256 _tokens)
  external
  isNotFundable
  onlyOwner
{
  uint256 numOfTokens = _tokens.mul(1e18);
  totalPresale = totalPresale.add(numOfTokens);

  if (totalPresale > maxPresaleTokens) throw;

  balances[_to] = balances[_to].add(numOfTokens);
}

unPauseTokenSale keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unPauseTokenSale() external onlyOwner isNotFundable returns (bool) {
  fundingMode = true;
  return fundingMode;
}

pauseTokenSale keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pauseTokenSale() external onlyOwner isFundable returns (bool) {
  fundingMode = false;
  return !fundingMode;
}

startTokenSale keyboard_arrow_up

Parameters help

Name Type
_fundingStartBlock
uint help
_fundingStopBlock
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function startTokenSale(uint256 _fundingStartBlock, uint256 _fundingStopBlock)
  external
  onlyOwner
  isNotFundable
  returns (bool)
{
  if (_fundingStopBlock <= _fundingStartBlock) throw;

  fundingStartBlock = _fundingStartBlock;
  fundingStopBlock = _fundingStopBlock;
  fundingMode = true;
  return fundingMode;
}

fundingStatus keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function fundingStatus() external constant returns (bool) {
  return fundingMode;
}

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.