Contract 0x96a4ed03206667017777f010dea4445823acb0fc

 

TxHash Block Age From To Value [TxFee]
0xfd93cb3a87695c86d5efa891852d2e1edf7ee737703e16a842c2a4c148f9666a72447561 day 16 hrs ago0x5ba23b1d3525792de72a449a944bdfcf3e76fd6c IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.00056398
0x8f266d2dd4831842ae2016a2207f67a6f4ebf1754276f0aaeb1440103bbe74ff72447561 day 16 hrs ago0x5ba23b1d3525792de72a449a944bdfcf3e76fd6c IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.001295935
0x45230b616d310905d85ea23c9ac8a690108a9f5a93a7a64244fd6be39c23747972361603 days 17 hrs ago0x29a4164ba775e0ac449267a3baaaf4cf81457777 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.0016003216
0xa81dfa1dc4672056564d75896306d36a4826e71dc2135e62761a39b88c32421072361573 days 17 hrs ago0x29a4164ba775e0ac449267a3baaaf4cf81457777 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.001890465139
0xa15c0808c1dc37294db95ff6644ef47e9a405ae884f716c08c6c64454875489a72361533 days 17 hrs ago0x29a4164ba775e0ac449267a3baaaf4cf81457777 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.002138535388
0xc20de2ed87f9668d0b71992055996038c2e7017aac4d15574d5f7cc5f024fcab72350413 days 23 hrs ago0x54fb0f19a148054c4c0987e00285af96b21e259b IN  0x96a4ed03206667017777f010dea4445823acb0fc0.03 Ether0.001308209
0xe4c0e3ba5897417524fb1630f2c8ba39fb46574239b3c59ae0ed486f61a402be72350333 days 23 hrs ago0x54fb0f19a148054c4c0987e00285af96b21e259b IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.00089285
0x1ad8dbf3c0fbde891cefa6fec68274aaa54efb225c1efec067de26aa4241d92072338134 days 6 hrs ago0xb74d5f0a81ce99ac1857133e489bc2b4954935ff IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.00127712
0x38caa906d3662ee57ca159b582c08bb863150e97210b010636b7664159935ab472288275 days 10 hrs ago0xd78f9ab0f7738bf562d22f08eb00c77727197a00 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.001297154
0x4a8cccda175496144cae0c32ae0926d1158088a273420f9c19ad3f13523a0b3072288275 days 10 hrs ago0xd78f9ab0f7738bf562d22f08eb00c77727197a00 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.001000201
0xc552dbe3d81366882eba4ef22b73b3c0a02d6299e7088a9d55ee257c5ca0c83e720920710 days 3 hrs ago0x66cd14660c80eb2c891799ea6b561cc57adb582c IN  0x96a4ed03206667017777f010dea4445823acb0fc0.002 Ether0.0002310341
0x3e467f19ef12a739830f2b97ff38e7b8e93995e0bad2bd83956da720faa2c949720663710 days 18 hrs ago0x1909673e85ac12c4c8c85f8dc501acbcbf065135 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000101974
0x0ddf7d0bfa23990afa08594b3397e92e862e81821d87374e39a106b2887677ce720554711 days 24 mins ago0xb734ec7a75d65406fde5bcf9156cab673ba1e1c5 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.0005102
0x0d27167b9301900784fabaeb6e33d0be781bf69528471f94163e439076459252720451511 days 6 hrs ago0x0b7129d6ec72473e35be0a9e2a7ae2cce6fbf157 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000173948
0x5281bf33287526e975d2ce1f7fb05ebc13e0fd7952496b36e1ebc781a7250a02720104012 days 1 hr ago0x493195a123522db05bba244e19e78cc9a72cdf03 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.00038265
0x9b2f79cf29abc9646f090588f77db8e6901d41191847cb1965d5bfd510540497720103112 days 1 hr ago0x493195a123522db05bba244e19e78cc9a72cdf03 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000207724
0xd483e269fb0fbb95c673cef9ed586cb6417fca74d79fc18bdbcbd3303ec5f116720101912 days 1 hr ago0x493195a123522db05bba244e19e78cc9a72cdf03 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.00076991
0x2349fb0c764a7ff2e3182ba5b0c98d45e7f7f3a532745633254a547583ce11ab719570813 days 4 hrs ago0xa73c4b29bba56e6da3b3eae2e59d840f1a2bf3ef IN  0x96a4ed03206667017777f010dea4445823acb0fc0.8 Ether0.000905792
0x90450bac5349769bbdea70e603db834c76f6b6af581c73d2b93a22fcd947bac7719568013 days 4 hrs ago0x66cd14660c80eb2c891799ea6b561cc57adb582c IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.0001260888
0x71af100f03dedff55ff7eb8f31247b5c80b934fd0f270e4f5c307949ba835eeb719565713 days 4 hrs ago0x66cd14660c80eb2c891799ea6b561cc57adb582c IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.0001245576
0x3a840661b8dcf4d7d84c86c0807b6cc86d0a4f1c4e7ac4d613a493d3070810ff719525213 days 6 hrs ago0x7253ba8c85efc0681a021e884ee08b9ff953bbe2 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000260922
0xcc46d82bfcb4f399d7a117d0072203d6b706180637fdd7753128819b929636e7719279613 days 18 hrs ago0x0b7129d6ec72473e35be0a9e2a7ae2cce6fbf157 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000167768
0x7d74507da475f559438b1ac35c28c4e6b9481e498ff5ebe2e72c12431a59df9a719279313 days 18 hrs ago0x0b7129d6ec72473e35be0a9e2a7ae2cce6fbf157 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000420296
0x430739e2b2ed80056ab137715073aa1cd480fe73c9c3ada9dcc8ed36ce32f28f719277613 days 18 hrs ago0x0b7129d6ec72473e35be0a9e2a7ae2cce6fbf157 IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.000415448
0x795df41481c8b9c3f35c21f2b50ec66707ac9bf06a752b0fadde720e16a751a3714393723 days 17 hrs ago0xc454c4be786e8ad7610d6113c06e4a608af303cb IN  0x96a4ed03206667017777f010dea4445823acb0fc0 Ether0.001036748
[ Download CSV Export 

Latest 25 Internal Transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x8f266d2dd4831842ae2016a2207f67a6f4ebf1754276f0aaeb1440103bbe74ff72447561 day 16 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000001358665731656 Ether
0x8f266d2dd4831842ae2016a2207f67a6f4ebf1754276f0aaeb1440103bbe74ff72447561 day 16 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.007479618878839367 Ether
0x8f266d2dd4831842ae2016a2207f67a6f4ebf1754276f0aaeb1440103bbe74ff72447561 day 16 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.256092241999873265 Ether
0x45230b616d310905d85ea23c9ac8a690108a9f5a93a7a64244fd6be39c23747972361603 days 17 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0x29a4164ba775e0ac449267a3baaaf4cf814577770.005244001782275869 Ether
0x45230b616d310905d85ea23c9ac8a690108a9f5a93a7a64244fd6be39c23747972361603 days 17 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000153800581870052 Ether
0xa15c0808c1dc37294db95ff6644ef47e9a405ae884f716c08c6c64454875489a72361533 days 17 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.004152865545302275 Ether
0xc20de2ed87f9668d0b71992055996038c2e7017aac4d15574d5f7cc5f024fcab72350413 days 23 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000005474292464859 Ether
0xc20de2ed87f9668d0b71992055996038c2e7017aac4d15574d5f7cc5f024fcab72350413 days 23 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.03 Ether
0xe4c0e3ba5897417524fb1630f2c8ba39fb46574239b3c59ae0ed486f61a402be72350333 days 23 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.005799580829167416 Ether
0x1ad8dbf3c0fbde891cefa6fec68274aaa54efb225c1efec067de26aa4241d92072338134 days 6 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0xb74d5f0a81ce99ac1857133e489bc2b4954935ff0.000000376863419124 Ether
0x1ad8dbf3c0fbde891cefa6fec68274aaa54efb225c1efec067de26aa4241d92072338134 days 6 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000000007140925634 Ether
0x1ad8dbf3c0fbde891cefa6fec68274aaa54efb225c1efec067de26aa4241d92072338134 days 6 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.0045126854312442 Ether
0x4a8cccda175496144cae0c32ae0926d1158088a273420f9c19ad3f13523a0b3072288275 days 10 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0xd78f9ab0f7738bf562d22f08eb00c77727197a000.059983402234771458 Ether
0x4a8cccda175496144cae0c32ae0926d1158088a273420f9c19ad3f13523a0b3072288275 days 10 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.065914054709370734 Ether
0xc552dbe3d81366882eba4ef22b73b3c0a02d6299e7088a9d55ee257c5ca0c83e720920710 days 3 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.025345820134588102 Ether
0xc552dbe3d81366882eba4ef22b73b3c0a02d6299e7088a9d55ee257c5ca0c83e720920710 days 3 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.002 Ether
0x3e467f19ef12a739830f2b97ff38e7b8e93995e0bad2bd83956da720faa2c949720663710 days 18 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0x1909673e85ac12c4c8c85f8dc501acbcbf0651350.01079008137867957 Ether
0x3e467f19ef12a739830f2b97ff38e7b8e93995e0bad2bd83956da720faa2c949720663710 days 18 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.002602282083638138 Ether
0x0ddf7d0bfa23990afa08594b3397e92e862e81821d87374e39a106b2887677ce720554711 days 24 mins ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.002653955324776152 Ether
0x0d27167b9301900784fabaeb6e33d0be781bf69528471f94163e439076459252720451511 days 6 hrs ago0x96a4ed03206667017777f010dea4445823acb0fc0x0b7129d6ec72473e35be0a9e2a7ae2cce6fbf1570.008025039671525406 Ether
0x0d27167b9301900784fabaeb6e33d0be781bf69528471f94163e439076459252720451511 days 6 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.038539630712269775 Ether
0x5281bf33287526e975d2ce1f7fb05ebc13e0fd7952496b36e1ebc781a7250a02720104012 days 1 hr ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000374395323195145 Ether
0x9b2f79cf29abc9646f090588f77db8e6901d41191847cb1965d5bfd510540497720103112 days 1 hr ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.018387942773111403 Ether
0xd483e269fb0fbb95c673cef9ed586cb6417fca74d79fc18bdbcbd3303ec5f116720101912 days 1 hr ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.018387942773111403 Ether
0x2349fb0c764a7ff2e3182ba5b0c98d45e7f7f3a532745633254a547583ce11ab719570813 days 4 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0x96a4ed03206667017777f010dea4445823acb0fc0.000150463180902609 Ether
[ Download CSV Export 
Contract Source Code Verified (Exact Match)
Contract Name: P4D
Compiler Version: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity 0.4.25;

/*===========================================================================================*
*************************************** https://p4d.io ***************************************
*============================================================================================*
*   
*                            ,-.----.           ,--,              
*                            \    /  \        ,--.'|    ,---,     
*                            |   :    \    ,--,  | :  .'  .' `\   
*                            |   |  .\ :,---.'|  : ',---.'     \  
*                            .   :  |: |;   : |  | ;|   |  .`\  | 
*                            |   |   \ :|   | : _' |:   : |  '  | 
*                            |   : .   /:   : |.'  ||   ' '  ;  : 
*                            ;   | |`-' |   ' '  ; :'   | ;  .  | 
*                            |   | ;    \   \  .'. ||   | :  |  ' 
*                            :   ' |     `---`:  | ''   : | /  ;  
*                            :   : :          '  ; ||   | '` ,/   
*                            |   | :          |  : ;;   :  .'     
*                            `---'.|          '  ,/ |   ,.'       
*                              `---`          '--'  '---'         
*                _____ _            _   _              __  __ _      _       _     
*               |_   _| |          | | | |            / _|/ _(_)    (_)     | |    
*                 | | | |__   ___  | | | |_ __   ___ | |_| |_ _  ___ _  __ _| |    
*                 | | | '_ \ / _ \ | | | | '_ \ / _ \|  _|  _| |/ __| |/ _` | |    
*                 | | | | | |  __/ | |_| | | | | (_) | | | | | | (__| | (_| | |    
*                 \_/ |_| |_|\___|  \___/|_| |_|\___/|_| |_| |_|\___|_|\__,_|_|    
*                                                                                  
*               ______ ___________   _____                           _             
*               | ___ \____ |  _  \ |  ___|                         (_)            
*               | |_/ /   / / | | | | |____  ___ __   __ _ _ __  ___ _  ___  _ __  
*               |  __/    \ \ | | | |  __\ \/ / '_ \ / _` | '_ \/ __| |/ _ \| '_ \ 
*               | |   .___/ / |/ /  | |___>  <| |_) | (_| | | | \__ \ | (_) | | | |
*               \_|   \____/|___/   \____/_/\_\ .__/ \__,_|_| |_|___/_|\___/|_| |_|
*                                             | |                                  
*                                             |_| 
*                                                       _L/L
*                                                     _LT/l_L_
*                                                   _LLl/L_T_lL_
*                               _T/L              _LT|L/_|__L_|_L_
*                             _Ll/l_L_          _TL|_T/_L_|__T__|_l_
*                           _TLl/T_l|_L_      _LL|_Tl/_|__l___L__L_|L_
*                         _LT_L/L_|_L_l_L_  _'|_|_|T/_L_l__T _ l__|__|L_
*                       _Tl_L|/_|__|_|__T _LlT_|_Ll/_l_ _|__[ ]__|__|_l_L_
*                ..__ _LT_l_l/|__|__l_T _T_L|_|_|l/___|__ | _l__|_ |__|_T_L_  __
*                   _       ___            _                  _       ___       
*                  /_\     / __\___  _ __ | |_ _ __ __ _  ___| |_    / __\_   _ 
*                 //_\\   / /  / _ \| '_ \| __| '__/ _` |/ __| __|  /__\// | | |
*                /  _  \ / /__| (_) | | | | |_| | | (_| | (__| |_  / \/  \ |_| |
*                \_/ \_/ \____/\___/|_| |_|\__|_|  \__,_|\___|\__| \_____/\__, |
*                                   ╔═╗╔═╗╦      ╔╦╗╔═╗╦  ╦               |___/ 
*                                   ╚═╗║ ║║       ║║║╣ ╚╗╔╝
*                                   ╚═╝╚═╝╩═╝────═╩╝╚═╝ ╚╝ 
*                                      0x736f6c5f646576
*                                      ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
* 
* -> What?
* The original autonomous pyramid, improved (again!):
*  [x] Developer optimized to include utility functions:
*      -> approve(): allow others to transfer on your behalf
*      -> approveAndCall(): callback for contracts that want to use approve()
*      -> transferFrom(): use your approval allowance to transfer P4D on anothers behalf
*      -> transferAndCall(): callback for contracts that want to use transfer()
*  [x] Designed to be a bridge for P3D to make the token functional for use in external contracts
*  [x] Masternodes are also used in P4D as well as when it buys P3D:
*      -> If the referrer has more than 10,000 P4D tokens, they will get 1/3 of the 10% divs
*      -> If the referrer also has more than 100 P3D tokens, they will be used as the ref
*         on the buy order to P3D and receive 1/3 of the 10% P3D divs upon purchase
*  [x] As this contract holds P3D, it will receive ETH dividends proportional to it's
*      holdings, this ETH is then distributed to all P4D token holders proportionally
*  [x] On top of the ETH divs from P3D, you will also receive P3D divs from buys and sells
*      in the P4D exchange
*  [x] There's a 10% div tax for buys, a 5% div tax on sells and a 0% tax on transfers
*  [x] No auto-transfers for dividends or subdividends, they will all be stored until
*      either withdraw() or reinvest() are called, this makes it easier for external
*      contracts to calculate how much they received upon a withdraw/reinvest
*  [x] Partial withdraws and reinvests for both dividends and subdividends
*  [x] Global name registry for all external contracts to use:
*      -> Names cost 0.01 ETH to register
*      -> Names must be unique and not already owned
*      -> You can set an active name out of all the ones you own
*      -> You can change your name at any time but still be referred by an old name
*      -> All ETH from registrations will be distributed to all P4D holders proportionally
*
*/


// P3D interface
interface P3D {
    function buy(address) external payable returns(uint256);
    function transfer(address, uint256) external returns(bool);
    function myTokens() external view returns(uint256);
    function balanceOf(address) external view returns(uint256);
    function myDividends(bool) external view returns(uint256);
    function withdraw() external;
    function calculateTokensReceived(uint256) external view returns(uint256);
    function stakingRequirement() external view returns(uint256);
}

// ERC-677 style token transfer callback
interface usingP4D {
    function tokenCallback(address _from, uint256 _value, bytes _data) external returns (bool);
}

// ERC-20 style approval callback
interface controllingP4D {
    function approvalCallback(address _from, uint256 _value, bytes _data) external returns (bool);
}

contract P4D {

    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }

    // administrators can:
    // -> change the name of the contract
    // -> change the name of the token
    // -> change the PoS difficulty (how many tokens it costs to hold a masternode, in case it gets crazy high later)
    // -> allow a contract to accept P4D tokens
    // they CANNOT:
    // -> take funds
    // -> disable withdrawals
    // -> kill the contract
    // -> change the price of tokens
    modifier onlyAdministrator() {
        require(administrators[msg.sender] || msg.sender == _dev);
        _;
    }

    // ensures that the first tokens in the contract will be equally distributed
    // meaning, no divine dump will be ever possible
    // result: healthy longevity.
    modifier purchaseFilter(address _sender, uint256 _amountETH) {

        require(!isContract(_sender) || canAcceptTokens_[_sender]);
        
        if (now >= ACTIVATION_TIME) {
            onlyAmbassadors = false;
        }

        // are we still in the vulnerable phase?
        // if so, enact anti early whale protocol
        if (onlyAmbassadors && ((totalAmbassadorQuotaSpent_ + _amountETH) <= ambassadorQuota_)) {
            require(
                // is the customer in the ambassador list?
                ambassadors_[_sender] == true &&

                // does the customer purchase exceed the max ambassador quota?
                (ambassadorAccumulatedQuota_[_sender] + _amountETH) <= ambassadorMaxPurchase_
            );

            // updated the accumulated quota
            ambassadorAccumulatedQuota_[_sender] = SafeMath.add(ambassadorAccumulatedQuota_[_sender], _amountETH);
            totalAmbassadorQuotaSpent_ = SafeMath.add(totalAmbassadorQuotaSpent_, _amountETH);

            // execute
            _;
        } else {
            require(!onlyAmbassadors);
            _;
        }

    }

    /*==============================
    =            EVENTS            =
    ==============================*/
    event onTokenPurchase(
        address indexed _customerAddress,
        uint256 _incomingP3D,
        uint256 _tokensMinted,
        address indexed _referredBy
    );

    event onTokenSell(
        address indexed _customerAddress,
        uint256 _tokensBurned,
        uint256 _P3D_received
    );

    event onReinvestment(
        address indexed _customerAddress,
        uint256 _P3D_reinvested,
        uint256 _tokensMinted
    );

    event onSubdivsReinvestment(
        address indexed _customerAddress,
        uint256 _ETH_reinvested,
        uint256 _tokensMinted
    );

    event onWithdraw(
        address indexed _customerAddress,
        uint256 _P3D_withdrawn
    );

    event onSubdivsWithdraw(
        address indexed _customerAddress,
        uint256 _ETH_withdrawn
    );

    event onNameRegistration(
        address indexed _customerAddress,
        string _registeredName
    );

    // ERC-20
    event Transfer(
        address indexed _from,
        address indexed _to,
        uint256 _tokens
    );

    event Approval(
        address indexed _tokenOwner,
        address indexed _spender,
        uint256 _tokens
    );


    /*=====================================
    =            CONFIGURABLES            =
    =====================================*/
    string public name = "PoWH4D";
    string public symbol = "P4D";
    uint256 constant public decimals = 18;
    uint256 constant internal buyDividendFee_ = 10; // 10% dividend tax on each buy
    uint256 constant internal sellDividendFee_ = 5; // 5% dividend tax on each sell
    uint256 internal tokenPriceInitial_; // set in the constructor
    uint256 constant internal tokenPriceIncremental_ = 1e9; // 1/10th the incremental of P3D
    uint256 constant internal magnitude = 2**64;
    uint256 public stakingRequirement = 1e22; // 10,000 P4D
    uint256 constant internal initialBuyLimitPerTx_ = 1 ether;
    uint256 constant internal initialBuyLimitCap_ = 100 ether;
    uint256 internal totalInputETH_ = 0;


    // ambassador program
    mapping(address => bool) internal ambassadors_;
    uint256 constant internal ambassadorMaxPurchase_ = 1 ether;
    uint256 constant internal ambassadorQuota_ = 12 ether;
    uint256 internal totalAmbassadorQuotaSpent_ = 0;
    address internal _dev;


    uint256 public ACTIVATION_TIME;


   /*================================
    =            DATASETS            =
    ================================*/
    // amount of shares for each address (scaled number)
    mapping(address => uint256) internal tokenBalanceLedger_;
    mapping(address => uint256) internal referralBalance_;
    mapping(address => int256) internal payoutsTo_;
    mapping(address => uint256) internal dividendsStored_;
    mapping(address => uint256) internal ambassadorAccumulatedQuota_;
    uint256 internal tokenSupply_ = 0;
    uint256 internal profitPerShare_;

    // administrator list (see above on what they can do)
    mapping(address => bool) public administrators;

    // when this is set to true, only ambassadors can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid)
    bool public onlyAmbassadors = true;

    // contracts can interact with the exchange but only approved ones
    mapping(address => bool) public canAcceptTokens_;

    // ERC-20 standard
    mapping(address => mapping (address => uint256)) public allowed;

    // P3D contract reference
    P3D internal _P3D;

    // structure to handle the distribution of ETH divs paid out by the P3D contract
    struct P3D_dividends {
        uint256 balance;
        uint256 lastDividendPoints;
    }
    mapping(address => P3D_dividends) internal divsMap_;
    uint256 internal totalDividendPoints_;
    uint256 internal lastContractBalance_;

    // structure to handle the global unique name/vanity registration
    struct NameRegistry {
        uint256 activeIndex;
        bytes32[] registeredNames;
    }
    mapping(address => NameRegistry) internal customerNameMap_;
    mapping(bytes32 => address) internal globalNameMap_;
    uint256 constant internal nameRegistrationFee = 0.01 ether;


    /*=======================================
    =            PUBLIC FUNCTIONS            =
    =======================================*/
    /*
    * -- APPLICATION ENTRY POINTS --
    */
    constructor(uint256 _activationTime, address _P3D_address) public {

        _dev = msg.sender;

        ACTIVATION_TIME = _activationTime;

        totalDividendPoints_ = 1; // non-zero value

        _P3D = P3D(_P3D_address);

        // virtualized purchase of the entire ambassador quota
        // calculateTokensReceived() for this contract will return how many tokens can be bought starting at 1e9 P3D per P4D
        // as the price increases by the incremental each time we can just multiply it out and scale it back to e18
        //
        // this is used as the initial P3D-P4D price as it makes it fairer on other investors that aren't ambassadors
        uint256 _P4D_received;
        (, _P4D_received) = calculateTokensReceived(ambassadorQuota_);
        tokenPriceInitial_ = tokenPriceIncremental_ * _P4D_received / 1e18;

        // admins
        administrators[_dev] = true;
        
        // ambassadors
        ambassadors_[_dev] = true;
    }


    /**
     * Converts all incoming ethereum to tokens for the caller, and passes down the referral address
     */
    function buy(address _referredBy)
        payable
        public
        returns(uint256)
    {
        return purchaseInternal(msg.sender, msg.value, _referredBy);
    }

    /**
     * Buy with a registered name as the referrer.
     * If the name is unregistered, address(0x0) will be the ref
     */
    function buyWithNameRef(string memory _nameOfReferrer)
        payable
        public
        returns(uint256)
    {
        return purchaseInternal(msg.sender, msg.value, ownerOfName(_nameOfReferrer));
    }

    /**
     * Fallback function to handle ethereum that was sent straight to the contract
     * Unfortunately we cannot use a referral address this way.
     */
    function()
        payable
        public
    {
        if (msg.sender != address(_P3D)) {
            purchaseInternal(msg.sender, msg.value, address(0x0));
        }

        // all other ETH is from the withdrawn dividends from
        // the P3D contract, this is distributed out via the
        // updateSubdivsFor() method
        // no more computation can be done inside this function
        // as when you call address.transfer(uint256), only
        // 2,300 gas is forwarded to this function so no variables
        // can be mutated with that limit
        // address(this).balance will represent the total amount
        // of ETH dividends from the P3D contract (minus the amount
        // that's already been withdrawn)
    }

    /**
     * Distribute any ETH sent to this method out to all token holders
     */
    function donate()
        payable
        public
    {
        // nothing happens here in order to save gas
        // all of the ETH sent to this function will be distributed out
        // via the updateSubdivsFor() method
        // 
        // this method is designed for external contracts that have 
        // extra ETH that they want to evenly distribute to all
        // P4D token holders
    }

    /**
     * Allows a customer to pay for a global name on the P4D network
     * There's a 0.01 ETH registration fee per name
     * All ETH is distributed to P4D token holders via updateSubdivsFor()
     */
    function registerName(string memory _name)
        payable
        public
    {
        address _customerAddress = msg.sender;
        require(!onlyAmbassadors || ambassadors_[_customerAddress]);

        require(bytes(_name).length > 0);
        require(msg.value >= nameRegistrationFee);
        uint256 excess = SafeMath.sub(msg.value, nameRegistrationFee);

        bytes32 bytesName = stringToBytes32(_name);
        require(globalNameMap_[bytesName] == address(0x0));

        NameRegistry storage customerNamesInfo = customerNameMap_[_customerAddress];
        customerNamesInfo.registeredNames.push(bytesName);
        customerNamesInfo.activeIndex = customerNamesInfo.registeredNames.length - 1;

        globalNameMap_[bytesName] = _customerAddress;

        if (excess > 0) {
            _customerAddress.transfer(excess);
        }

        // fire event
        emit onNameRegistration(_customerAddress, _name);

        // similar to the fallback and donate functions, the ETH cost of
        // the name registration fee (0.01 ETH) will be distributed out
        // to all P4D tokens holders via the updateSubdivsFor() method
    }

    /**
     * Change your active name to a name that you've already purchased
     */
    function changeActiveNameTo(string memory _name)
        public
    {
        address _customerAddress = msg.sender;
        require(_customerAddress == ownerOfName(_name));

        bytes32 bytesName = stringToBytes32(_name);
        NameRegistry storage customerNamesInfo = customerNameMap_[_customerAddress];

        uint256 newActiveIndex = 0;
        for (uint256 i = 0; i < customerNamesInfo.registeredNames.length; i++) {
            if (bytesName == customerNamesInfo.registeredNames[i]) {
                newActiveIndex = i;
                break;
            }
        }

        customerNamesInfo.activeIndex = newActiveIndex;
    }

    /**
     * Similar to changeActiveNameTo() without the need to iterate through your name list
     */
    function changeActiveNameIndexTo(uint256 _newActiveIndex)
        public
    {
        address _customerAddress = msg.sender;
        NameRegistry storage customerNamesInfo = customerNameMap_[_customerAddress];

        require(_newActiveIndex < customerNamesInfo.registeredNames.length);
        customerNamesInfo.activeIndex = _newActiveIndex;
    }

    /**
     * Converts all of caller's dividends to tokens.
     * The argument is not used but it allows MetaMask to render
     * 'Reinvest' in your transactions list once the function sig
     * is registered to the contract at;
     * https://etherscan.io/address/0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86#writeContract
     */
    function reinvest(bool)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        withdrawInternal(_customerAddress);

        uint256 reinvestableDividends = dividendsStored_[_customerAddress];
        reinvestAmount(reinvestableDividends);
    }

    /**
     * Converts a portion of caller's dividends to tokens.
     */
    function reinvestAmount(uint256 _amountOfP3D)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        withdrawInternal(_customerAddress);

        if (_amountOfP3D > 0 && _amountOfP3D <= dividendsStored_[_customerAddress]) {
            dividendsStored_[_customerAddress] = SafeMath.sub(dividendsStored_[_customerAddress], _amountOfP3D);

            // dispatch a buy order with the virtualized "withdrawn dividends"
            uint256 _tokens = purchaseTokens(_customerAddress, _amountOfP3D, address(0x0));

            // fire event
            emit onReinvestment(_customerAddress, _amountOfP3D, _tokens);
        }
    }

    /**
     * Converts all of caller's subdividends to tokens.
     * The argument is not used but it allows MetaMask to render
     * 'Reinvest Subdivs' in your transactions list once the function sig
     * is registered to the contract at;
     * https://etherscan.io/address/0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86#writeContract
     */
    function reinvestSubdivs(bool)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        uint256 reinvestableSubdividends = divsMap_[_customerAddress].balance;
        reinvestSubdivsAmount(reinvestableSubdividends);
    }

    /**
     * Converts a portion of caller's subdividends to tokens.
     */
    function reinvestSubdivsAmount(uint256 _amountOfETH)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        if (_amountOfETH > 0 && _amountOfETH <= divsMap_[_customerAddress].balance) {
            divsMap_[_customerAddress].balance = SafeMath.sub(divsMap_[_customerAddress].balance, _amountOfETH);
            lastContractBalance_ = SafeMath.sub(lastContractBalance_, _amountOfETH);

            // purchase tokens with the ETH subdividends
            uint256 _tokens = purchaseInternal(_customerAddress, _amountOfETH, address(0x0));

            // fire event
            emit onSubdivsReinvestment(_customerAddress, _amountOfETH, _tokens);
        }
    }

    /**
     * Alias of sell(), withdraw() and withdrawSubdivs().
     * The argument is not used but it allows MetaMask to render
     * 'Exit' in your transactions list once the function sig
     * is registered to the contract at;
     * https://etherscan.io/address/0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86#writeContract
     */
    function exit(bool)
        public
    {
        // get token count for caller & sell them all
        address _customerAddress = msg.sender;
        uint256 _tokens = tokenBalanceLedger_[_customerAddress];
        if(_tokens > 0) sell(_tokens);

        // lambo delivery service
        withdraw(true);
        withdrawSubdivs(true);
    }

    /**
     * Withdraws all of the callers dividend earnings.
     * The argument is not used but it allows MetaMask to render
     * 'Withdraw' in your transactions list once the function sig
     * is registered to the contract at;
     * https://etherscan.io/address/0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86#writeContract
     */
    function withdraw(bool)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        withdrawInternal(_customerAddress);

        uint256 withdrawableDividends = dividendsStored_[_customerAddress];
        withdrawAmount(withdrawableDividends);
    }

    /**
     * Withdraws a portion of the callers dividend earnings.
     */
    function withdrawAmount(uint256 _amountOfP3D)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        withdrawInternal(_customerAddress);

        if (_amountOfP3D > 0 && _amountOfP3D <= dividendsStored_[_customerAddress]) {
            dividendsStored_[_customerAddress] = SafeMath.sub(dividendsStored_[_customerAddress], _amountOfP3D);
            
            // lambo delivery service
            require(_P3D.transfer(_customerAddress, _amountOfP3D));
            // NOTE!
            // P3D has a 10% transfer tax so even though this is sending your entire
            // dividend count to you, you will only actually receive 90%.

            // fire event
            emit onWithdraw(_customerAddress, _amountOfP3D);
        }
    }

    /**
     * Withdraws all of the callers subdividend earnings.
     * The argument is not used but it allows MetaMask to render
     * 'Withdraw Subdivs' in your transactions list once the function sig
     * is registered to the contract at;
     * https://etherscan.io/address/0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86#writeContract
     */
    function withdrawSubdivs(bool)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        uint256 withdrawableSubdividends = divsMap_[_customerAddress].balance;
        withdrawSubdivsAmount(withdrawableSubdividends);
    }

    /**
     * Withdraws a portion of the callers subdividend earnings.
     */
    function withdrawSubdivsAmount(uint256 _amountOfETH)
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        if (_amountOfETH > 0 && _amountOfETH <= divsMap_[_customerAddress].balance) {
            divsMap_[_customerAddress].balance = SafeMath.sub(divsMap_[_customerAddress].balance, _amountOfETH);
            lastContractBalance_ = SafeMath.sub(lastContractBalance_, _amountOfETH);

            // transfer all withdrawable subdividends
            _customerAddress.transfer(_amountOfETH);

            // fire event
            emit onSubdivsWithdraw(_customerAddress, _amountOfETH);
        }
    }

    /**
     * Liquifies tokens to P3D.
     */
    function sell(uint256 _amountOfTokens)
        onlyBagholders()
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        // russian hackers BTFO
        require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
        uint256 _tokens = _amountOfTokens;
        uint256 _P3D_amount = tokensToP3D_(_tokens);
        uint256 _dividends = SafeMath.div(SafeMath.mul(_P3D_amount, sellDividendFee_), 100);
        uint256 _taxedP3D = SafeMath.sub(_P3D_amount, _dividends);

        // burn the sold tokens
        tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens);
        tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens);

        // update dividends tracker
        int256 _updatedPayouts = (int256)(profitPerShare_ * _tokens + (_taxedP3D * magnitude));
        payoutsTo_[_customerAddress] -= _updatedPayouts;

        // dividing by zero is a bad idea
        if (tokenSupply_ > 0) {
            // update the amount of dividends per token
            profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
        }

        // fire events
        emit onTokenSell(_customerAddress, _tokens, _taxedP3D);
        emit Transfer(_customerAddress, address(0x0), _tokens);
    }

    /**
     * Transfer tokens from the caller to a new holder.
     * REMEMBER THIS IS 0% TRANSFER FEE
     */
    function transfer(address _toAddress, uint256 _amountOfTokens)
        onlyBagholders()
        public
        returns(bool)
    {
        address _customerAddress = msg.sender;
        return transferInternal(_customerAddress, _toAddress, _amountOfTokens);
    }

    /**
     * Transfer token to a specified address and forward the data to recipient
     * ERC-677 standard
     * https://github.com/ethereum/EIPs/issues/677
     * @param _to    Receiver address.
     * @param _value Amount of tokens that will be transferred.
     * @param _data  Transaction metadata.
     */
    function transferAndCall(address _to, uint256 _value, bytes _data)
        external
        returns(bool)
    {
        require(canAcceptTokens_[_to]); // approved contracts only
        require(transfer(_to, _value)); // do a normal token transfer to the contract

        if (isContract(_to)) {
            usingP4D receiver = usingP4D(_to);
            require(receiver.tokenCallback(msg.sender, _value, _data));
        }

        return true;
    }

    /**
     * ERC-20 token standard for transferring tokens on anothers behalf
     */
    function transferFrom(address _from, address _to, uint256 _amountOfTokens)
        public
        returns(bool)
    {
        require(allowed[_from][msg.sender] >= _amountOfTokens);
        allowed[_from][msg.sender] = SafeMath.sub(allowed[_from][msg.sender], _amountOfTokens);

        return transferInternal(_from, _to, _amountOfTokens);
    }

    /**
     * ERC-20 token standard for allowing another address to transfer your tokens
     * on your behalf up to a certain limit
     */
    function approve(address _spender, uint256 _tokens)
        public
        returns(bool)
    {
        allowed[msg.sender][_spender] = _tokens;
        emit Approval(msg.sender, _spender, _tokens);
        return true;
    }

    /**
     * ERC-20 token standard for approving and calling an external
     * contract with data
     */
    function approveAndCall(address _to, uint256 _value, bytes _data)
        external
        returns(bool)
    {
        require(approve(_to, _value)); // do a normal approval

        if (isContract(_to)) {
            controllingP4D receiver = controllingP4D(_to);
            require(receiver.approvalCallback(msg.sender, _value, _data));
        }

        return true;
    }


    /*----------  ADMINISTRATOR ONLY FUNCTIONS  ----------*/
    /**
     * In case one of us dies, we need to replace ourselves.
     */
    function setAdministrator(address _identifier, bool _status)
        onlyAdministrator()
        public
    {
        administrators[_identifier] = _status;
    }

    /**
     * Add a new ambassador to the exchange
     */
    function setAmbassador(address _identifier, bool _status)
        onlyAdministrator()
        public
    {
        ambassadors_[_identifier] = _status;
    }

    /**
     * Precautionary measures in case we need to adjust the masternode rate.
     */
    function setStakingRequirement(uint256 _amountOfTokens)
        onlyAdministrator()
        public
    {
        stakingRequirement = _amountOfTokens;
    }

    /**
     * Add a sub-contract, which can accept P4D tokens
     */
    function setCanAcceptTokens(address _address)
        onlyAdministrator()
        public
    {
        require(isContract(_address));
        canAcceptTokens_[_address] = true; // one way switch
    }

    /**
     * If we want to rebrand, we can.
     */
    function setName(string _name)
        onlyAdministrator()
        public
    {
        name = _name;
    }

    /**
     * If we want to rebrand, we can.
     */
    function setSymbol(string _symbol)
        onlyAdministrator()
        public
    {
        symbol = _symbol;
    }


    /*----------  HELPERS AND CALCULATORS  ----------*/
    /**
     * Method to view the current P3D tokens stored in the contract
     */
    function totalBalance()
        public
        view
        returns(uint256)
    {
        return _P3D.myTokens();
    }

    /**
     * Retrieve the total token supply.
     */
    function totalSupply()
        public
        view
        returns(uint256)
    {
        return tokenSupply_;
    }

    /**
     * Retrieve the tokens owned by the caller.
     */
    function myTokens()
        public
        view
        returns(uint256)
    {
        address _customerAddress = msg.sender;
        return balanceOf(_customerAddress);
    }

    /**
     * Retrieve the dividends owned by the caller.
     * If `_includeReferralBonus` is set to true, the referral bonus will be included in the calculations.
     * The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
     * But in the internal calculations, we want them separate.
     */
    function myDividends(bool _includeReferralBonus)
        public
        view
        returns(uint256)
    {
        address _customerAddress = msg.sender;
        return (_includeReferralBonus ? dividendsOf(_customerAddress) + referralDividendsOf(_customerAddress) : dividendsOf(_customerAddress));
    }

    /**
     * Retrieve the subdividend owned by the caller.
     */
    function myStoredDividends()
        public
        view
        returns(uint256)
    {
        address _customerAddress = msg.sender;
        return storedDividendsOf(_customerAddress);
    }

    /**
     * Retrieve the subdividend owned by the caller.
     */
    function mySubdividends()
        public
        view
        returns(uint256)
    {
        address _customerAddress = msg.sender;
        return subdividendsOf(_customerAddress);
    }

    /**
     * Retrieve the token balance of any single address.
     */
    function balanceOf(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return tokenBalanceLedger_[_customerAddress];
    }

    /**
     * Retrieve the dividend balance of any single address.
     */
    function dividendsOf(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return (uint256)((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
    }

    /**
     * Retrieve the referred dividend balance of any single address.
     */
    function referralDividendsOf(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return referralBalance_[_customerAddress];
    }

    /**
     * Retrieve the stored dividend balance of any single address.
     */
    function storedDividendsOf(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return dividendsStored_[_customerAddress] + dividendsOf(_customerAddress) + referralDividendsOf(_customerAddress);
    }

    /**
     * Retrieve the subdividend balance owing of any single address.
     */
    function subdividendsOwing(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return (divsMap_[_customerAddress].lastDividendPoints == 0 ? 0 : (balanceOf(_customerAddress) * (totalDividendPoints_ - divsMap_[_customerAddress].lastDividendPoints)) / magnitude);
    }

    /**
     * Retrieve the subdividend balance of any single address.
     */
    function subdividendsOf(address _customerAddress)
        public
        view
        returns(uint256)
    {
        return SafeMath.add(divsMap_[_customerAddress].balance, subdividendsOwing(_customerAddress));
    }

    /**
     * Retrieve the allowance of an owner and spender.
     */
    function allowance(address _tokenOwner, address _spender) 
        public
        view
        returns(uint256)
    {
        return allowed[_tokenOwner][_spender];
    }

    /**
     * Retrieve all name information about a customer
     */
    function namesOf(address _customerAddress)
        public
        view
        returns(uint256 activeIndex, string activeName, bytes32[] customerNames)
    {
        NameRegistry memory customerNamesInfo = customerNameMap_[_customerAddress];

        uint256 length = customerNamesInfo.registeredNames.length;
        customerNames = new bytes32[](length);

        for (uint256 i = 0; i < length; i++) {
            customerNames[i] = customerNamesInfo.registeredNames[i];
        }

        activeIndex = customerNamesInfo.activeIndex;
        activeName = activeNameOf(_customerAddress);
    }

    /**
     * Retrieves the address of the owner from the name
     */
    function ownerOfName(string memory _name)
        public
        view
        returns(address)
    {
        if (bytes(_name).length > 0) {
            bytes32 bytesName = stringToBytes32(_name);
            return globalNameMap_[bytesName];
        } else {
            return address(0x0);
        }
    }

    /**
     * Retrieves the active name of a customer
     */
    function activeNameOf(address _customerAddress)
        public
        view
        returns(string)
    {
        NameRegistry memory customerNamesInfo = customerNameMap_[_customerAddress];
        if (customerNamesInfo.registeredNames.length > 0) {
            bytes32 activeBytesName = customerNamesInfo.registeredNames[customerNamesInfo.activeIndex];
            return bytes32ToString(activeBytesName);
        } else {
            return "";
        }
    }

    /**
     * Return the buy price of 1 individual token.
     */
    function sellPrice()
        public
        view
        returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ - tokenPriceIncremental_;
        } else {
            uint256 _P3D_received = tokensToP3D_(1e18);
            uint256 _dividends = SafeMath.div(SafeMath.mul(_P3D_received, sellDividendFee_), 100);
            uint256 _taxedP3D = SafeMath.sub(_P3D_received, _dividends);

            return _taxedP3D;
        }
    }

    /**
     * Return the sell price of 1 individual token.
     */
    function buyPrice()
        public
        view
        returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ + tokenPriceIncremental_;
        } else {
            uint256 _P3D_received = tokensToP3D_(1e18);
            uint256 _dividends = SafeMath.div(SafeMath.mul(_P3D_received, buyDividendFee_), 100);
            uint256 _taxedP3D =  SafeMath.add(_P3D_received, _dividends);
            
            return _taxedP3D;
        }
    }

    /**
     * Function for the frontend to dynamically retrieve the price scaling of buy orders.
     */
    function calculateTokensReceived(uint256 _amountOfETH)
        public
        view
        returns(uint256 _P3D_received, uint256 _P4D_received)
    {
        uint256 P3D_received = _P3D.calculateTokensReceived(_amountOfETH);

        uint256 _dividends = SafeMath.div(SafeMath.mul(P3D_received, buyDividendFee_), 100);
        uint256 _taxedP3D = SafeMath.sub(P3D_received, _dividends);
        uint256 _amountOfTokens = P3DtoTokens_(_taxedP3D);
        
        return (P3D_received, _amountOfTokens);
    }

    /**
     * Function for the frontend to dynamically retrieve the price scaling of sell orders.
     */
    function calculateAmountReceived(uint256 _tokensToSell)
        public
        view
        returns(uint256)
    {
        require(_tokensToSell <= tokenSupply_);
        uint256 _P3D_received = tokensToP3D_(_tokensToSell);
        uint256 _dividends = SafeMath.div(SafeMath.mul(_P3D_received, sellDividendFee_), 100);
        uint256 _taxedP3D = SafeMath.sub(_P3D_received, _dividends);
        
        return _taxedP3D;
    }

    /**
    * Utility method to expose the P3D address for any child contracts to use
    */
    function P3D_address()
        public
        view
        returns(address)
    {
        return address(_P3D);
    }

    /**
    * Utility method to return all of the data needed for the front end in 1 call
    */
    function fetchAllDataForCustomer(address _customerAddress)
        public
        view
        returns(uint256 _totalSupply, uint256 _totalBalance, uint256 _buyPrice, uint256 _sellPrice, uint256 _activationTime,
                uint256 _customerTokens, uint256 _customerUnclaimedDividends, uint256 _customerStoredDividends, uint256 _customerSubdividends)
    {
        _totalSupply = totalSupply();
        _totalBalance = totalBalance();
        _buyPrice = buyPrice();
        _sellPrice = sellPrice();
        _activationTime = ACTIVATION_TIME;
        _customerTokens = balanceOf(_customerAddress);
        _customerUnclaimedDividends = dividendsOf(_customerAddress) + referralDividendsOf(_customerAddress);
        _customerStoredDividends = storedDividendsOf(_customerAddress);
        _customerSubdividends = subdividendsOf(_customerAddress);
    }


    /*==========================================
    =            INTERNAL FUNCTIONS            =
    ==========================================*/

    // This function should always be called before a customers P4D balance changes.
    // It's responsible for withdrawing any outstanding ETH dividends from the P3D exchange
    // as well as distrubuting all of the additional ETH balance since the last update to
    // all of the P4D token holders proportionally.
    // After this it will move any owed subdividends into the customers withdrawable subdividend balance.
    function updateSubdivsFor(address _customerAddress)
        internal
    {   
        // withdraw the P3D dividends first
        if (_P3D.myDividends(true) > 0) {
            _P3D.withdraw();
        }

        // check if we have additional ETH in the contract since the last update
        uint256 contractBalance = address(this).balance;
        if (contractBalance > lastContractBalance_ && totalSupply() != 0) {
            uint256 additionalDivsFromP3D = SafeMath.sub(contractBalance, lastContractBalance_);
            totalDividendPoints_ = SafeMath.add(totalDividendPoints_, SafeMath.div(SafeMath.mul(additionalDivsFromP3D, magnitude), totalSupply()));
            lastContractBalance_ = contractBalance;
        }

        // if this is the very first time this is called for a customer, set their starting point
        if (divsMap_[_customerAddress].lastDividendPoints == 0) {
            divsMap_[_customerAddress].lastDividendPoints = totalDividendPoints_;
        }

        // move any owing subdividends into the customers subdividend balance
        uint256 owing = subdividendsOwing(_customerAddress);
        if (owing > 0) {
            divsMap_[_customerAddress].balance = SafeMath.add(divsMap_[_customerAddress].balance, owing);
            divsMap_[_customerAddress].lastDividendPoints = totalDividendPoints_;
        }
    }

    function withdrawInternal(address _customerAddress)
        internal
    {
        // setup data
        // dividendsOf() will return only divs, not the ref. bonus
        uint256 _dividends = dividendsOf(_customerAddress); // get ref. bonus later in the code

        // update dividend tracker
        payoutsTo_[_customerAddress] += (int256)(_dividends * magnitude);

        // add ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;

        // store the divs
        dividendsStored_[_customerAddress] = SafeMath.add(dividendsStored_[_customerAddress], _dividends);
    }

    function transferInternal(address _customerAddress, address _toAddress, uint256 _amountOfTokens)
        internal
        returns(bool)
    {
        // make sure we have the requested tokens
        require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
        updateSubdivsFor(_customerAddress);
        updateSubdivsFor(_toAddress);

        // withdraw and store all outstanding dividends first (if there is any)
        if ((dividendsOf(_customerAddress) + referralDividendsOf(_customerAddress)) > 0) withdrawInternal(_customerAddress);

        // exchange tokens
        tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens);
        tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _amountOfTokens);

        // update dividend trackers
        payoutsTo_[_customerAddress] -= (int256)(profitPerShare_ * _amountOfTokens);
        payoutsTo_[_toAddress] += (int256)(profitPerShare_ * _amountOfTokens);

        // fire event
        emit Transfer(_customerAddress, _toAddress, _amountOfTokens);

        // ERC20
        return true;
    }

    function purchaseInternal(address _sender, uint256 _incomingEthereum, address _referredBy)
        purchaseFilter(_sender, _incomingEthereum)
        internal
        returns(uint256)
    {

        uint256 purchaseAmount = _incomingEthereum;
        uint256 excess = 0;
        if (totalInputETH_ <= initialBuyLimitCap_) { // check if the total input ETH is less than the cap
            if (purchaseAmount > initialBuyLimitPerTx_) { // if so check if the transaction is over the initial buy limit per transaction
                purchaseAmount = initialBuyLimitPerTx_;
                excess = SafeMath.sub(_incomingEthereum, purchaseAmount);
            }
            totalInputETH_ = SafeMath.add(totalInputETH_, purchaseAmount);
        }

        // return the excess if there is any
        if (excess > 0) {
             _sender.transfer(excess);
        }

        // buy P3D tokens with the entire purchase amount
        // even though _P3D.buy() returns uint256, it was never implemented properly inside the P3D contract
        // so in order to find out how much P3D was purchased, you need to check the balance first then compare
        // the balance after the purchase and the difference will be the amount purchased
        uint256 tmpBalanceBefore = _P3D.myTokens();
        _P3D.buy.value(purchaseAmount)(_referredBy);
        uint256 purchasedP3D = SafeMath.sub(_P3D.myTokens(), tmpBalanceBefore);

        return purchaseTokens(_sender, purchasedP3D, _referredBy);
    }


    function purchaseTokens(address _sender, uint256 _incomingP3D, address _referredBy)
        internal
        returns(uint256)
    {
        updateSubdivsFor(_sender);

        // data setup
        uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingP3D, buyDividendFee_), 100);
        uint256 _referralBonus = SafeMath.div(_undividedDividends, 3);
        uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus);
        uint256 _taxedP3D = SafeMath.sub(_incomingP3D, _undividedDividends);
        uint256 _amountOfTokens = P3DtoTokens_(_taxedP3D);
        uint256 _fee = _dividends * magnitude;

        // no point in continuing execution if OP is a poorfag russian hacker
        // prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world
        // (or hackers)
        // and yes we know that the safemath function automatically rules out the "greater then" equasion.
        require(_amountOfTokens > 0 && (SafeMath.add(_amountOfTokens, tokenSupply_) > tokenSupply_));

        // is the user referred by a masternode?
        if (
            // is this a referred purchase?
            _referredBy != address(0x0) &&

            // no cheating!
            _referredBy != _sender &&

            // does the referrer have at least X whole tokens?
            // i.e is the referrer a godly chad masternode
            tokenBalanceLedger_[_referredBy] >= stakingRequirement
        ) {
            // wealth redistribution
            referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus);
        } else {
            // no ref purchase
            // add the referral bonus back to the global dividends cake
            _dividends = SafeMath.add(_dividends, _referralBonus);
            _fee = _dividends * magnitude;
        }

        // we can't give people infinite P3D
        if(tokenSupply_ > 0){

            // add tokens to the pool
            tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens);

            // take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder
            profitPerShare_ += (_dividends * magnitude / (tokenSupply_));

            // calculate the amount of tokens the customer receives over their purchase
            _fee = _fee - (_fee - (_amountOfTokens * (_dividends * magnitude / (tokenSupply_))));

        } else {
            // add tokens to the pool
            tokenSupply_ = _amountOfTokens;
        }

        // update circulating supply & the ledger address for the customer
        tokenBalanceLedger_[_sender] = SafeMath.add(tokenBalanceLedger_[_sender], _amountOfTokens);

        // Tells the contract that the buyer doesn't deserve dividends for the tokens before they owned them;
        // really I know you think you do but you don't
        payoutsTo_[_sender] += (int256)((profitPerShare_ * _amountOfTokens) - _fee);

        // fire events
        emit onTokenPurchase(_sender, _incomingP3D, _amountOfTokens, _referredBy);
        emit Transfer(address(0x0), _sender, _amountOfTokens);

        return _amountOfTokens;
    }

    /**
     * Calculate token price based on an amount of incoming P3D
     * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
     * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
     */
    function P3DtoTokens_(uint256 _P3D_received)
        internal
        view
        returns(uint256)
    {
        uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
        uint256 _tokensReceived =
         (
            (
                // underflow attempts BTFO
                SafeMath.sub(
                    (sqrt
                        (
                            (_tokenPriceInitial**2)
                            +
                            (2 * (tokenPriceIncremental_ * 1e18)*(_P3D_received * 1e18))
                            +
                            (((tokenPriceIncremental_)**2) * (tokenSupply_**2))
                            +
                            (2 * (tokenPriceIncremental_) * _tokenPriceInitial * tokenSupply_)
                        )
                    ), _tokenPriceInitial
                )
            ) / (tokenPriceIncremental_)
        ) - (tokenSupply_);

        return _tokensReceived;
    }

    /**
     * Calculate token sell value.
     * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
     * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
     */
    function tokensToP3D_(uint256 _P4D_tokens)
        internal
        view
        returns(uint256)
    {

        uint256 tokens_ = (_P4D_tokens + 1e18);
        uint256 _tokenSupply = (tokenSupply_ + 1e18);
        uint256 _P3D_received =
        (
            // underflow attempts BTFO
            SafeMath.sub(
                (
                    (
                        (
                            tokenPriceInitial_ + (tokenPriceIncremental_ * (_tokenSupply / 1e18))
                        ) - tokenPriceIncremental_
                    ) * (tokens_ - 1e18)
                ), (tokenPriceIncremental_ * ((tokens_**2 - tokens_) / 1e18)) / 2
            )
        / 1e18);

        return _P3D_received;
    }


    // This is where all your gas goes, sorry
    // Not sorry, you probably only paid 1 gwei
    function sqrt(uint x) internal pure returns (uint y) {
        uint z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }

    /**
     * Additional check that the address we are sending tokens to is a contract
     * assemble the given address bytecode. If bytecode exists then the _addr is a contract.
     */
    function isContract(address _addr)
        internal
        constant
        returns(bool)
    {
        // retrieve the size of the code on target address, this needs assembly
        uint length;
        assembly { length := extcodesize(_addr) }
        return length > 0;
    }

    /**
     * Utility method to help store the registered names
     */
    function stringToBytes32(string memory _s)
        internal
        pure
        returns(bytes32 result)
    {
        bytes memory tmpEmptyStringTest = bytes(_s);
        if (tmpEmptyStringTest.length == 0) {
            return 0x0;
        }
        assembly { result := mload(add(_s, 32)) }
    }

    /**
     * Utility method to help read the registered names
     */
    function bytes32ToString(bytes32 _b)
        internal
        pure
        returns(string)
    {
        bytes memory bytesString = new bytes(32);
        uint charCount = 0;
        for (uint256 i = 0; i < 32; i++) {
            byte char = byte(bytes32(uint(_b) * 2 ** (8 * i)));
            if (char != 0) {
                bytesString[charCount++] = char;
            }
        }
        bytes memory bytesStringTrimmed = new bytes(charCount);
        for (i = 0; i < charCount; i++) {
            bytesStringTrimmed[i] = bytesString[i];
        }
        return string(bytesStringTrimmed);
    }
}

/**
 * @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;
    }
}


// 
// pragma solidity ^0.4.25;
// 
// interface P4D {
//     function buy(address) external payable returns(uint256);
//     function sell(uint256) external;
//     function transfer(address, uint256) external returns(bool);
//     function myTokens() external view returns(uint256);
//     function myStoredDividends() external view returns(uint256);
//     function mySubdividends() external view returns(uint256);
//     function reinvest(bool) external;
//     function reinvestSubdivs(bool) external;
//     function withdraw(bool) external;
//     function withdrawSubdivs(bool) external;
//     function exit(bool) external; // sell + withdraw + withdrawSubdivs
//     function P3D_address() external view returns(address);
// }
// 
// contract usingP4D {
// 
//     P4D public tokenContract;
// 
//     constructor(address _P4D_address) public {
//         tokenContract = P4D(_P4D_address);
//     }
// 
//     modifier onlyTokenContract {
//         require(msg.sender == address(tokenContract));
//         _;
//     }
// 
//     function tokenCallback(address _from, uint256 _value, bytes _data) external returns (bool);
// }
// 
// contract YourDapp is usingP4D {
// 
//     constructor(address _P4D_address)
//         public
//         usingP4D(_P4D_address)
//     {
//         //...
//     }
// 
//     function tokenCallback(address _from, uint256 _value, bytes _data)
//         external
//         onlyTokenContract
//         returns (bool)
//     {
//         //...
//         return true;
//     }
//
//     function()
//         payable
//         public
//     {
//         if (msg.sender != address(tokenContract)) {
//             //...
//         }
//     }
// }
//
/*===========================================================================================*
*************************************** https://p4d.io ***************************************
*===========================================================================================*/

Contract ABI
[{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"dividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"activeNameOf","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfP3D","type":"uint256"}],"name":"withdrawAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"registerName","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_tokens","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"canAcceptTokens_","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_amountOfETH","type":"uint256"}],"name":"calculateTokensReceived","outputs":[{"name":"_P3D_received","type":"uint256"},{"name":"_P4D_received","type":"uint256"}],"payable":false,"stateMutability":"view","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":"_amountOfTokens","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myStoredDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"onlyAmbassadors","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"storedDividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_identifier","type":"address"},{"name":"_status","type":"bool"}],"name":"setAmbassador","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"changeActiveNameTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transferAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bool"}],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingRequirement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newActiveIndex","type":"uint256"}],"name":"changeActiveNameIndexTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_includeReferralBonus","type":"bool"}],"name":"myDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bool"}],"name":"withdrawSubdivs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfP3D","type":"uint256"}],"name":"reinvestAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokensToSell","type":"uint256"}],"name":"calculateAmountReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"administrators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"string"}],"name":"ownerOfName","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ACTIVATION_TIME","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"setStakingRequirement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"namesOf","outputs":[{"name":"activeIndex","type":"uint256"},{"name":"activeName","type":"string"},{"name":"customerNames","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"P3D_address","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_identifier","type":"address"},{"name":"_status","type":"bool"}],"name":"setAdministrator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myTokens","outputs":[{"name":"","type":"uint256"}],"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":"","type":"bool"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_toAddress","type":"address"},{"name":"_amountOfTokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfETH","type":"uint256"}],"name":"reinvestSubdivsAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_symbol","type":"string"}],"name":"setSymbol","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"mySubdividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nameOfReferrer","type":"string"}],"name":"buyWithNameRef","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfETH","type":"uint256"}],"name":"withdrawSubdivsAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bool"}],"name":"reinvestSubdivs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setCanAcceptTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"referralDividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenOwner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"subdividendsOwing","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bool"}],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"donate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_referredBy","type":"address"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"fetchAllDataForCustomer","outputs":[{"name":"_totalSupply","type":"uint256"},{"name":"_totalBalance","type":"uint256"},{"name":"_buyPrice","type":"uint256"},{"name":"_sellPrice","type":"uint256"},{"name":"_activationTime","type":"uint256"},{"name":"_customerTokens","type":"uint256"},{"name":"_customerUnclaimedDividends","type":"uint256"},{"name":"_customerStoredDividends","type":"uint256"},{"name":"_customerSubdividends","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"subdividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_activationTime","type":"uint256"},{"name":"_P3D_address","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_incomingP3D","type":"uint256"},{"indexed":false,"name":"_tokensMinted","type":"uint256"},{"indexed":true,"name":"_referredBy","type":"address"}],"name":"onTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_tokensBurned","type":"uint256"},{"indexed":false,"name":"_P3D_received","type":"uint256"}],"name":"onTokenSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_P3D_reinvested","type":"uint256"},{"indexed":false,"name":"_tokensMinted","type":"uint256"}],"name":"onReinvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_ETH_reinvested","type":"uint256"},{"indexed":false,"name":"_tokensMinted","type":"uint256"}],"name":"onSubdivsReinvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_P3D_withdrawn","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_ETH_withdrawn","type":"uint256"}],"name":"onSubdivsWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_customerAddress","type":"address"},{"indexed":false,"name":"_registeredName","type":"string"}],"name":"onNameRegistration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tokenOwner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_tokens","type":"uint256"}],"name":"Approval","type":"event"}]

Contract Creation Code
60c0604052600660808190527f506f57483444000000000000000000000000000000000000000000000000000060a0908152620000409160009190620003f2565b506040805180820190915260038082527f503444000000000000000000000000000000000000000000000000000000000060209092019182526200008791600191620003f2565b5069021e19e0c9bab2400000600355600060048190556006819055600e556011805460ff19166001179055348015620000bf57600080fd5b50604051604080620037b08339810160405280516020909101516007805433600160a060020a0319918216179091556008839055600160165560148054909116600160a060020a03831617905560006200012a67a688906bd8b0000064010000000062000190810204565b9150670de0b6b3a76400009050633b9aca00820204600255505060078054600160a060020a0390811660009081526010602090815260408083208054600160ff199182168117909255955490941683526005909152902080549092161790555062000497565b600080600080600080601460009054906101000a9004600160a060020a0316600160a060020a03166310d0ffdd886040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1580156200021157600080fd5b505af115801562000226573d6000803e3d6000fd5b505050506040513d60208110156200023d57600080fd5b50519350620002766200026085600a64010000000062002d89620002b682021704565b606464010000000062002db4620002f082021704565b9250620002928484640100000000620028aa6200030882021704565b9150620002a8826401000000006200031b810204565b939793965092945050505050565b600080831515620002cb5760009150620002e9565b50828202828482811515620002dc57fe5b0414620002e557fe5b8091505b5092915050565b6000808284811515620002ff57fe5b04949350505050565b6000828211156200031557fe5b50900390565b60028054600e54600092670de0b6b3a764000080840293859392633b9aca00926200039f926200038a9280890a7259aedfc10d7279c5eed14016454000000000008c020190870a909202919091019085026b06765c793fa10079d00000000201640100000000620003b3810204565b85640100000000620028aa6200030882021704565b811515620003a957fe5b0403949350505050565b80600260018201045b81811015620003ec578091506002818285811515620003d757fe5b0401811515620003e357fe5b049050620003bc565b50919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200043557805160ff191683800117855562000465565b8280016001018555821562000465579182015b828111156200046557825182559160200191906001019062000448565b506200047392915062000477565b5090565b6200049491905b808211156200047357600081556001016200047e565b90565b61330980620004a76000396000f3006080604052600436106102995763ffffffff60e060020a60003504166265318b81146102bb57806301ebccb9146102ee5780630562b9f71461038457806306fdde031461039c5780630830602b146103b1578063095ea7b3146103fd5780630f34dc161461043557806310d0ffdd1461045657806318160ddd1461048757806323b872dd1461049c57806324e34476146104c657806327defa1f146104db5780632b791d6e146104f05780632d0041c514610511578063313ce56714610537578063383bbab31461054c5780634000aea0146105a557806343a98caf146105d65780634b750334146105f057806356d399e8146106055780635c6581651461061a578063627045bf14610641578063688abbf714610659578063688eef87146106735780636e075e301461068d57806370a08231146106a5578063755d43d3146106c657806376be1585146106de5780637f873749146106ff57806381717607146107745780638328b6101461078957806384d2731c146107a15780638620410b1461088257806386aa6c091461089757806387c95058146108ac578063949e8acd146108d257806395d89b41146108e7578063a810a54c146108fc578063a9059cbb14610916578063ad7a672f1461093a578063b3f3dcf61461094f578063b84c824614610967578063b9d47fff146109c0578063bc4dd845146109d5578063c47f002714610a21578063ca03dab514610a7a578063cae9ca5114610a92578063cc7e74b314610ac3578063d3fb447c14610add578063d6349dd614610afe578063dd62ed3e14610b1f578063e4849b3214610b46578063e62d809d14610b5e578063e6c91a1514610b7f578063ed88c68e14610b99578063f088d54714610ba1578063f4c3f3f714610bb5578063f545118b14610c1d575b601454600160a060020a031633146102b9576102b733346000610c3e565b505b005b3480156102c757600080fd5b506102dc600160a060020a03600435166111e3565b60408051918252519081900360200190f35b3480156102fa57600080fd5b5061030f600160a060020a036004351661121e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610349578181015183820152602001610331565b50505050905090810190601f1680156103765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561039057600080fd5b506102b96004356112fd565b3480156103a857600080fd5b5061030f611455565b6040805160206004803580820135601f81018490048402850184019095528484526102b99436949293602493928401919081908401838280828437509497506114e39650505050505050565b34801561040957600080fd5b50610421600160a060020a03600435166024356116d1565b604080519115158252519081900360200190f35b34801561044157600080fd5b50610421600160a060020a0360043516611737565b34801561046257600080fd5b5061046e60043561174c565b6040805192835260208301919091528051918290030190f35b34801561049357600080fd5b506102dc61181b565b3480156104a857600080fd5b50610421600160a060020a0360043581169060243516604435611822565b3480156104d257600080fd5b506102dc6118b7565b3480156104e757600080fd5b506104216118ca565b3480156104fc57600080fd5b506102dc600160a060020a03600435166118d3565b34801561051d57600080fd5b506102b9600160a060020a03600435166024351515611909565b34801561054357600080fd5b506102dc611967565b34801561055857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b994369492936024939284019190819084018382808284375094975061196c9650505050505050565b3480156105b157600080fd5b5061042160048035600160a060020a0316906024803591604435918201910135611a06565b3480156105e257600080fd5b506102b96004351515611b27565b3480156105fc57600080fd5b506102dc611b5b565b34801561061157600080fd5b506102dc611bb5565b34801561062657600080fd5b506102dc600160a060020a0360043581169060243516611bbb565b34801561064d57600080fd5b506102b9600435611bd8565b34801561066557600080fd5b506102dc6004351515611bfe565b34801561067f57600080fd5b506102b96004351515611c31565b34801561069957600080fd5b506102b9600435611c60565b3480156106b157600080fd5b506102dc600160a060020a0360043516611d35565b3480156106d257600080fd5b506102dc600435611d50565b3480156106ea57600080fd5b50610421600160a060020a0360043516611d95565b34801561070b57600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610758943694929360249392840191908190840183828082843750949750611daa9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561078057600080fd5b506102dc611dea565b34801561079557600080fd5b506102b9600435611df0565b3480156107ad57600080fd5b506107c2600160a060020a0360043516611e28565b604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156108095781810151838201526020016107f1565b50505050905090810190601f1680156108365780820380516001836020036101000a031916815260200191505b508381038252845181528451602091820191808701910280838360005b8381101561086b578181015183820152602001610853565b505050509050019550505050505060405180910390f35b34801561088e57600080fd5b506102dc611f4d565b3480156108a357600080fd5b50610758611f9b565b3480156108b857600080fd5b506102b9600160a060020a03600435166024351515611faa565b3480156108de57600080fd5b506102dc612008565b3480156108f357600080fd5b5061030f612014565b34801561090857600080fd5b506102b9600435151561206e565b34801561092257600080fd5b50610421600160a060020a036004351660243561209d565b34801561094657600080fd5b506102dc6120cb565b34801561095b57600080fd5b506102b960043561215b565b34801561097357600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b994369492936024939284019190819084018382808284375094975061223c9650505050505050565b3480156109cc57600080fd5b506102dc612282565b6040805160206004803580820135601f81018490048402850184019095528484526102dc94369492936024939284019190819084018382808284375094975061228e9650505050505050565b348015610a2d57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b99436949293602493928401919081908401838280828437509497506122a99650505050505050565b348015610a8657600080fd5b506102b96004356122ef565b348015610a9e57600080fd5b5061042160048035600160a060020a03169060248035916044359182019101356123ec565b348015610acf57600080fd5b506102b960043515156124a4565b348015610ae957600080fd5b506102b9600160a060020a03600435166124d3565b348015610b0a57600080fd5b506102dc600160a060020a036004351661253e565b348015610b2b57600080fd5b506102dc600160a060020a0360043581169060243516612559565b348015610b5257600080fd5b506102b9600435612584565b348015610b6a57600080fd5b506102dc600160a060020a0360043516612731565b348015610b8b57600080fd5b506102b9600435151561279f565b6102b96127d4565b6102dc600160a060020a03600435166127d6565b348015610bc157600080fd5b50610bd6600160a060020a03600435166127e3565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b348015610c2957600080fd5b506102dc600160a060020a0360043516612861565b60008060008060008787610c518261288c565b1580610c755750600160a060020a03821660009081526012602052604090205460ff165b1515610c8057600080fd5b6008544210610c94576011805460ff191690555b60115460ff168015610cb2575067a688906bd8b00000816006540111155b15610fad57600160a060020a03821660009081526005602052604090205460ff1615156001148015610d075750600160a060020a0382166000908152600d6020526040902054670de0b6b3a764000090820111155b1515610d1257600080fd5b600160a060020a0382166000908152600d6020526040902054610d359082612894565b600160a060020a0383166000908152600d6020526040902055600654610d5b9082612894565b6006556004548996506000955068056bc75e2d6310000010610daf57670de0b6b3a7640000861115610d9f57670de0b6b3a76400009550610d9c89876128aa565b94505b610dab60045487612894565b6004555b6000851115610df057604051600160a060020a038b169086156108fc029087906000818181858888f19350505050158015610dee573d6000803e3d6000fd5b505b601460009054906101000a9004600160a060020a0316600160a060020a031663949e8acd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610e4357600080fd5b505af1158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b5051601454604080517ff088d547000000000000000000000000000000000000000000000000000000008152600160a060020a038c81166004830152915193975091169163f088d547918991602480830192602092919082900301818588803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b50505050506040513d6020811015610f0457600080fd5b5050601454604080517f949e8acd0000000000000000000000000000000000000000000000000000000081529051610f9992600160a060020a03169163949e8acd9160048083019260209291908290030181600087803b158015610f6757600080fd5b505af1158015610f7b573d6000803e3d6000fd5b505050506040513d6020811015610f9157600080fd5b5051856128aa565b9250610fa68a848a6128bc565b96506111d6565b60115460ff1615610fbd57600080fd5b6004548996506000955068056bc75e2d631000001061100e57670de0b6b3a7640000861115610ffe57670de0b6b3a76400009550610ffb89876128aa565b94505b61100a60045487612894565b6004555b600085111561104f57604051600160a060020a038b169086156108fc029087906000818181858888f1935050505015801561104d573d6000803e3d6000fd5b505b601460009054906101000a9004600160a060020a0316600160a060020a031663949e8acd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d60208110156110cc57600080fd5b5051601454604080517ff088d547000000000000000000000000000000000000000000000000000000008152600160a060020a038c81166004830152915193975091169163f088d547918991602480830192602092919082900301818588803b15801561113857600080fd5b505af115801561114c573d6000803e3d6000fd5b50505050506040513d602081101561116357600080fd5b5050601454604080517f949e8acd00000000000000000000000000000000000000000000000000000000815290516111c692600160a060020a03169163949e8acd9160048083019260209291908290030181600087803b158015610f6757600080fd5b92506111d38a848a6128bc565b96505b5050505050509392505050565b600160a060020a03166000908152600b6020908152604080832054600990925290912054600f54680100000000000000009102919091030490565b6060611228613237565b600160a060020a03831660009081526018602090815260408083208151808301835281548152600182018054845181870281018701909552808552919492938584019390929083018282801561129e57602002820191906000526020600020905b81548152600190910190602001808311611289575b5050505050815250509150600082602001515111156112e45760208201518251815181106112c857fe5b9060200190602002015190506112dd81612b42565b92506112f6565b60408051602081019091526000815292505b5050919050565b3361130781612cef565b60008211801561132f5750600160a060020a0381166000908152600c60205260409020548211155b1561145157600160a060020a0381166000908152600c602052604090205461135790836128aa565b600160a060020a038083166000818152600c602090815260408083209590955560145485517fa9059cbb0000000000000000000000000000000000000000000000000000000081526004810194909452602484018890529451949093169363a9059cbb936044808501949193918390030190829087803b1580156113da57600080fd5b505af11580156113ee573d6000803e3d6000fd5b505050506040513d602081101561140457600080fd5b5051151561141157600080fd5b604080518381529051600160a060020a038316917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a25b5050565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156114db5780601f106114b0576101008083540402835291602001916114db565b820191906000526020600020905b8154815290600101906020018083116114be57829003601f168201915b505050505081565b60115433906000908190819060ff1615806115165750600160a060020a03841660009081526005602052604090205460ff165b151561152157600080fd5b845160001061152f57600080fd5b662386f26fc1000034101561154357600080fd5b61155434662386f26fc100006128aa565b925061155f85612d6a565b600081815260196020526040902054909250600160a060020a03161561158457600080fd5b50600160a060020a03831660008181526018602090815260408083206001808201805491820181558086528486209091018790555460001901815585845260199092528220805473ffffffffffffffffffffffffffffffffffffffff191690931790925583111561162757604051600160a060020a0385169084156108fc029085906000818181858888f19350505050158015611625573d6000803e3d6000fd5b505b83600160a060020a03167fc3e1d9d15ccfce2072b74368e985002385d0e710113e804dc0fa242a05feb414866040518080602001828103825283818151815260200191508051906020019080838360005b83811015611690578181015183820152602001611678565b50505050905090810190601f1680156116bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050505050565b336000818152601360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60126020526000908152604090205460ff1681565b600080600080600080601460009054906101000a9004600160a060020a0316600160a060020a03166310d0ffdd886040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b1580156117b357600080fd5b505af11580156117c7573d6000803e3d6000fd5b505050506040513d60208110156117dd57600080fd5b505193506117f66117ef85600a612d89565b6064612db4565b925061180284846128aa565b915061180d82612dcb565b939793965092945050505050565b600e545b90565b600160a060020a038316600090815260136020908152604080832033845290915281205482111561185257600080fd5b600160a060020a038416600090815260136020908152604080832033845290915290205461188090836128aa565b600160a060020a03851660009081526013602090815260408083203384529091529020556118af848484612e47565b949350505050565b6000336118c3816118d3565b91505b5090565b60115460ff1681565b60006118de8261253e565b6118e7836111e3565b600160a060020a0384166000908152600c602052604090205401019050919050565b3360009081526010602052604090205460ff16806119315750600754600160a060020a031633145b151561193c57600080fd5b600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b601281565b33600080808061197b86611daa565b600160a060020a0386811691161461199257600080fd5b61199b86612d6a565b600160a060020a038616600090815260186020526040812091955090935091508190505b60018301548110156119fe57600183018054829081106119db57fe5b6000918252602090912001548414156119f6578091506119fe565b6001016119bf565b509055505050565b600160a060020a038416600090815260126020526040812054819060ff161515611a2f57600080fd5b611a39868661209d565b1515611a4457600080fd5b611a4d8661288c565b15611b1b57506040517f6be32e73000000000000000000000000000000000000000000000000000000008152336004820181815260248301879052606060448401908152606484018690528893600160a060020a03851693636be32e739390928a928a928a929091608401848480828437820191505095505050505050602060405180830381600087803b158015611ae457600080fd5b505af1158015611af8573d6000803e3d6000fd5b505050506040513d6020811015611b0e57600080fd5b50511515611b1b57600080fd5b50600195945050505050565b336000611b3382612cef565b50600160a060020a0381166000908152600c6020526040902054611b5681611c60565b505050565b600080600080600e5460001415611b7c57633b9aca00600254039350611baf565b611b8d670de0b6b3a7640000612f81565b9250611b9d6117ef846005612d89565b9150611ba983836128aa565b90508093505b50505090565b60035481565b601360209081526000928352604080842090915290825290205481565b33600081815260186020526040902060018101548310611bf757600080fd5b9190915550565b60003382611c1457611c0f816111e3565b611c28565b611c1d8161253e565b611c26826111e3565b015b91505b50919050565b336000611c3d82612ff4565b50600160a060020a038116600090815260156020526040902054611b56816122ef565b336000611c6c82612cef565b600083118015611c945750600160a060020a0382166000908152600c60205260409020548311155b15611b5657600160a060020a0382166000908152600c6020526040902054611cbc90846128aa565b600160a060020a0383166000908152600c6020526040812091909155611ce590839085906128bc565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab36153264588483604051808381526020018281526020019250505060405180910390a2505050565b600160a060020a031660009081526009602052604090205490565b600080600080600e548511151515611d6757600080fd5b611d7085612f81565b9250611d806117ef846005612d89565b9150611d8c83836128aa565b95945050505050565b60106020526000908152604090205460ff1681565b600080600083511115611de157611dc083612d6a565b600081815260196020526040902054600160a060020a031692509050611c2b565b60009150611c2b565b60085481565b3360009081526010602052604090205460ff1680611e185750600754600160a060020a031633145b1515611e2357600080fd5b600355565b6000606080611e35613237565b600160a060020a03851660009081526018602090815260408083208151808301835281548152600182018054845181870281018701909552808552869592948584019390929190830182828015611eac57602002820191906000526020600020905b81548152600190910190602001808311611e97575b5050505050815250509250826020015151915081604051908082528060200260200182016040528015611ee9578160200160208202803883390190505b509350600090505b81811015611f34576020830151805182908110611f0a57fe5b906020019060200201518482815181101515611f2257fe5b60209081029091010152600101611ef1565b82519550611f418761121e565b94505050509193909250565b600080600080600e5460001415611f6e57633b9aca00600254019350611baf565b611f7f670de0b6b3a7640000612f81565b9250611f8f6117ef84600a612d89565b9150611ba98383612894565b601454600160a060020a031690565b3360009081526010602052604090205460ff1680611fd25750600754600160a060020a031633145b1515611fdd57600080fd5b600160a060020a03919091166000908152601060205260409020805460ff1916911515919091179055565b6000336118c381611d35565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156114db5780601f106114b0576101008083540402835291602001916114db565b33600061207a82612cef565b50600160a060020a0381166000908152600c6020526040902054611b56816112fd565b60008060006120aa612008565b116120b457600080fd5b50336120c1818585612e47565b91505b5092915050565b601454604080517f949e8acd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163949e8acd91600480830192602092919082900301818787803b15801561212a57600080fd5b505af115801561213e573d6000803e3d6000fd5b505050506040513d602081101561215457600080fd5b5051905090565b33600061216782612ff4565b60008311801561218f5750600160a060020a0382166000908152601560205260409020548311155b15611b5657600160a060020a0382166000908152601560205260409020546121b790846128aa565b600160a060020a0383166000908152601560205260409020556017546121dd90846128aa565b6017556121ec82846000610c3e565b905081600160a060020a03167f87cd5a7418500f46cf5a9adb4d803b7dac3c4a01c768df464c8e137c0b6c339c8483604051808381526020018281526020019250505060405180910390a2505050565b3360009081526010602052604090205460ff16806122645750600754600160a060020a031633145b151561226f57600080fd5b805161145190600190602084019061324f565b6000336118c381612861565b60006122a3333461229e85611daa565b610c3e565b92915050565b3360009081526010602052604090205460ff16806122d15750600754600160a060020a031633145b15156122dc57600080fd5b805161145190600090602084019061324f565b336122f981612ff4565b6000821180156123215750600160a060020a0381166000908152601560205260409020548211155b1561145157600160a060020a03811660009081526015602052604090205461234990836128aa565b600160a060020a03821660009081526015602052604090205560175461236f90836128aa565b601755604051600160a060020a0382169083156108fc029084906000818181858888f193505050501580156123a8573d6000803e3d6000fd5b50604080518381529051600160a060020a038316917fa84055832206cb61ec6fe97b8a159f93fb27c80ff52b2c8b7d633ba61a00245f919081900360200190a25050565b6000806123f986866116d1565b151561240457600080fd5b61240d8661288c565b15611b1b57506040517f332bb4c1000000000000000000000000000000000000000000000000000000008152336004820181815260248301879052606060448401908152606484018690528893600160a060020a0385169363332bb4c19390928a928a928a929091608401848480828437820191505095505050505050602060405180830381600087803b158015611ae457600080fd5b3360006124b082612ff4565b50600160a060020a038116600090815260156020526040902054611b568161215b565b3360009081526010602052604090205460ff16806124fb5750600754600160a060020a031633145b151561250657600080fd5b61250f8161288c565b151561251a57600080fd5b600160a060020a03166000908152601260205260409020805460ff19166001179055565b600160a060020a03166000908152600a602052604090205490565b600160a060020a03918216600090815260136020908152604080832093909416825291909152205490565b6000806000806000806000612597612008565b116125a157600080fd5b3395506125ad86612ff4565b600160a060020a0386166000908152600960205260409020548711156125d257600080fd5b8694506125de85612f81565b93506125ee6117ef856005612d89565b92506125fa84846128aa565b9150612608600e54866128aa565b600e55600160a060020a03861660009081526009602052604090205461262e90866128aa565b600160a060020a038716600090815260096020908152604080832093909355600f54600b909152918120805492880268010000000000000000860201928390039055600e5491925010156126a4576126a0600f54600e5468010000000000000000860281151561269a57fe5b04612894565b600f555b60408051868152602081018490528151600160a060020a038916927fc4823739c5787d2ca17e404aa47d5569ae71dfb49cbf21b3f6152ed238a31139928290030190a2604080518681529051600091600160a060020a038916917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350505050505050565b600160a060020a0381166000908152601560205260408120600101541561279757600160a060020a0382166000908152601560205260409020600101546016546801000000000000000091900361278784611d35565b0281151561279157fe5b046122a3565b506000919050565b33600081815260096020526040812054908111156127c0576127c081612584565b6127ca600161206e565b611b566001611c31565b565b60006122a3333484610c3e565b60008060008060008060008060006127f961181b565b98506128036120cb565b975061280d611f4d565b9650612817611b5b565b955060085494506128278a611d35565b93506128328a61253e565b61283b8b6111e3565b0192506128478a6118d3565b91506128528a612861565b90509193959799909294969850565b600160a060020a0381166000908152601560205260408120546122a39061288784612731565b612894565b6000903b1190565b6000828201838110156128a357fe5b9392505050565b6000828211156128b657fe5b50900390565b60008060008060008060006128d08a612ff4565b6128de6117ef8a600a612d89565b95506128eb866003612db4565b94506128f786866128aa565b935061290389876128aa565b925061290e83612dcb565b9150506801000000000000000083026000821180156129375750600e546129358382612894565b115b151561294257600080fd5b600160a060020a0388161580159061296c575089600160a060020a031688600160a060020a031614155b80156129925750600354600160a060020a03891660009081526009602052604090205410155b156129d857600160a060020a0388166000908152600a60205260409020546129ba9086612894565b600160a060020a0389166000908152600a60205260409020556129f2565b6129e28486612894565b9350506801000000000000000083025b6000600e541115612a5457612a09600e5483612894565b600e819055680100000000000000008502811515612a2357fe5b600f8054929091049091019055600e54680100000000000000008502811515612a4857fe5b04820281039003612a5a565b600e8290555b600160a060020a038a16600090815260096020526040902054612a7d9083612894565b600160a060020a038b8116600081815260096020908152604080832095909555600f54600b825291859020805492880287900390920190915583518d81529081018690528351928c169391927f022c0d992e4d873a3748436d960d5140c1f9721cf73f7ca5ec679d3d9f4fe2d5929181900390910190a3604080518381529051600160a060020a038c16916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35098975050505050505050565b6040805160208082528183019092526060918291600091829182918591908082016104008038833901905050945060009350600092505b6020831015612c05576008830260020a870291507fff00000000000000000000000000000000000000000000000000000000000000821615612bfa578451600185019483918791908110612bc957fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600190920191612b79565b836040519080825280601f01601f191660200182016040528015612c33578160200160208202803883390190505b509050600092505b83831015612ce5578483815181101515612c5157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028184815181101515612caa57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190920191612c3b565b9695505050505050565b6000612cfa826111e3565b600160a060020a0383166000908152600b602090815260408083208054680100000000000000008602019055600a8252808320805490849055600c9092529091205491019150612d4a9082612894565b600160a060020a039092166000908152600c602052604090209190915550565b805160009082901515612d805760009150611c2b565b50506020015190565b600080831515612d9c57600091506120c4565b50828202828482811515612dac57fe5b04146128a357fe5b6000808284811515612dc257fe5b04949350505050565b60028054600e54600092670de0b6b3a764000080840293859392633b9aca0092612e3492612e2e9280890a7259aedfc10d7279c5eed14016454000000000008c020190870a909202919091019085026b06765c793fa10079d00000000201613202565b856128aa565b811515612e3d57fe5b0403949350505050565b600160a060020a038316600090815260096020526040812054821115612e6c57600080fd5b612e7584612ff4565b612e7e83612ff4565b6000612e898561253e565b612e92866111e3565b011115612ea257612ea284612cef565b600160a060020a038416600090815260096020526040902054612ec590836128aa565b600160a060020a038086166000908152600960205260408082209390935590851681522054612ef49083612894565b600160a060020a03848116600081815260096020908152604080832095909555600f8054948a16808452600b83528684208054968a02909603909555548383529185902080549288029092019091558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600e54600090670de0b6b3a7640000808401918101908390612fe186633b9aca00838604633b9aca00026002540103026002670de0b6b3a7640000876002890a03811515612fcb57fe5b04633b9aca0002811515612fdb57fe5b046128aa565b811515612fea57fe5b0495945050505050565b601454604080517f688abbf7000000000000000000000000000000000000000000000000000000008152600160048201529051600092839283928392600160a060020a03169163688abbf791602480830192602092919082900301818787803b15801561306057600080fd5b505af1158015613074573d6000803e3d6000fd5b505050506040513d602081101561308a57600080fd5b505111156130fe57601460009054906101000a9004600160a060020a0316600160a060020a0316633ccfd60b6040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156130e557600080fd5b505af11580156130f9573d6000803e3d6000fd5b505050505b6017543031935083118015613119575061311661181b565b15155b1561315e5761312a836017546128aa565b91506131556016546128876131488568010000000000000000612d89565b61315061181b565b612db4565b60165560178390555b600160a060020a03841660009081526015602052604090206001015415156131a057601654600160a060020a0385166000908152601560205260409020600101555b6131a984612731565b905060008111156131fc57600160a060020a0384166000908152601560205260409020546131d79082612894565b600160a060020a03851660009081526015602052604090209081556016546001909101555b50505050565b80600260018201045b81811015611c2b57809150600281828581151561322457fe5b040181151561322f57fe5b04905061320b565b60408051808201909152600081526060602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061329057805160ff19168380011785556132bd565b828001600101855582156132bd579182015b828111156132bd5782518255916020019190600101906132a2565b506118c69261181f9250905b808211156118c657600081556001016132c95600a165627a7a72305820a97d163bc012d67a66350ff5dbfae0a464d39535e7d4319cb913b2a1cd18ecdf0029000000000000000000000000000000000000000000000000000000005bff4820000000000000000000000000b3775fb83f7d12a36e0475abdd1fca35c091efbe


    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000005bff4820000000000000000000000000b3775fb83f7d12a36e0475abdd1fca35c091efbe

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000005bff4820
Arg [1] : 000000000000000000000000b3775fb83f7d12a36e0475abdd1fca35c091efbe


   Swarm Source:
bzzr://a97d163bc012d67a66350ff5dbfae0a464d39535e7d4319cb913b2a1cd18ecdf
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.