Sponsored Link:   Etheal: CES Las Vegas 2nd place winner + working product with 2.5 million visits/year 30% bonus - First hour only: June 25
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 10734 txns
Token Contract: PolicyPal Network (PAL)
 Latest 25 txns from a total Of 10734 transactions
View All

TxHash Age From To Value [TxFee]
0x998c89177ffc9cdd20391f40c1f726078450a90beb9165452ef0388195783dbd8 mins ago0xf890953cffc8656233bf45efa9cfe8f14ad8080c  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.003244712
0x40c49321693132d7467f98a7503c4968daf888060eb358eed642233e0612ae0227 mins ago0xf890953cffc8656233bf45efa9cfe8f14ad8080c  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000377688
0x85ca293fa4914018e6954d7e950b48a84a910ff26cfe99ee9d42649833389a5f37 mins ago0xa07001d8d660d6e63bec0b5109295b897b64832e  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000959175
0x248a829bc7526a1cae6a17e40957ea467921edd11f23de7f1a58840b0c8ff0c81 hr 27 mins ago0x1e7f481ad51cb706f8dade68bb2e94cb651d4724  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00026532
0xb3929e3bd1c629ec2fd57f6445508b2149cfd5e17d4b6d111ba09998e8a7377a2 hrs 1 min ago0x2bc8397e4303d14fa32d91ce7673b39173df2c8d  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000038064
0x1e1cf2c57eb60293075fecf35c3c563fa3a16065752526c3427abdfc6147c0b02 hrs 32 mins ago0x8899af1aa48cdfdedbf394221ab5fb9b69f4ae7b  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.001220472
0xd8520d5ee6ef09c7906646afd8c90da9df5eb147fff5357ecb91389e7967e27c3 hrs 23 mins ago0x730d870d2ba75a5a21e3f3cf464d3d45a7853ca3  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.005259672
0x20cc9f6ff47d4faef0e8009517857dcc7ca213257f8df0dbe975e8042294b0d93 hrs 27 mins ago0x730d870d2ba75a5a21e3f3cf464d3d45a7853ca3  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.005259672
0x966585aac3c6194a9b4f1bbe6de5b6c1297a5a7bc5fb20a50f530894c5f2579a3 hrs 46 mins ago0x2a5349dbb1a94c5c10db11377e271ac5fe5b2ca1  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00046256
0x60c7819f5925aba2c3836de9bdb37d670163fa406958876f5f012588ba44d55d5 hrs 55 mins ago0x7fd44298916ebcb7ffd80bc2b44c918e5333ec3d  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000685125
0x3f507c61bbabbbfae20b37175f032df3e5b91a333edd7fafd0f1167ac0707c5f6 hrs 10 mins ago0x591b636cdada802f1fc382d8b26cfae43134562b  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00046512
0x5ac59cbfe46d8e2c8060a8c6ad0c7efdf17ecf0f74dd24a09c320a47b4baf1fa7 hrs 55 mins ago0x8bd857aa2b15a723f3855f8171c3d1e5f4ce8286  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000076256
0xda6d45b070994584b58f0d4441e3b44fd4dd10de92c60a3f7d84771e505761be8 hrs 6 mins ago0x82ff9e428ad69f54f4c0251d13607af7da8bd91e  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000212512
0x4f8de3a900e82ec264f43edc089c2411fab3ec27b7d425cc08f3af457b96224a8 hrs 19 mins ago0x75d95de70bc4ed276d1a88711f9133a201de32c2  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00012531928
0x86b9bbe66639b87c578d79802ff8406867391ceb21ea2fe5369690223bc706069 hrs 24 mins ago0xecfbf05c7483f5a39f5d828075ac68e43736aa8d  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000182188
0x16892f2b38fc9ec7e42951ee825cbe7ecaf0b678a2ab1021fd98e9be8a2b2c889 hrs 27 mins ago0x8b4a0d8bb92613e50a579a11c522bade9fcac05d  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00046256
0x29b13c91c389d1e08ea1dcc685f7583c50c13c77b836a1ab27934984ed680ca49 hrs 45 mins ago0xaba37531fa56cefcf401a364699b7ef52b04f6a3  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000228375
0x814ba70d57a5fd615ffeaa4e308cebc15629cfccc8ebf610fc8f25203dcafa4010 hrs 33 mins ago0x658c86905e776d805dc9742fb8bd08a6eafcceba  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000076128
0x60333081821cacbac95e44af120dbb19536d3d1b1dae8aa5309cebf76e08236011 hrs 41 mins ago0xe30149ae28762723db5afe075da13184253ec816  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.002175624
0x4efb9ab496a3d4bd0cf12f7b4aba922d35bc68e17f6a4b06c5aea0bee4c57ef211 hrs 47 mins ago0x852c6b14f77dfa3612d2abc321108a063a24de0d  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.0045803
0xef70db453f263d4c278229df3bd07081444e7d5cc01b8d950349ebd4b18471fb11 hrs 57 mins ago0xfc81a03f02856836cf179b2294c3e5ee3761f899  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000273666
0xf43cb3f049b4d9a895f0b47ec0136713754fd7ffc14f149406f3a5406f5130ee11 hrs 59 mins ago0xffb0cc3a2d800c59723b33f2064f83a33ba3639a  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.00027405
0xe91e0b2ea45528c921e2c42f5e62e603f5cb1eb9ef95e5850909faf83206364c12 hrs 2 mins ago0x46d08f05198054637c14eb8bde7e4d57bc41aa60  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000137409
0x8490254281e1c20e5505b6ba74b6830ba25773201267c7d6c2effaf5ceed566d12 hrs 3 mins ago0xefcf8f6f5f4e25b2ea1c556a6c99935b942f8167  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.0019064
0xa9dd46bcda1c34545e53ac486e61fcb2d3b3cc9448830e62bc0bb92d8ab6452812 hrs 20 mins ago0xbd966c9e1f64241d7ec91829a19942cbe8ae11c8  IN  0xfedae5642668f8636a11987ff386bfd215f942ee0 Ether0.000274818
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x5eef357471f1c67b7b78c219955f18918fc6334c0b20613ab8beca90d7798b845175099114 days 6 hrs ago0xd9e7d9a56ee6a4035ee8a9624c96eca1e4440671  Contract Creation0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: PolicyPalNetworkToken
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

// File: contracts/zeppelin/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure 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;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

// File: contracts/CrowdsaleAuthorizer.sol

/**
 * @title CrowdsaleAuthorizer
 * @dev Crowd Sale Authorizer
 */
contract CrowdsaleAuthorizer {
    mapping(address => uint256)    public participated;
    mapping(address => bool)       public whitelistAddresses;

    address                        public admin;
    uint256                        public saleStartTime;
    uint256                        public saleEndTime;
    uint256                        public increaseMaxContribTime;
    uint256                        public minContribution;
    uint256                        public maxContribution;

    using SafeMath for uint256;

    /**
    * @dev Modifier for only admin
    */
    modifier onlyAdmin() {
      require(msg.sender == admin);
      _;
    }

    /**
    * @dev Modifier for valid address
    */
    modifier validAddress(address _addr) {
      require(_addr != address(0x0));
      require(_addr != address(this));
      _;
    }

    /**
     * @dev Contract Constructor
     * @param _saleStartTime - The Start Time of the Token Sale
     * @param _saleEndTime - The End Time of the Token Sale
     * @param _increaseMaxContribTime - Time to increase Max Contribution of the Token Sale
     * @param _minContribution - Minimum ETH contribution per contributor
     * @param _maxContribution - Maximum ETH contribution per contributor
     */
    function CrowdsaleAuthorizer(
        address _admin,
        uint256 _saleStartTime,
        uint256 _saleEndTime,
        uint256 _increaseMaxContribTime,
        uint256 _minContribution,
        uint256 _maxContribution
    )
        validAddress(_admin)
        public
    {
        require(_saleStartTime > now);
        require(_saleEndTime > now);
        require(_increaseMaxContribTime > now);
        require(_saleStartTime < _saleEndTime);
        require(_increaseMaxContribTime > _saleStartTime);
        require(_maxContribution > 0);
        require(_minContribution < _maxContribution);

        admin = _admin;
        saleStartTime = _saleStartTime;
        saleEndTime = _saleEndTime;
        increaseMaxContribTime = _increaseMaxContribTime;

        minContribution = _minContribution;
        maxContribution = _maxContribution;
    }

    event UpdateWhitelist(address _user, bool _allow, uint _time);

    /**
     * @dev Update Whitelist Address
     * @param _user - Whitelist address
     * @param _allow - eligibility
     */
    function updateWhitelist(address _user, bool _allow)
        public
        onlyAdmin
    {
        whitelistAddresses[_user] = _allow;
        UpdateWhitelist(_user, _allow, now);
    }

    /**
     * @dev Batch Update Whitelist Address
     * @param _users - Array of Whitelist addresses
     * @param _allows - Array of eligibilities
     */
    function updateWhitelists(address[] _users, bool[] _allows)
        external
        onlyAdmin
    {
        require(_users.length == _allows.length);
        for (uint i = 0 ; i < _users.length ; i++) {
            address _user = _users[i];
            bool _allow = _allows[i];
            whitelistAddresses[_user] = _allow;
            UpdateWhitelist(_user, _allow, now);
        }
    }

    /**
     * @dev Get Eligible Amount
     * @param _contributor - Contributor address
     * @param _amount - Intended contribution amount
     */
    function eligibleAmount(address _contributor, uint256 _amount)
        public
        view
        returns(uint256)
    {
        // If sales has not started or sale ended, there's no allocation
        if (!saleStarted() || saleEnded()) {
            return 0;
        }

        // Amount lesser than minimum contribution will be rejected
        if (_amount < minContribution) {
            return 0;
        }

        uint256 userMaxContribution = maxContribution;
        // If sale has past 24hrs, increase max cap
        if (now >= increaseMaxContribTime) {
            userMaxContribution = maxContribution.mul(10);
        }

        // Calculate remaining contribution for the contributor
        uint256 remainingCap = userMaxContribution.sub(participated[_contributor]);

        // Return either the amount contributed or cap whichever is lower
        return (remainingCap > _amount) ? _amount : remainingCap;
    }

    /**
     * @dev Get if sale has started
     */
    function saleStarted() public view returns(bool) {
        return now >= saleStartTime;
    }

    /**
     * @dev Get if sale has ended
     */
    function saleEnded() public view returns(bool) {
        return now > saleEndTime;
    }

    /**
     * @dev Check for eligible amount and modify participation map
     * @param _contributor - Contributor address
     * @param _amount - Intended contribution amount
     */
    function eligibleAmountCheck(address _contributor, uint256 _amount)
        internal
        returns(uint256)
    {
        // Check if contributor is whitelisted
        if (!whitelistAddresses[_contributor]) {
            return 0;
        }

        uint256 result = eligibleAmount(_contributor, _amount);
        participated[_contributor] = participated[_contributor].add(result);

        return result;
    }
}

// File: contracts/zeppelin/ownership/Ownable.sol

/**
 * @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 {
  address public owner;


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


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

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

  /**
   * @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) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: contracts/zeppelin/token/ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: contracts/zeppelin/token/BasicToken.sol

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  uint256 totalSupply_;

  /**
  * @dev total number of tokens in existence
  */
  function totalSupply() public view returns (uint256) {
    return totalSupply_;
  }

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != 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);
    Transfer(msg.sender, _to, _value);
    return true;
  }

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

}

// File: contracts/zeppelin/token/BurnableToken.sol

/**
 * @title Burnable Token
 * @dev Token that can be irreversibly burned (destroyed).
 */
contract BurnableToken is BasicToken {

  event Burn(address indexed burner, uint256 value);

  /**
   * @dev Burns a specific amount of tokens.
   * @param _value The amount of token to be burned.
   */
  function burn(uint256 _value) public {
    require(_value <= balances[msg.sender]);
    // no need to require value <= totalSupply, since that would imply the
    // sender's balance is greater than the totalSupply, which *should* be an assertion failure

    address burner = msg.sender;
    balances[burner] = balances[burner].sub(_value);
    totalSupply_ = totalSupply_.sub(_value);
    Burn(burner, _value);
  }
}

// File: contracts/zeppelin/token/ERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/zeppelin/token/StandardToken.sol

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal allowed;


  /**
   * @dev Transfer tokens from one address to another
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint256 the amount of tokens to be transferred
   */
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    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);
    Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Approve the passed 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 the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

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

  /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   *
   * approve should be called when allowed[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _addedValue The amount of tokens to increase the allowance by.
   */
  function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   *
   * approve should be called when allowed[_spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

// File: contracts/PolicyPalNetworkToken.sol

/**
 * @title PolicyPalNetwork Token
 * @dev A standard ownable token
 */
contract PolicyPalNetworkToken is StandardToken, BurnableToken, Ownable {
    /**
    * @dev Token Contract Constants
    */
    string    public constant name     = "PolicyPal Network Token";
    string    public constant symbol   = "PAL";
    uint8     public constant decimals = 18;

    /**
    * @dev Token Contract Public Variables
    */
    address public  tokenSaleContract;
    bool    public  isTokenTransferable = false;


    /**
    * @dev   Token Contract Modifier
    *
    * Check if a transfer is allowed
    * Transfers are restricted to token creator & owner(admin) during token sale duration
    * Transfers after token sale is limited by `isTokenTransferable` toggle
    *
    */
    modifier onlyWhenTransferAllowed() {
        require(isTokenTransferable || msg.sender == owner || msg.sender == tokenSaleContract);
        _;
    }

    /**
     * @dev Token Contract Modifier
     * @param _to - Address to check if valid
     *
     *  Check if an address is valid
     *  A valid address is as follows,
     *    1. Not zero address
     *    2. Not token address
     *
     */
    modifier isValidDestination(address _to) {
        require(_to != address(0x0));
        require(_to != address(this));
        _;
    }

    /**
     * @dev Enable Transfers (Only Owner)
     */
    function toggleTransferable(bool _toggle) external
        onlyOwner
    {
        isTokenTransferable = _toggle;
    }
    

    /**
    * @dev Token Contract Constructor
    * @param _adminAddr - Address of the Admin
    */
    function PolicyPalNetworkToken(
        uint _tokenTotalAmount,
        address _adminAddr
    ) 
        public
        isValidDestination(_adminAddr)
    {
        require(_tokenTotalAmount > 0);

        totalSupply_ = _tokenTotalAmount;

        // Mint all token
        balances[msg.sender] = _tokenTotalAmount;
        Transfer(address(0x0), msg.sender, _tokenTotalAmount);

        // Assign token sale contract to creator
        tokenSaleContract = msg.sender;

        // Transfer contract ownership to admin
        transferOwnership(_adminAddr);
    }

    /**
    * @dev Token Contract transfer
    * @param _to - Address to transfer to
    * @param _value - Value to transfer
    * @return bool - Result of transfer
    * "Overloaded" Function of ERC20Basic's transfer
    *
    */
    function transfer(address _to, uint256 _value) public
        onlyWhenTransferAllowed
        isValidDestination(_to)
        returns (bool)
    {
        return super.transfer(_to, _value);
    }

    /**
    * @dev Token Contract transferFrom
    * @param _from - Address to transfer from
    * @param _to - Address to transfer to
    * @param _value - Value to transfer
    * @return bool - Result of transferFrom
    *
    * "Overloaded" Function of ERC20's transferFrom
    * Added with modifiers,
    *    1. onlyWhenTransferAllowed
    *    2. isValidDestination
    *
    */
    function transferFrom(address _from, address _to, uint256 _value) public
        onlyWhenTransferAllowed
        isValidDestination(_to)
        returns (bool)
    {
        return super.transferFrom(_from, _to, _value);
    }

    /**
    * @dev Token Contract burn
    * @param _value - Value to burn
    * "Overloaded" Function of BurnableToken's burn
    */
    function burn(uint256 _value)
        public
    {
        super.burn(_value);
        Transfer(msg.sender, address(0x0), _value);
    }

    /**
    * @dev Token Contract Emergency Drain
    * @param _token - Token to drain
    * @param _amount - Amount to drain
    */
    function emergencyERC20Drain(ERC20 _token, uint256 _amount) public
        onlyOwner
    {
        _token.transfer(owner, _amount);
    }
}

// File: contracts/PolicyPalNetworkCrowdsale.sol

/**
 * @title PPN Crowdsale
 * @dev Crowd Sale Contract
 */
contract PolicyPalNetworkCrowdsale is CrowdsaleAuthorizer {
    /**
    * @dev Token Crowd Sale Contract Public Variables
    */
    address                 public multiSigWallet;
    PolicyPalNetworkToken   public token;
    uint256                 public raisedWei;
    bool                    public haltSale;
    uint                    public rate;

    /**
    * @dev Modifier for valid sale
    */
    modifier validSale() {
      require(!haltSale);
      require(saleStarted());
      require(!saleEnded());
      _;
    }

    /**
     * @dev Buy Event
     */
    event Buy(address _buyer, uint256 _tokens, uint256 _payedWei);

    /**
     * @dev Token Crowd Sale Contract Constructor
     * @param _admin - Address of the Admin
     * @param _multiSigWallet - Address of Multisig wallet
     * @param _totalTokenSupply - Total Token Supply
     * @param _premintedTokenSupply - Total preminted token supply
     * @param _saleStartTime - The Start Time of the Token Sale
     * @param _saleEndTime - The End Time of the Token Sale
     * @param _increaseMaxContribTime - Time to increase max contribution
     * @param _rate - Rate of ETH to PAL
     * @param _minContribution - Minimum ETH contribution per contributor
     * @param _maxContribution - Maximum ETH contribution per contributor
     */
    function PolicyPalNetworkCrowdsale(
        address _admin,
        address _multiSigWallet,
        uint256 _totalTokenSupply,
        uint256 _premintedTokenSupply,
        uint256 _presaleTokenSupply,
        uint256 _saleStartTime,
        uint256 _saleEndTime,
        uint256 _increaseMaxContribTime,
        uint    _rate,
        uint256 _minContribution,
        uint256 _maxContribution
    )
    CrowdsaleAuthorizer(
        _admin,
        _saleStartTime,
        _saleEndTime,
        _increaseMaxContribTime,
        _minContribution,
        _maxContribution
    )
        validAddress(_multiSigWallet)
        public
    {
        require(_totalTokenSupply > 0);
        require(_premintedTokenSupply > 0);
        require(_presaleTokenSupply > 0);
        require(_rate > 0);
        
        require(_premintedTokenSupply < _totalTokenSupply);
        require(_presaleTokenSupply < _totalTokenSupply);

        multiSigWallet = _multiSigWallet;
        rate = _rate;

        token = new PolicyPalNetworkToken(
            _totalTokenSupply,
            _admin
        );

        // transfer preminted tokens to company wallet
        token.transfer(multiSigWallet, _premintedTokenSupply);
        // transfer presale tokens to admin
        token.transfer(_admin, _presaleTokenSupply);
    }

    /**
     * @dev Token Crowd Sale Contract Halter
     * @param _halt - Flag to halt sale
     */
    function setHaltSale(bool _halt)
        onlyAdmin
        public
    {
        haltSale = _halt;
    }

    /**
     * @dev Token Crowd Sale payable
     */
    function() public payable {
        buy(msg.sender);
    }

    /**
     * @dev Token Crowd Sale Buy
     * @param _recipient - Address of the recipient
     */
    function buy(address _recipient) public payable
        validSale
        validAddress(_recipient)
        returns(uint256)
    {
        // Get the contributor's eligible amount
        uint256 weiContributionAllowed = eligibleAmountCheck(_recipient, msg.value);
        require(weiContributionAllowed > 0);

        // Get tokens remaining for sale
        uint256 tokensRemaining = token.balanceOf(address(this));
        require(tokensRemaining > 0);

        // Get tokens that the contributor will receive
        uint256 receivedTokens = weiContributionAllowed.mul(rate);

        // Check remaining tokens
        // If lesser, update tokens to be transfer and contribution allowed
        if (receivedTokens > tokensRemaining) {
            receivedTokens = tokensRemaining;
            weiContributionAllowed = tokensRemaining.div(rate);
        }

        // Transfer tokens to contributor
        assert(token.transfer(_recipient, receivedTokens));

        // Send ETH payment to MultiSig Wallet
        sendETHToMultiSig(weiContributionAllowed);
        raisedWei = raisedWei.add(weiContributionAllowed);

        // Check weiContributionAllowed is larger than value sent
        // If larger, transfer the excess back to the contributor
        if (msg.value > weiContributionAllowed) {
            msg.sender.transfer(msg.value.sub(weiContributionAllowed));
        }

        // Broadcast event
        Buy(_recipient, receivedTokens, weiContributionAllowed);

        return weiContributionAllowed;
    }

    /**
     * @dev Token Crowd Sale Emergency Drain
     *      In case something went wrong and ETH is stuck in contract
     * @param _anyToken - Token to drain
     */
    function emergencyDrain(ERC20 _anyToken) public
        onlyAdmin
        returns(bool)
    {
        if (this.balance > 0) {
            sendETHToMultiSig(this.balance);
        }
        if (_anyToken != address(0x0)) {
            assert(_anyToken.transfer(multiSigWallet, _anyToken.balanceOf(this)));
        }
        return true;
    }

    /**
     * @dev Token Crowd Sale
     *      Transfer ETH to MultiSig Wallet
     * @param _value - Value of ETH to send
     */
    function sendETHToMultiSig(uint256 _value) internal {
        multiSigWallet.transfer(_value);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenSaleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isTokenTransferable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_toggle","type":"bool"}],"name":"toggleTransferable","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"emergencyERC20Drain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_tokenTotalAmount","type":"uint256"},{"name":"_adminAddr","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","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"},{"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"}]

  Contract Creation Code Switch To Opcodes View
60606040526004805460a060020a60ff0219169055341561001f57600080fd5b604051604080610f29833981016040528080519190602001805160038054600160a060020a03191633600160a060020a03908116919091179091559092508291508116151561006d57600080fd5b30600160a060020a031681600160a060020a03161415151561008e57600080fd5b6000831161009b57600080fd5b6001839055600160a060020a0333166000818152602081905260408082208690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a360048054600160a060020a03191633600160a060020a03161790556101208264010000000061012881026109291704565b5050506101b6565b60035433600160a060020a0390811691161461014357600080fd5b600160a060020a038116151561015857600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360038054600160a060020a031916600160a060020a0392909216919091179055565b610d64806101c56000396000f3006060604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c057806323b872dd146101e5578063313ce5671461020d57806342966c68146102365780635d5aa2771461024e578063661884631461027d57806370a082311461029f5780638da5cb5b146102be578063958222aa146102d157806395d89b41146102e4578063a9059cbb146102f7578063d73dd62314610319578063d9194d2c1461033b578063db0e16f114610353578063dd62ed3e14610375578063f2fde38b1461039a575b600080fd5b341561010b57600080fd5b6101136103b9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014f578082015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019557600080fd5b6101ac600160a060020a03600435166024356103f0565b604051901515815260200160405180910390f35b34156101cb57600080fd5b6101d361045c565b60405190815260200160405180910390f35b34156101f057600080fd5b6101ac600160a060020a0360043581169060243516604435610462565b341561021857600080fd5b6102206104fa565b60405160ff909116815260200160405180910390f35b341561024157600080fd5b61024c6004356104ff565b005b341561025957600080fd5b61026161054a565b604051600160a060020a03909116815260200160405180910390f35b341561028857600080fd5b6101ac600160a060020a0360043516602435610559565b34156102aa57600080fd5b6101d3600160a060020a0360043516610653565b34156102c957600080fd5b61026161066e565b34156102dc57600080fd5b6101ac61067d565b34156102ef57600080fd5b61011361068d565b341561030257600080fd5b6101ac600160a060020a03600435166024356106c4565b341561032457600080fd5b6101ac600160a060020a036004351660243561075a565b341561034657600080fd5b61024c60043515156107fe565b341561035e57600080fd5b61024c600160a060020a0360043516602435610848565b341561038057600080fd5b6101d3600160a060020a03600435811690602435166108fe565b34156103a557600080fd5b61024c600160a060020a0360043516610929565b60408051908101604052601781527f506f6c69637950616c204e6574776f726b20546f6b656e000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b60045460009060a060020a900460ff168061048b575060035433600160a060020a039081169116145b806104a4575060045433600160a060020a039081169116145b15156104af57600080fd5b82600160a060020a03811615156104c557600080fd5b30600160a060020a031681600160a060020a0316141515156104e657600080fd5b6104f18585856109c4565b95945050505050565b601281565b61050881610b44565b600033600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a350565b600454600160a060020a031681565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156105b657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556105ed565b6105c6818463ffffffff610bfe16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b60045460a060020a900460ff1681565b60408051908101604052600381527f50414c0000000000000000000000000000000000000000000000000000000000602082015281565b60045460009060a060020a900460ff16806106ed575060035433600160a060020a039081169116145b80610706575060045433600160a060020a039081169116145b151561071157600080fd5b82600160a060020a038116151561072757600080fd5b30600160a060020a031681600160a060020a03161415151561074857600080fd5b6107528484610c10565b949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610792908363ffffffff610d2216565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b60035433600160a060020a0390811691161461081957600080fd5b6004805491151560a060020a0274ff000000000000000000000000000000000000000019909216919091179055565b60035433600160a060020a0390811691161461086357600080fd5b600354600160a060020a038084169163a9059cbb9116836000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156108df57600080fd5b6102c65a03f115156108f057600080fd5b505050604051805150505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a0390811691161461094457600080fd5b600160a060020a038116151561095957600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156109db57600080fd5b600160a060020a038416600090815260208190526040902054821115610a0057600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610a3357600080fd5b600160a060020a038416600090815260208190526040902054610a5c908363ffffffff610bfe16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610a91908363ffffffff610d2216565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610ad7908363ffffffff610bfe16565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a033316600090815260208190526040812054821115610b6957600080fd5b5033600160a060020a038116600090815260208190526040902054610b8e9083610bfe565b600160a060020a038216600090815260208190526040902055600154610bba908363ffffffff610bfe16565b600155600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b600082821115610c0a57fe5b50900390565b6000600160a060020a0383161515610c2757600080fd5b600160a060020a033316600090815260208190526040902054821115610c4c57600080fd5b600160a060020a033316600090815260208190526040902054610c75908363ffffffff610bfe16565b600160a060020a033381166000908152602081905260408082209390935590851681522054610caa908363ffffffff610d2216565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600082820183811015610d3157fe5b93925050505600a165627a7a72305820daab06a27c07f3b95c6372d46ccef2a67d1e9d5b870c188a6d226db9cb5d1b6800290000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000095343e65c188952ad41a56869b7cb6d89df8dd25

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000095343e65c188952ad41a56869b7cb6d89df8dd25

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000
Arg [1] : 00000000000000000000000095343e65c188952ad41a56869b7cb6d89df8dd25


   Swarm Source:
bzzr://daab06a27c07f3b95c6372d46ccef2a67d1e9d5b870c188a6d226db9cb5d1b68

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.