Token Papyrus Prototype Token

 

Overview [ERC-20]

Max Total Supply:
631,218.49661597796230003 PRP

Holders:
227

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PapyrusPrototypeToken

Compiler Version
v0.4.15+commit.bbb8e64f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-10-11
*/

pragma solidity 0.4.15;

/// @title ERC20 interface
/// @dev Full ERC20 interface described at https://github.com/ethereum/EIPs/issues/20.
contract ERC20 {

  // EVENTS

  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);

  // PUBLIC FUNCTIONS

  function transfer(address _to, uint256 _value) public returns (bool);
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
  function approve(address _spender, uint256 _value) public returns (bool);
  function balanceOf(address _owner) public constant returns (uint256);
  function allowance(address _owner, address _spender) public constant returns (uint256);

  // FIELDS

  uint256 public totalSupply;
}

/// @title Ownable
/// @dev The Ownable contract has an owner address, and provides basic authorization control
/// functions, this simplifies the implementation of "user permissions".
contract Ownable {

  // EVENTS

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  // PUBLIC FUNCTIONS

  /// @dev The Ownable constructor sets the original `owner` of the contract to the sender account.
  function Ownable() {
    owner = msg.sender;
  }

  /// @dev Allows the current owner to transfer control of the contract to a newOwner.
  /// @param newOwner The address to transfer ownership to.
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

  // MODIFIERS

  /// @dev Throws if called by any account other than the owner.
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  // FIELDS

  address public owner;
}

/// @title SafeMath
/// @dev Math operations with safety checks that throw on error.
library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

/// @title Standard ERC20 token
/// @dev Implementation of the basic standard token.
contract StandardToken is ERC20 {
  using SafeMath for uint256;

  // PUBLIC FUNCTIONS

  /// @dev Transfers tokens to a specified address.
  /// @param _to The address which you want to transfer to.
  /// @param _value The amount of tokens to be transferred.
  /// @return A boolean that indicates if the operation was successful.
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  /// @dev Transfers tokens from one address to another.
  /// @param _from The address which you want to send tokens from.
  /// @param _to The address which you want to transfer to.
  /// @param _value The amount of tokens to be transferred.
  /// @return A boolean that indicates if the operation was successful.
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowances[_from][msg.sender]);
    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  /// @dev Approves the specified address to spend the specified amount of tokens on behalf of msg.sender.
  /// Beware that changing an allowance with this method brings the risk that someone may use both the old
  /// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
  /// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
  /// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
  /// @param _spender The address which will spend tokens.
  /// @param _value The amount of tokens to be spent.
  /// @return A boolean that indicates if the operation was successful.
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowances[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  /// @dev Gets the balance of the specified address.
  /// @param _owner The address to query the balance of.
  /// @return An uint256 representing the amount owned by the specified address.
  function balanceOf(address _owner) public constant returns (uint256) {
    return balances[_owner];
  }

  /// @dev Function to check the amount of tokens that an owner allowances to a spender.
  /// @param _owner The address which owns tokens.
  /// @param _spender The address which will spend tokens.
  /// @return A uint256 specifying the amount of tokens still available for the spender.
  function allowance(address _owner, address _spender) public constant returns (uint256) {
    return allowances[_owner][_spender];
  }

  // FIELDS

  mapping (address => uint256) balances;
  mapping (address => mapping (address => uint256)) allowances;
}

/// @title Papyrus Prototype Token (PRP) smart contract.
contract PapyrusPrototypeToken is StandardToken, Ownable {

  // EVENTS

  event Mint(address indexed to, uint256 amount, uint256 priceUsd);
  event MintFinished();
  event TransferableChanged(bool transferable);

  // PUBLIC FUNCTIONS

  // If ether is sent to this address, send it back
  function() { revert(); }

  // Check transfer ability and sender address before transfer
  function transfer(address _to, uint _value) canTransfer public returns (bool) {
    return super.transfer(_to, _value);
  }

  // Check transfer ability and sender address before transfer
  function transferFrom(address _from, address _to, uint _value) canTransfer public returns (bool) {
    return super.transferFrom(_from, _to, _value);
  }

  /// @dev Function to mint tokens.
  /// @param _to The address that will receive the minted tokens.
  /// @param _amount The amount of tokens to mint.
  /// @param _priceUsd The price of minted token at moment of purchase in USD with 18 decimals.
  /// @return A boolean that indicates if the operation was successful.
  function mint(address _to, uint256 _amount, uint256 _priceUsd) onlyOwner canMint public returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);
    if (_priceUsd != 0) {
      uint256 amountUsd = _amount.mul(_priceUsd).div(10**18);
      totalCollected = totalCollected.add(amountUsd);
    }
    Mint(_to, _amount, _priceUsd);
    Transfer(0x0, _to, _amount);
    return true;
  }

  /// @dev Function to stop minting new tokens.
  /// @return A boolean that indicates if the operation was successful.
  function finishMinting() onlyOwner canMint public returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }

  /// @dev Change ability to transfer tokens by users.
  /// @return A boolean that indicates if the operation was successful.
  function setTransferable(bool _transferable) onlyOwner public returns (bool) {
    require(transferable != _transferable);
    transferable = _transferable;
    TransferableChanged(transferable);
    return true;
  }

  // MODIFIERS

  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  modifier canTransfer() {
    require(transferable || msg.sender == owner);
    _;
  }

  // FIELDS

  // Standard fields used to describe the token
  string public name = "Papyrus Prototype Token";
  string public symbol = "PRP";
  string public version = "H0.1";
  uint8 public decimals = 18;

  // At the start of the token existence token is not transferable
  bool public transferable = false;

  // Will be set to true when minting tokens will be finished
  bool public mintingFinished = false;

  // Amount of USD (with 18 decimals) collected during sale phase
  uint public totalCollected;
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_priceUsd","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"transferable","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_transferable","type":"bool"}],"name":"setTransferable","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"priceUsd","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"transferable","type":"bool"}],"name":"TransferableChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

606060405260408051908101604052601781527f506170797275732050726f746f7479706520546f6b656e000000000000000000602082015260049080516200004d9291602001906200011a565b5060408051908101604052600381527f505250000000000000000000000000000000000000000000000000000000000060208201526005908051620000979291602001906200011a565b5060408051908101604052600481527f48302e310000000000000000000000000000000000000000000000000000000060208201526006908051620000e19291602001906200011a565b506007805462ffff001960ff199091166012171690555b60038054600160a060020a03191633600160a060020a03161790555b620001c4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200015d57805160ff19168380011785556200018d565b828001600101855582156200018d579182015b828111156200018d57825182559160200191906001019062000170565b5b506200019c929150620001a0565b5090565b620001c191905b808211156200019c5760008155600101620001a7565b5090565b90565b610ef580620001d46000396000f300606060405236156100f95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461010c57806306fdde0314610133578063095ea7b3146101be578063156e29f6146101f457806318160ddd1461022d57806323b872dd14610252578063313ce5671461028e57806354fd4d50146102b757806370a08231146103425780637d64bcb4146103735780638da5cb5b1461039a57806392ff0d31146103c957806395d89b41146103f05780639cd237071461047b578063a9059cbb146104a7578063dd62ed3e146104dd578063e29eb83614610514578063f2fde38b14610539575b341561010457600080fd5b5b600080fd5b005b341561011757600080fd5b61011f61055a565b604051901515815260200160405180910390f35b341561013e57600080fd5b610146610569565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101835780820151818401525b60200161016a565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101c957600080fd5b61011f600160a060020a0360043516602435610607565b604051901515815260200160405180910390f35b34156101ff57600080fd5b61011f600160a060020a0360043516602435604435610674565b604051901515815260200160405180910390f35b341561023857600080fd5b6102406107db565b60405190815260200160405180910390f35b341561025d57600080fd5b61011f600160a060020a03600435811690602435166044356107e1565b604051901515815260200160405180910390f35b341561029957600080fd5b6102a1610829565b60405160ff909116815260200160405180910390f35b34156102c257600080fd5b610146610832565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101835780820151818401525b60200161016a565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034d57600080fd5b610240600160a060020a03600435166108d0565b60405190815260200160405180910390f35b341561037e57600080fd5b61011f6108ef565b604051901515815260200160405180910390f35b34156103a557600080fd5b6103ad610969565b604051600160a060020a03909116815260200160405180910390f35b34156103d457600080fd5b61011f610978565b604051901515815260200160405180910390f35b34156103fb57600080fd5b610146610986565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101835780820151818401525b60200161016a565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561048657600080fd5b61011f6004351515610a24565b604051901515815260200160405180910390f35b34156104b257600080fd5b61011f600160a060020a0360043516602435610abc565b604051901515815260200160405180910390f35b34156104e857600080fd5b610240600160a060020a0360043581169060243516610b02565b60405190815260200160405180910390f35b341561051f57600080fd5b610240610b2f565b60405190815260200160405180910390f35b341561054457600080fd5b61010a600160a060020a0360043516610b35565b005b60075462010000900460ff1681565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b600354600090819033600160a060020a0390811691161461069457600080fd5b60075462010000900460ff16156106aa57600080fd5b6000546106bd908563ffffffff610bce16565b6000908155600160a060020a0386168152600160205260409020546106e8908563ffffffff610bce16565b600160a060020a03861660009081526001602052604090205582156107495761072f670de0b6b3a7640000610723868663ffffffff610be816565b9063ffffffff610c1716565b600854909150610745908263ffffffff610bce16565b6008555b84600160a060020a03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f858560405191825260208201526040908101905180910390a284600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3600191505b5b5b509392505050565b60005481565b600754600090610100900460ff1680610808575060035433600160a060020a039081169116145b151561081357600080fd5b61081e848484610c33565b90505b5b9392505050565b60075460ff1681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b505050505081565b600160a060020a0381166000908152600160205260409020545b919050565b60035460009033600160a060020a0390811691161461090d57600080fd5b60075462010000900460ff161561092357600080fd5b6007805462ff00001916620100001790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a15060015b5b5b90565b600354600160a060020a031681565b600754610100900460ff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b505050505081565b60035460009033600160a060020a03908116911614610a4257600080fd5b60075460ff6101009091041615158215151415610a5e57600080fd5b6007805461ff001916610100841515810291909117918290557f6488c20eb299903c41aa1b53c3ad5a3140aca395935e57cc52c1cc8dae8d9e179160ff91900416604051901515815260200160405180910390a15060015b5b919050565b600754600090610100900460ff1680610ae3575060035433600160a060020a039081169116145b1515610aee57600080fd5b610af88383610db6565b90505b5b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60085481565b60035433600160a060020a03908116911614610b5057600080fd5b600160a060020a0381161515610b6557600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600082820183811015610bdd57fe5b8091505b5092915050565b6000828202831580610c045750828482811515610c0157fe5b04145b1515610bdd57fe5b8091505b5092915050565b6000808284811515610c2557fe5b0490508091505b5092915050565b6000600160a060020a0383161515610c4a57600080fd5b600160a060020a038416600090815260016020526040902054821115610c6f57600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610ca257600080fd5b600160a060020a038416600090815260016020526040902054610ccb908363ffffffff610eb216565b600160a060020a038086166000908152600160205260408082209390935590851681522054610d00908363ffffffff610bce16565b600160a060020a03808516600090815260016020908152604080832094909455878316825260028152838220339093168252919091522054610d48908363ffffffff610eb216565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b6000600160a060020a0383161515610dcd57600080fd5b600160a060020a033316600090815260016020526040902054821115610df257600080fd5b600160a060020a033316600090815260016020526040902054610e1b908363ffffffff610eb216565b600160a060020a033381166000908152600160205260408082209390935590851681522054610e50908363ffffffff610bce16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600082821115610ebe57fe5b508082035b929150505600a165627a7a7230582045df403f411af7c599cdc1fdcae7bc1cb3884e03d4dc9579b62de1b0e88a775f0029

Swarm Source

bzzr://45df403f411af7c599cdc1fdcae7bc1cb3884e03d4dc9579b62de1b0e88a775f

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.