Contract Overview
Balance: 0.0438935 Ether
Transactions: 17 txns
 Latest 17 txns

TxHash Age From To Value [TxFee]
0x4a736d4c5edb1817bf818732873c8f933584fd7d36e17b6a6af17acdda513e96304 days 20 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00136678
0x35ed8a4cfa86918093088502d0f8c5f8a2e3c693e82465f5c6d6ce4c4dd4b438304 days 20 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00153356
0xa01d79e3ac902d757ddf53ec4118b75efb74ec1858801a8c3472d32c445504ad304 days 20 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.0014088
0xd56b45c6467a473c6706497ef6e1aab42a0f8f2acf5fa395014595574950fb25304 days 20 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.0014088
0x0758f43ae19642ee7afa09b0b86dba439b66c25ddb5f40b8639d4db0ae21a6b1304 days 20 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.0016176
0x71d6cd530a3d90ba5a6cc5dc6ff69c5ee0be80066c59cf15a18d2e4e93432cb6324 days 33 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.0014787
0xfc5a111f3daa7715a34853dbc14dcf26c18f8b2186fc25641a1ea252fb1292de324 days 35 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00135586
0x32cb7f134be6b4f414a65df22d01044d38a5244c501c8b899d8888c1a3e92dc2333 days 4 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00139852
0x193a9e5dc2197450479e81e66d6fa2831f2d49089426dc6dbc21977532c5a032333 days 4 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00159704
0xc3e8d5b6a114b3b288898e0631728ec3408ea7bebff7f175d6969376431b09ee333 days 4 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.001513
0xbf0c457e08ebe887792b6fef61f474faff4199c81d9883527e07432402ed8b3d335 days 33 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.0013565
0x99ebbdb277a31ad36d91ba6c06aabd3fde8280b17b2f82a8109b957b6f933759359 days 22 hrs ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00135586
0xd668d294497f741ecf2f1829d5545113377a7c3d252b55daa67657f283f0e5ad360 days 24 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00139852
0xc36418a83a8f11a6af11d8b524836911c3dec24880eb134c41ade6b46dbf7fa3360 days 30 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00162142
0x1e3221aaea03c99c3d85dbe2b161ab96f8cdf813c37344357919362a339f8ae8360 days 34 mins ago0x854bd635fd4e8684a326664e0698c8fefae6dd97  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00193938
0x08bd36c5cb6c2719b5f144d67761b8c96ea8afc2cf5f8c3336aba086fa3c87c4360 days 55 mins ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x2122de8993b3c5a4036f245225126ff3c9a4037a0 Ether0.00087844
0xef01699a343d32b6f791a4bd57bd0393c38ccf525d9bdc8f45c9ad51e5556d5c360 days 1 hr ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN    Contract Creation0 Ether0.03496784
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0x295c88119c627a72c78be47cd4dd6529cafaee613c57929da8bf9eace8141d0b1604068304 days 20 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0x295c88119c627a72c78be47cd4dd6529cafaee613c57929da8bf9eace8141d0b1604068304 days 20 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0x9bb91461550cc30f6975bf6643aad18b80bcdb183c4588474225b3b1895a4ac21604068304 days 20 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0x9bb91461550cc30f6975bf6643aad18b80bcdb183c4588474225b3b1895a4ac21604068304 days 20 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0xe49d31bd42c1f512368df2a2b02a887bbe5e91f173b2574e269bfd08ea8a1f2a1604027304 days 20 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xe49d31bd42c1f512368df2a2b02a887bbe5e91f173b2574e269bfd08ea8a1f2a1604027304 days 20 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0x15edbb02a5804677c505e686a0039aebb294c2e8723a5e928288d412266513221604024304 days 20 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0x15edbb02a5804677c505e686a0039aebb294c2e8723a5e928288d412266513221604024304 days 20 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0x0a877815cedac1d56395f2546b7186fb60313c9d2ae5bd067b0a7181fc2cf1671604021304 days 20 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0x0a877815cedac1d56395f2546b7186fb60313c9d2ae5bd067b0a7181fc2cf1671604021304 days 20 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0xb92c42cab07f7c194b1c4ebb4cb85965885d9e309ab9d968fd1fb48ddd99c1091493688324 days 33 mins ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xb92c42cab07f7c194b1c4ebb4cb85965885d9e309ab9d968fd1fb48ddd99c1091493688324 days 33 mins ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0xcf659f8bc0ad3d8da2b08a1b8037b3987f7f63cbcc7d9c3071ba4f3789732c571493678324 days 36 mins ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xcf659f8bc0ad3d8da2b08a1b8037b3987f7f63cbcc7d9c3071ba4f3789732c571493678324 days 36 mins ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0xe57a9695dddc3ee2905ea20d88218a83d674b313542b11aa2be5666fe94f68101441415333 days 4 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xe57a9695dddc3ee2905ea20d88218a83d674b313542b11aa2be5666fe94f68101441415333 days 4 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0x0751a4005d7aa9dbc3fbd6158c432076dfb4fd9651c23bf3e38fa804fdd3915b1441412333 days 4 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0x0751a4005d7aa9dbc3fbd6158c432076dfb4fd9651c23bf3e38fa804fdd3915b1441412333 days 4 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.0040355 Ether
0xd0025cb99d6386633b3a0789f63c5ea50a244a258bb56ad31c70089a18ab98ed1441406333 days 4 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xd0025cb99d6386633b3a0789f63c5ea50a244a258bb56ad31c70089a18ab98ed1441406333 days 4 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.02 Ether
0xbce0891f5b046be0f5bfdeca41594647e2237be6c5e546a05194f7fb93bbf62e1430949335 days 34 mins ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xbce0891f5b046be0f5bfdeca41594647e2237be6c5e546a05194f7fb93bbf62e1430949335 days 34 mins ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.014 Ether
0xa0d7841a3fbc2e2e53d39e753f308638c8f45a3cfb1200390dd36e2b797b76131287908359 days 22 hrs ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
0xa0d7841a3fbc2e2e53d39e753f308638c8f45a3cfb1200390dd36e2b797b76131287908359 days 22 hrs ago0x2125b719774bd23484bcf8b36140c8d10e1768190x2122de8993b3c5a4036f245225126ff3c9a4037a0.02 Ether
0x186e32ae3e0b72ad2ab369a13dc5af214ceaa5b99f9fbc1df1fe77d41fb5d3801287409360 days 25 mins ago0x2122de8993b3c5a4036f245225126ff3c9a4037a0x61048b56d6e4fca6a1f6b5dac76255a413f37f4c0.0040355 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Pricer
Compiler Text: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.16;

/** @title owned. */
contract owned  {
  address owner;
  function owned() {
    owner = msg.sender;
  }
  function changeOwner(address newOwner) onlyOwner {
    owner = newOwner;
  }
  modifier onlyOwner() {
    if (msg.sender==owner) 
    _;
  }
}

/** @title mortal. */
contract mortal is owned() {
  function kill() onlyOwner {
    if (msg.sender == owner) selfdestruct(owner);
  }
}
 

// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize SRL
Copyright (c) 2016 Oraclize LTD


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

/** @title OraclizeI. */
contract OraclizeI {
    address public cbAddress;
    function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id);
    function queryN(uint _timestamp, string _datasource, bytes _argN) payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) payable returns (bytes32 _id);
    function getPrice(string _datasource) returns (uint _dsprice);
    function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);
    function useCoupon(string _coupon);
    function setProofType(byte _proofType);
    function setConfig(bytes32 _config);
    function setCustomGasPrice(uint _gasPrice);
    function randomDS_getSessionPubKeyHash() returns(bytes32);
}
/** @title OraclizeAddrResolverI. */
contract OraclizeAddrResolverI {
    function getAddress() returns (address _addr);
}
/** @title usingOraclize. */
contract usingOraclize {
    uint constant day = 60*60*24;
    uint constant week = 60*60*24*7;
    uint constant month = 60*60*24*30;
    byte constant proofType_NONE = 0x00;
    byte constant proofType_TLSNotary = 0x10;
    byte constant proofType_Android = 0x20;
    byte constant proofType_Ledger = 0x30;
    byte constant proofType_Native = 0xF0;
    byte constant proofStorage_IPFS = 0x01;
    uint8 constant networkID_auto = 0;
    uint8 constant networkID_mainnet = 1;
    uint8 constant networkID_testnet = 2;
    uint8 constant networkID_morden = 2;
    uint8 constant networkID_consensys = 161;

    OraclizeAddrResolverI OAR;

    OraclizeI oraclize;
    modifier oraclizeAPI {
        if((address(OAR)==0)||(getCodeSize(address(OAR))==0)) oraclize_setNetwork();
        oraclize = OraclizeI(OAR.getAddress());
        _;
    }
    modifier coupon(string code){
        oraclize = OraclizeI(OAR.getAddress());
        oraclize.useCoupon(code);
        _;
    }

    function oraclize_setNetwork() internal returns(bool){
        if (getCodeSize(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed)>0){ //mainnet
            OAR = OraclizeAddrResolverI(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed);
            oraclize_setNetworkName("eth_mainnet");
            return true;
        }
        if (getCodeSize(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1)>0){ //ropsten testnet
            OAR = OraclizeAddrResolverI(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1);
            oraclize_setNetworkName("eth_ropsten3");
            return true;
        }
        if (getCodeSize(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e)>0){ //kovan testnet
            OAR = OraclizeAddrResolverI(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e);
            oraclize_setNetworkName("eth_kovan");
            return true;
        }
        if (getCodeSize(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48)>0){ //rinkeby testnet
            OAR = OraclizeAddrResolverI(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48);
            oraclize_setNetworkName("eth_rinkeby");
            return true;
        }
        if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge
            OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475);
            return true;
        }
        if (getCodeSize(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF)>0){ //ether.camp ide
            OAR = OraclizeAddrResolverI(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF);
            return true;
        }
        if (getCodeSize(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA)>0){ //browser-solidity
            OAR = OraclizeAddrResolverI(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA);
            return true;
        }
        return false;
    }

   function oraclize_getPrice(string datasource) oraclizeAPI internal returns (uint){
       return oraclize.getPrice(datasource);
   }

   function oraclize_getPrice(string datasource, uint gaslimit) oraclizeAPI internal returns (uint){
       return oraclize.getPrice(datasource, gaslimit);
   }
   
	function oraclize_setCustomGasPrice(uint gasPrice) oraclizeAPI internal { 
        return oraclize.setCustomGasPrice(gasPrice); 
	}     


    function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query.value(price)(timestamp, datasource, arg);
    }
    function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit);
    }


    function oraclize_cbAddress() oraclizeAPI internal returns (address){
        return oraclize.cbAddress();
    }
    function oraclize_setProof(byte proofP) oraclizeAPI internal {
        return oraclize.setProofType(proofP);
    }

    function getCodeSize(address _addr) constant internal returns(uint _size) {
        assembly {
            _size := extcodesize(_addr)
        }
    }
        
    string oraclize_network_name;
    function oraclize_setNetworkName(string _network_name) internal {
        oraclize_network_name = _network_name;
    }
    
    function oraclize_getNetworkName() internal returns (string) {
        return oraclize_network_name;
    }
        
}
// </ORACLIZE_API>

/** @title DSParser. */
contract DSParser{
    uint8 constant WAD_Dec=18;
    uint128 constant WAD = 10 ** 18;
    function parseInt128(string _a)  constant  returns (uint128) { 
		return cast(parseInt( _a, WAD_Dec));
    }
    function cast(uint256 x) constant internal returns (uint128 z) {
        assert((z = uint128(x)) == x);
    }
    function parseInt(string _a, uint _b)  
			constant 
			returns (uint) { 
		/** @dev Turns a string into a number with _b places
          * @param _a String to be processed, e.g. "0.002"
          * @param _b number of decimal places
          * @return uint of the decimal representation
        */
			bytes memory bresult = bytes(_a);
            uint mint = 0;
            bool decimals = false;
            for (uint i=0; i<bresult.length; i++){
                if ((bresult[i] >= 48)&&(bresult[i] <= 57)){
                    if (decimals){
                       if (_b == 0){
                        //Round up if next value is 5 or greater
                        if(uint(bresult[i])- 48>4){
                            mint = mint+1;
                        }    
                        break;
                       }
                       else _b--;
                    }
                    mint *= 10;
                    mint += uint(bresult[i]) - 48;
                } else if (bresult[i] == 46||bresult[i] == 44) { // cope with euro decimals using commas
                    decimals = true;
                }
            }
            if (_b > 0) mint *= 10**_b;
           return mint;
    }
	
}

/** @title I_minter. */
contract I_minter { 
    event EventCreateStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventCreateRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventBankrupt();
	
    function Leverage() constant returns (uint128)  {}
    function RiskPrice(uint128 _currentPrice,uint128 _StaticTotal,uint128 _RiskTotal, uint128 _ETHTotal) constant returns (uint128 price)  {}
    function RiskPrice(uint128 _currentPrice) constant returns (uint128 price)  {}     
    function PriceReturn(uint _TransID,uint128 _Price) {}
    function NewStatic() external payable returns (uint _TransID)  {}
    function NewStaticAdr(address _Risk) external payable returns (uint _TransID)  {}
    function NewRisk() external payable returns (uint _TransID)  {}
    function NewRiskAdr(address _Risk) external payable returns (uint _TransID)  {}
    function RetRisk(uint128 _Quantity) external payable returns (uint _TransID)  {}
    function RetStatic(uint128 _Quantity) external payable returns (uint _TransID)  {}
    function Strike() constant returns (uint128)  {}
}

/** @title I_Pricer. */
contract I_Pricer {
    uint128 public lastPrice;
    uint public constant DELAY = 1 ;//days this needs to be a day on the mainnet
    I_minter public mint;
    string public sURL;//="json(https://api.kraken.com/0/public/Ticker?pair=ETHEUR).result.XETHZEUR.p.1";
    mapping (bytes32 => uint) RevTransaction;
    function setMinter(address _newAddress) {}
    function __callback(bytes32 myid, string result) {}
    function queryCost() constant returns (uint128 _value) {}
    function QuickPrice() payable {}
    function requestPrice(uint _actionID) payable returns (uint _TrasID){}
    function collectFee() returns(bool) {}
    function () {
        //if ether is sent to this address, send it back.
        revert();
    }
}

/** @title Pricer. */
contract Pricer is I_Pricer, 
	mortal, 
	usingOraclize, 
	DSParser {
    // https://api.kraken.com/
    // <pair_name> = pair name
    // a = ask array(<price>, <whole lot volume>, <lot volume>),
    // b = bid array(<price>, <whole lot volume>, <lot volume>),
    // c = last trade closed array(<price>, <lot volume>),
    // v = volume array(<today>, <last 24 hours>),
    // p = volume weighted average price array(<today>, <last 24 hours>),
    // t = number of trades array(<today>, <last 24 hours>),
    // l = low array(<today>, <last 24 hours>),
    // h = high array(<today>, <last 24 hours>),
    // o = today's opening price
	
    function Pricer(string _URL) {
		/** @dev Constructor, allows the pricer URL to be set
          	* @param _URL of the web query
          	* @return nothing
        	*/
	oraclize_setNetwork();
	sURL=_URL;
    }

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

    function setMinter(address _newAddress) 
		onlyOwner {
		/** @dev Allows the address of the minter to be set
          	* @param _newAddress Address of the minter
          	* @return nothing
        	*/
        mint=I_minter(_newAddress);
    }

    function queryCost() 
		constant 
		returns (uint128 _value) {
		/** @dev ETH cost of calling the oraclize 
          	* @param _newAddress Address of the minter
          	* @return nothing
        	*/
	return cast(oraclize_getPrice("URL")); 
    }

    function QuickPrice() 
		payable {
		/** @dev Gets the latest price.  Be careful, All eth sent is kept by the contract.
         	 * @return nothing, but the new price will be stored in variable lastPrice
        	*/
        bytes32 TrasID =oraclize_query(1, "URL", sURL);
        RevTransaction[TrasID]=0;
    }
	
    function __callback(bytes32 myid, string result) {
		/** @dev ORACLIZE standard callback function-
         	 * @param myid Pricer transaction ID
		 * @param result Address of the minter
         	 * @return calls minter.PriceReturn() with the price
        	*/
        if (msg.sender != oraclize_cbAddress()) revert(); // Only oraclize
        bytes memory tempEmptyStringTest = bytes(result); // Array uses memory
        if (tempEmptyStringTest.length == 0) {
             lastPrice =  0;  //0 is taken to be an error by the minter contract
        } else {
            lastPrice =  parseInt128(result);  //convert the string into a 18 decimal place number
        }
        if(RevTransaction[myid]>0){  //if it's not from QuickPrice
            mint.PriceReturn(RevTransaction[myid],lastPrice);  //Call the minter
        }
        delete RevTransaction[myid]; // free up the memory
    }

    function setGas(uint gasPrice) 
		onlyOwner 
		returns(bool) {
		/** @dev Allows oraclize gas cost to be changed
          	* @return True if sucessful
        	*/
		oraclize_setCustomGasPrice(gasPrice);
		return true;
    }
	
    function collectFee() 
		onlyOwner 
		returns(bool) {
		/** @dev Allows ETH to be removed from this contract (only this one, not the minter)
        	  * @return True if sucessful
        	*/
        	return owner.send(this.balance);
		return true;
    }
	
    modifier onlyminter() {
      		if (msg.sender==address(mint)) 
      		_;
    }

    function requestPrice(uint _actionID) 
		payable 
		onlyminter 
		returns (uint _TrasID){
		/** @dev Minter only function.  Needs to be called with enough eth.
          	* @param _actionID minter action requested (mint/melt static/risk)
          	* @return _TrasID the Oraclize query which calls __callback() sending the price to minter.PriceReturn() 
        	*/
        	// 
        bytes32 TrasID;
        TrasID=oraclize_query(DELAY, "URL", sURL);
        RevTransaction[TrasID]=_actionID;
	_TrasID=uint(TrasID);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"lastPrice","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mint","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sURL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_a","type":"string"},{"name":"_b","type":"uint256"}],"name":"parseInt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_actionID","type":"uint256"}],"name":"requestPrice","outputs":[{"name":"_TrasID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"collectFee","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"QuickPrice","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"gasPrice","type":"uint256"}],"name":"setGas","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_a","type":"string"}],"name":"parseInt128","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAddress","type":"address"}],"name":"setMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"queryCost","outputs":[{"name":"_value","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_URL","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
606060405234156200001057600080fd5b60405162001ae838038062001ae88339810160405280805160048054600160a060020a03191633600160a060020a0316179055919091019050620000616401000000006200007f8102620011a91704565b506002818051620000779291602001906200047c565b50506200051e565b600080620000af731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed640100000000620011a56200045f82021704565b1115620001315760058054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed1790556200012860408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152640100000000620014cd6200046382021704565b5060016200045c565b60006200016073c03a2615d5efaf5f49f60b7bb6583eaec212fdf1640100000000620011a56200045f82021704565b1115620001d95760058054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf11790556200012860408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152640100000000620014cd6200046382021704565b60006200020873b7a07bcf2ba2f2703b24c0691b5278999c59ac7e640100000000620011a56200045f82021704565b1115620002815760058054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e1790556200012860408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152640100000000620014cd6200046382021704565b6000620002b073146500cfd35b22e4a392fe0adc06de1a1368ed48640100000000620011a56200045f82021704565b1115620003295760058054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed481790556200012860408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152640100000000620014cd6200046382021704565b600062000358736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475640100000000620011a56200045f82021704565b11156200038e575060058054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47517905560016200045c565b6000620003bd7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf640100000000620011a56200045f82021704565b1115620003f3575060058054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016200045c565b6000620004227351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa640100000000620011a56200045f82021704565b111562000458575060058054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa17905560016200045c565b5060005b90565b3b90565b6007818051620004789291602001906200047c565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004bf57805160ff1916838001178555620004ef565b82800160010185558215620004ef579182015b82811115620004ef578251825591602001919060010190620004d2565b50620004fd92915062000501565b5090565b6200045c91905b80821115620004fd576000815560010162000508565b6115ba806200052e6000396000f3006060604052600436106100c15763ffffffff60e060020a600035041663053f14da81146100d15780631249c58b1461010957806327dc297e1461013857806341c0e1b514610190578063452e0d25146101a357806369b411701461022d578063a6f9dae114610252578063bf4d89b514610271578063cd7c92e3146102c4578063d4d5d32a146102cf578063dc201838146102f6578063dd51faa2146102fe578063f56c66b114610314578063fca3b5aa14610365578063fd557d3914610384575b34156100cc57600080fd5b600080fd5b34156100dc57600080fd5b6100e4610397565b6040516fffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561011457600080fd5b61011c6103af565b604051600160a060020a03909116815260200160405180910390f35b341561014357600080fd5b61018e600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506103be95505050505050565b005b341561019b57600080fd5b61018e610516565b34156101ae57600080fd5b6101b6610554565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101f25780820151838201526020016101da565b50505050905090810190601f16801561021f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561023857600080fd5b6102406105f2565b60405190815260200160405180910390f35b341561025d57600080fd5b61018e600160a060020a03600435166105f7565b341561027c57600080fd5b61024060046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650509335935061062d92505050565b61024060043561080a565b34156102da57600080fd5b6102e261091e565b604051901515815260200160405180910390f35b61018e61096b565b341561030957600080fd5b6102e2600435610a25565b341561031f57600080fd5b6100e460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610a5195505050505050565b341561037057600080fd5b61018e600160a060020a0360043516610a6c565b341561038f57600080fd5b6100e4610aa3565b6000546fffffffffffffffffffffffffffffffff1681565b600154600160a060020a031681565b6103c66114e4565b6103ce610ae9565b600160a060020a031633600160a060020a03161415156103ed57600080fd5b50808051151561041557600080546fffffffffffffffffffffffffffffffff19169055610451565b61041e82610a51565b600080546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff929092169190911790555b600083815260036020526040812054111561050357600154600084815260036020526040808220549154600160a060020a039093169263e5d02cd092916fffffffffffffffffffffffffffffffff909116905160e060020a63ffffffff851602815260048101929092526fffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b15156104ee57600080fd5b6102c65a03f115156104ff57600080fd5b5050505b5050600090815260036020526040812055565b60045433600160a060020a03908116911614156105525760045433600160a060020a039081169116141561055257600454600160a060020a0316ff5b565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ea5780601f106105bf576101008083540402835291602001916105ea565b820191906000526020600020905b8154815290600101906020018083116105cd57829003601f168201915b505050505081565b600181565b60045433600160a060020a039081169116141561062a5760048054600160a060020a031916600160a060020a0383161790555b50565b60006106376114e4565b5082600080805b83518110156107ed577f300000000000000000000000000000000000000000000000000000000000000084828151811061067457fe5b016020015160f860020a900460f860020a02600160f860020a031916101580156106e557507f39000000000000000000000000000000000000000000000000000000000000008482815181106106c657fe5b016020015160f860020a900460f860020a02600160f860020a03191611155b1561077257811561073b57851515610733576004603085838151811061070757fe5b016020015160f860020a900460f860020a0260f860020a900403111561072e578260010192505b6107ed565b600019909501945b600a83029250603084828151811061074f57fe5b016020015160f860020a900460f860020a0260f860020a900403830192506107e5565b83818151811061077e57fe5b016020015160f860020a900460f860020a02600160f860020a031916602e60f860020a0214806107db57508381815181106107b557fe5b016020015160f860020a900460f860020a02600160f860020a031916602c60f860020a02145b156107e557600191505b60010161063e565b60008611156107ff5785600a0a830292505b509095945050505050565b600154600090819033600160a060020a03908116911614156109185761090160016040805190810160405280600381526020017f55524c000000000000000000000000000000000000000000000000000000000081525060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f75780601f106108cc576101008083540402835291602001916108f7565b820191906000526020600020905b8154815290600101906020018083116108da57829003601f168201915b5050505050610c02565b600081815260036020526040902084905591508190505b50919050565b60045460009033600160a060020a039081169116141561096857600454600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19450505050505b90565b6000610a1360016040805190810160405280600381526020017f55524c000000000000000000000000000000000000000000000000000000000081525060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f75780601f106108cc576101008083540402835291602001916108f7565b60009081526003602052604081205550565b60045460009033600160a060020a0390811691161415610a4c57610a4882610ef4565b5060015b919050565b6000610a66610a6183601261062d565b611002565b92915050565b60045433600160a060020a039081169116141561062a5760018054600160a060020a038316600160a060020a031990911617905550565b6000610ae4610a6160408051908101604052600381527f55524c0000000000000000000000000000000000000000000000000000000000602082015261101e565b905090565b600554600090600160a060020a03161580610b165750600554610b1490600160a060020a03166111a5565b155b15610b2557610b236111a9565b505b600554600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610b6d57600080fd5b6102c65a03f11515610b7e57600080fd5b505050604051805160068054600160a060020a031916600160a060020a03928316179081905516905063c281d19e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610be357600080fd5b6102c65a03f11515610bf457600080fd5b505050604051805191505090565b6005546000908190600160a060020a03161580610c315750600554610c2f90600160a060020a03166111a5565b155b15610c4057610c3e6111a9565b505b600554600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c8857600080fd5b6102c65a03f11515610c9957600080fd5b505050604051805160068054600160a060020a031916600160a060020a03928316179081905516905063524f3889856000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d20578082015183820152602001610d08565b50505050905090810190601f168015610d4d5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515610d6b57600080fd5b6102c65a03f11515610d7c57600080fd5b5050506040518051915050670de0b6b3a764000062030d403a0201811115610da75760009150610eec565b600654600160a060020a031663adf59f99828787876000604051602001526040518563ffffffff1660e060020a028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e1e578082015183820152602001610e06565b50505050905090810190601f168015610e4b5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610e81578082015183820152602001610e69565b50505050905090810190601f168015610eae5780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b1515610ece57600080fd5b6125ee5a03f11515610edf57600080fd5b5050505060405180519250505b509392505050565b600554600160a060020a03161580610f1e5750600554610f1c90600160a060020a03166111a5565b155b15610f2d57610f2b6111a9565b505b600554600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f7557600080fd5b6102c65a03f11515610f8657600080fd5b505050604051805160068054600160a060020a031916600160a060020a03928316179081905516905063ca6ad1e48260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610feb57600080fd5b6102c65a03f11515610ffc57600080fd5b50505050565b806fffffffffffffffffffffffffffffffff81168114610a4c57fe5b600554600090600160a060020a0316158061104b575060055461104990600160a060020a03166111a5565b155b1561105a576110586111a9565b505b600554600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156110a257600080fd5b6102c65a03f115156110b357600080fd5b505050604051805160068054600160a060020a031916600160a060020a03928316179081905516905063524f3889836000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561113a578082015183820152602001611122565b50505050905090810190601f1680156111675780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b151561118557600080fd5b6102c65a03f1151561119657600080fd5b50505060405180519392505050565b3b90565b6000806111c9731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6111a5565b11156112395760058054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905561123160408051908101604052600b81527f6574685f6d61696e6e657400000000000000000000000000000000000000000060208201526114cd565b506001610968565b600061125873c03a2615d5efaf5f49f60b7bb6583eaec212fdf16111a5565b11156112c05760058054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905561123160408051908101604052600c81527f6574685f726f707374656e33000000000000000000000000000000000000000060208201526114cd565b60006112df73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6111a5565b11156113475760058054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905561123160408051908101604052600981527f6574685f6b6f76616e000000000000000000000000000000000000000000000060208201526114cd565b600061136673146500cfd35b22e4a392fe0adc06de1a1368ed486111a5565b11156113ce5760058054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905561123160408051908101604052600b81527f6574685f72696e6b65627900000000000000000000000000000000000000000060208201526114cd565b60006113ed736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756111a5565b1115611421575060058054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001610968565b60006114407320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6111a5565b1115611474575060058054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001610968565b60006114937351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6111a5565b11156114c7575060058054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001610968565b50600090565b60078180516114e09291602001906114f6565b5050565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061153757805160ff1916838001178555611564565b82800160010185558215611564579182015b82811115611564578251825591602001919060010190611549565b50611570929150611574565b5090565b61096891905b80821115611570576000815560010161157a5600a165627a7a72305820f130141fd8bb6752ed0e799c0ee129aa87131ca1eaf60a007a8d7b7473d3ac3700290000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004c6a736f6e2868747470733a2f2f6170692e6b72616b656e2e636f6d2f302f7075626c69632f5469636b65723f706169723d455448555344292e726573756c742e584554485a5553442e702e310000000000000000000000000000000000000000

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

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 000000000000000000000000000000000000000000000000000000000000004c
Arg [2] : 6a736f6e2868747470733a2f2f6170692e6b72616b656e2e636f6d2f302f7075
Arg [3] : 626c69632f5469636b65723f706169723d455448555344292e726573756c742e
Arg [4] : 584554485a5553442e702e310000000000000000000000000000000000000000


   Swarm Source:
bzzr://f130141fd8bb6752ed0e799c0ee129aa87131ca1eaf60a007a8d7b7473d3ac37

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward