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
Constants (13) keyboard_arrow_up
State Variables (18) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;
}
}
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
onlyPayloadSize checks for the following:
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);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
onlyPayloadSize checks for the following:
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);
}
approve keyboard_arrow_up
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
purchase keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
isFundable checks for the following:
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
finalize keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
isFundable checks for the following:
onlyOwner checks for the following:
Requirements help
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.
Modifiers help
isFundable checks for the following:
Requirements 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.
Modifiers help
onlyOwner checks for the following:
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
Modifiers help
isNotFundable checks for the following:
onlyOwner checks for the following:
Requirements help
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
pauseTokenSale keyboard_arrow_up
startTokenSale keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
isNotFundable checks for the following:
Requirements help
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;
}
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.