Contract Overview
Balance: 3.7285 Ether
Transactions: 33 txns
 Latest 25 txns From a total of 33 Transactions

TxHash Age From To Value [TxFee]
0xcba2ea0c654d7471e0949f1a8adf4a6913580cf79704bff1bf53a77a1a643594136 days 7 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018825
0xd41c3e5b657e91913750d9bc060f647198648e147b607a45dce9a86c46a5cd05136 days 7 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018761
0x961c46d0b17944fa51c77afe68c2b609b745ceda99402fad399a241fc8e675d7136 days 8 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.002477
0x0754593291eb6996b3bbb5c534fdba8005d56079d2c9d5859daa8981209a8e5a136 days 8 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018761
0x4edddbc18c2b432a02a38e1603672be80a14e289caf3921cf22e91e51351609f136 days 8 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xbb33f19372eb813981e0d2b4f5e0ec570229ad6d36867ff1749e71706ec9bd8b136 days 10 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xa4a9cd4a5c0068a1be8e59d65bcee9e0b64d4dba4d029fd04560e098623b5b90136 days 10 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0x9a2a01089bfd036fa6f85fa244710dcd29793616bd60b17b300047ecac1debaa136 days 11 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xf3c635987c390be1ce2b34cfb1bec4fe5712699f63b17a98b93540a64f85b9d5137 days 5 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xd0633a9679206d17be636d55c53b5687a59800364bd07b1080efc3190f304ec1137 days 5 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0x43c4d0679ae8e202981ca656ae85588359d5118c5de4e053c867b7c4f29bbafa137 days 5 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xb815157a2f6d2c900cca94497c6b262c79caf441abbd243ab24c423f4e9291ad137 days 9 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.00247815
0xacd529e9512588893de5842ec1ef779ce3363bbae69c38c27e664eae40570b44140 days 8 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xbeff70e986c5c12ce1a1b60335c39f12ee83518cc9fe0c08151db715c6bf65e7140 days 8 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0xbd80c46454d27db4a96e6ec67ff515f6d1b3b6a250083f7ba42acaa02a3bffec141 days 9 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.00247815
0x3c64eed7c62faac81169cc47e7fda7ca76b371ed86a73e645eb4812bc5307281142 days 5 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0x0fcbed9a7b11358d550b641164aba1acbf354f055a643c7cfb759e366e3b6e00142 days 5 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018793
0x3ede88f6e7047507cd0aa4ffde51a660b89a9ae400c822ca52089f804f3f603d171 days 18 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018884
0x02cf413fea3216850a0efc2ce317b95e7689208245a700fd9a233fc8877eaee8171 days 18 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0018852
0x0476eb6d71ccb98ef365515a2e705905913bf22c15e3c440d223c26b0c75a069171 days 18 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.001882
0x85f38bf45605e15d4f8d36976b8628bea66ba4a9f4605b76a53a9da3a2dc8053191 days 17 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0033712
0xff6d405500002aae85f7d275d8344646bfc21c71a7c0e719a738c8771f80c940192 days 17 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0041212
0x24e5a2a25f5637728c90f7cd5cc451377301032115febda2ce89f1bf4b38be98192 days 17 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.00336955
0x69ccac7ad601e22494d15d19dd2a7a1b166e12c33ef5dae829caaa508655f536192 days 18 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.00411955
0x8312b69f1a72fff579a94112ca609a4547198878cc120cbfc7c920aaff149974192 days 18 hrs ago0x3a8de03f19c7c4c139b171978f87bfac9ffe99c0  IN   0x9ec1874ff1def6e178126f7069487c2e9e93d0f90 Ether0.0023361
[ 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
0x7c35f553a000dc52869510c0c68ec5748a3b220b568f2dccd261a7997f8346ca328746712 days 20 hrs ago0x7e695c446f03083eb60ef8858d41eaf033ab94170x9ec1874ff1def6e178126f7069487c2e9e93d0f90.2 Ether
0x2f07bdcb253b16927c6d1de9cb175561c9c654457a99e4eb884ca9bdf46564c3328745912 days 20 hrs ago0x7e695c446f03083eb60ef8858d41eaf033ab94170x9ec1874ff1def6e178126f7069487c2e9e93d0f90.1 Ether
0xaad5f93dab8753301bfe8be7d8d509bc2e84cc1e27795adae32e7db6321cc0af2655725123 days 4 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.05 Ether
0x081a4467453ee2368bb7538ae2235b3d801cd3f9f02e9273e993e72f436e75512655310123 days 6 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.5 Ether
0xeeaad8ff8f306fa62260d7c5f5a0adb8d642d3ec1e823b0a3d9d3062b8ef31062655063123 days 7 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.6 Ether
0xb791919e45608a21bdbf1876ae0efec79a2f34e1f2d6971b5d1c36905bb3624a2654775123 days 8 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.7 Ether
0xbace0d76c1fb29e420bcef96164ae59d292479b55908044b39286df36afd6eba2654765123 days 8 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.7 Ether
0x09db5c77b40c77a8ed064034bcbfecbf2a4dcd525ade568367a48787d45018c92654762123 days 8 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.7 Ether
0xfa2c96b4e17a68ba2fd76367702c5612057c31092afe247222c2aaad4a8e64e62654726123 days 8 hrs ago0x395067c2b21710a6f11c68626106c012f9243b060x9ec1874ff1def6e178126f7069487c2e9e93d0f90.04 Ether
0x56991f32f825f4aa92a0e7ae20f32682f8774f452c9cb733f50da7b3ab9139b12620931129 days 5 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.006 Ether
0xa2bc2057892b04f89268f1c94a2edb40a2125a6121b97a6ab16a64a4bf8e92f72620698129 days 6 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.1 Ether
0x04b3b20f01f405b1e9f320ef0ba53a89efaea7378b5c71c4b77447033358c5c72620675129 days 6 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.01 Ether
0x6eb431566e1114634b43287a97847ce593c01998f27494c9d7a2bc30720303b02620633129 days 6 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.005 Ether
0x9b7612ca081171430e459b6c8dda4a8299ea5030f7e7e7115c37a62f995f56cf2616046130 days 1 hr ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.004 Ether
0x67501d041a280067bb37efe8203251c91b7141722dc0488b94f7950ccc472f532614961130 days 6 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.003 Ether
0xb7b5a3944af27a85aebab02e73b1cd2766450b6b79c70fefa380dd35063978622614931130 days 6 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.003 Ether
0x206b7904a1a67de17033440d81e1874dd505a0fa331637fb393d75a8d94aa3452614921130 days 6 hrs ago0x4d057730163dda683bab2130283ea1f0101a110b0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.003 Ether
0x13995a20a16ce350d3bd62b1d6cfcad76d71775949f3412614fd2d5eb56c8c032614772130 days 7 hrs ago0x602fdbef97334dfd9e7a270084d5843fc922d0310x9ec1874ff1def6e178126f7069487c2e9e93d0f90.0045 Ether
0xcba2ea0c654d7471e0949f1a8adf4a6913580cf79704bff1bf53a77a1a6435942580061136 days 7 hrs ago0x9ec1874ff1def6e178126f7069487c2e9e93d0f90x3a8de03f19c7c4c139b171978f87bfac9ffe99c00.004 Ether
0xd0a05e2c0317cf3e0372775ac456b9df23c886d7f72f27aa2b1cb48a3dbb24ae2580059136 days 7 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.004 Ether
0xd41c3e5b657e91913750d9bc060f647198648e147b607a45dce9a86c46a5cd052580040136 days 7 hrs ago0x9ec1874ff1def6e178126f7069487c2e9e93d0f90x3a8de03f19c7c4c139b171978f87bfac9ffe99c00.004 Ether
0x602206e0388df76d6159febf9bcd50c9b27f7dc340b7a3ff2118f96468d2eddf2580038136 days 7 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.004 Ether
0x961c46d0b17944fa51c77afe68c2b609b745ceda99402fad399a241fc8e675d72580016136 days 8 hrs ago0x9ec1874ff1def6e178126f7069487c2e9e93d0f90x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0.003 Ether
0xf80dbbf082c8c9c141a399efddd3f6dc7dd62ab4634ea142f262e00067f23c8a2580014136 days 8 hrs ago0x3a8a876652d846b88b8cfe75bfaa8483bd5c5c7d0x9ec1874ff1def6e178126f7069487c2e9e93d0f90.003 Ether
0x0754593291eb6996b3bbb5c534fdba8005d56079d2c9d5859daa8981209a8e5a2579996136 days 8 hrs ago0x9ec1874ff1def6e178126f7069487c2e9e93d0f90x3a8de03f19c7c4c139b171978f87bfac9ffe99c00.004 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: TownCrier
Compiler Text: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.9;

contract TownCrier {
    struct Request { // the data structure for each request
        address requester; // the address of the requester
        uint fee; // the amount of wei the requester pays for the request
        address callbackAddr; // the address of the contract to call for delivering response
        bytes4 callbackFID; // the specification of the callback function
        bytes32 paramsHash; // the hash of the request parameters
    }

    event Upgrade(address newAddr);
    event Reset(uint gas_price, uint min_fee, uint cancellation_fee);
    event RequestInfo(uint64 id, uint8 requestType, address requester, uint fee, address callbackAddr, bytes32 paramsHash, uint timestamp, bytes32[] requestData); // log of requests, the Town Crier server watches this event and processes requests
    event DeliverInfo(uint64 requestId, uint fee, uint gasPrice, uint gasLeft, uint callbackGas, bytes32 paramsHash, uint64 error, bytes32 respData); // log of responses
    event Cancel(uint64 requestId, address canceller, address requester, uint fee, int flag); // log of cancellations

    // address of the SGX account (mainnet)
    // address public constant SGX_ADDRESS = 0x18513702cCd928F2A3eb63d900aDf03c9cc81593;
    // address of the SGX (private chain)
    // address public constant SGX_ADDRESS = 0x89B44e4d3c81EDE05D0f5de8d1a68F754D73d997;
    // address of the SGX (Rinkeby)
    address public constant SGX_ADDRESS = 0x3a8de03f19c7C4c139B171978F87BFAC9ffe99c0;

    uint public GAS_PRICE = 5 * 10**10;
    uint public MIN_FEE = 30000 * GAS_PRICE; // minimum fee required for the requester to pay such that SGX could call deliver() to send a response
    uint public CANCELLATION_FEE = 25000 * GAS_PRICE; // charged when the requester cancels a request that is not responded

    uint public constant CANCELLED_FEE_FLAG = 1;
    uint public constant DELIVERED_FEE_FLAG = 0;
    int public constant FAIL_FLAG = -2 ** 250;
    int public constant SUCCESS_FLAG = 1;

    bool public killswitch;

    bool public externalCallFlag;

    uint64 public requestCnt;
    uint64 public unrespondedCnt;
    Request[2**64] public requests;

    int public newVersion = 0;

    // Contracts that receive Ether but do not define a fallback function throw
    // an exception, sending back the Ether (this was different before Solidity
    // v0.4.0). So if you want your contract to receive Ether, you have to
    // implement a fallback function.
    function () {}

    function TownCrier() public {
        // Start request IDs at 1 for two reasons:
        //   1. We can use 0 to denote an invalid request (ids are unsigned)
        //   2. Storage is more expensive when changing something from zero to non-zero,
        //      so this means the first request isn't randomly more expensive.
        requestCnt = 1;
        requests[0].requester = msg.sender;
        killswitch = false;
        unrespondedCnt = 0;
        externalCallFlag = false;
    }

    function upgrade(address newAddr) {
        if (msg.sender == requests[0].requester && unrespondedCnt == 0) {
            newVersion = -int(newAddr);
            killswitch = true;
            Upgrade(newAddr);
        }
    }

    function reset(uint price, uint minGas, uint cancellationGas) public {
        if (msg.sender == requests[0].requester && unrespondedCnt == 0) {
            GAS_PRICE = price;
            MIN_FEE = price * minGas;
            CANCELLATION_FEE = price * cancellationGas;
            Reset(GAS_PRICE, MIN_FEE, CANCELLATION_FEE);
        }
    }

    function suspend() public {
        if (msg.sender == requests[0].requester) {
            killswitch = true;
        }
    }

    function restart() public {
        if (msg.sender == requests[0].requester && newVersion == 0) {
            killswitch = false;
        }
    }

    function withdraw() public {
        if (msg.sender == requests[0].requester && unrespondedCnt == 0) {
            if (!requests[0].requester.call.value(this.balance)()) {
                throw;
            }
        }
    }

    function request(uint8 requestType, address callbackAddr, bytes4 callbackFID, uint timestamp, bytes32[] requestData) public payable returns (int) {
        if (externalCallFlag) {
            throw;
        }

        if (killswitch) {
            externalCallFlag = true;
            if (!msg.sender.call.value(msg.value)()) {
                throw;
            }
            externalCallFlag = false;
            return newVersion;
        }

        if (msg.value < MIN_FEE) {
            externalCallFlag = true;
            // If the amount of ether sent by the requester is too little or
            // too much, refund the requester and discard the request.
            if (!msg.sender.call.value(msg.value)()) {
                throw;
            }
            externalCallFlag = false;
            return FAIL_FLAG;
        } else {
            // Record the request.
            uint64 requestId = requestCnt;
            requestCnt++;
            unrespondedCnt++;

            bytes32 paramsHash = sha3(requestType, requestData);
            requests[requestId].requester = msg.sender;
            requests[requestId].fee = msg.value;
            requests[requestId].callbackAddr = callbackAddr;
            requests[requestId].callbackFID = callbackFID;
            requests[requestId].paramsHash = paramsHash;

            // Log the request for the Town Crier server to process.
            RequestInfo(requestId, requestType, msg.sender, msg.value, callbackAddr, paramsHash, timestamp, requestData);
            return requestId;
        }
    }

    function deliver(uint64 requestId, bytes32 paramsHash, uint64 error, bytes32 respData) public {
        if (msg.sender != SGX_ADDRESS ||
                requestId <= 0 ||
                requests[requestId].requester == 0 ||
                requests[requestId].fee == DELIVERED_FEE_FLAG) {
            // If the response is not delivered by the SGX account or the
            // request has already been responded to, discard the response.
            return;
        }

        uint fee = requests[requestId].fee;
        if (requests[requestId].paramsHash != paramsHash) {
            // If the hash of request parameters in the response is not
            // correct, discard the response for security concern.
            return;
        } else if (fee == CANCELLED_FEE_FLAG) {
            // If the request is cancelled by the requester, cancellation
            // fee goes to the SGX account and set the request as having
            // been responded to.
            SGX_ADDRESS.send(CANCELLATION_FEE);
            requests[requestId].fee = DELIVERED_FEE_FLAG;
            unrespondedCnt--;
            return;
        }

        requests[requestId].fee = DELIVERED_FEE_FLAG;
        unrespondedCnt--;

        if (error < 2) {
            // Either no error occurs, or the requester sent an invalid query.
            // Send the fee to the SGX account for its delivering.
            SGX_ADDRESS.send(fee);
        } else {
            // Error in TC, refund the requester.
            externalCallFlag = true;
            requests[requestId].requester.call.gas(2300).value(fee)();
            externalCallFlag = false;
        }

        uint callbackGas = (fee - MIN_FEE) / tx.gasprice; // gas left for the callback function
        DeliverInfo(requestId, fee, tx.gasprice, msg.gas, callbackGas, paramsHash, error, respData); // log the response information
        if (callbackGas > msg.gas - 5000) {
            callbackGas = msg.gas - 5000;
        }

        externalCallFlag = true;
        requests[requestId].callbackAddr.call.gas(callbackGas)(requests[requestId].callbackFID, requestId, error, respData); // call the callback function in the application contract
        externalCallFlag = false;
    }

    function cancel(uint64 requestId) public returns (int) {
        if (externalCallFlag) {
            throw;
        }

        if (killswitch) {
            return 0;
        }

        uint fee = requests[requestId].fee;
        if (requests[requestId].requester == msg.sender && fee >= CANCELLATION_FEE) {
            // If the request was sent by this user and has money left on it,
            // then cancel it.
            requests[requestId].fee = CANCELLED_FEE_FLAG;
            externalCallFlag = true;
            if (!msg.sender.call.value(fee - CANCELLATION_FEE)()) {
                throw;
            }
            externalCallFlag = false;
            Cancel(requestId, msg.sender, requests[requestId].requester, requests[requestId].fee, 1);
            return SUCCESS_FLAG;
        } else {
            Cancel(requestId, msg.sender, requests[requestId].requester, fee, -1);
            return FAIL_FLAG;
        }
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"newAddr","type":"address"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"restart","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newVersion","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SGX_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DELIVERED_FEE_FLAG","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"killswitch","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"requestId","type":"uint64"},{"name":"paramsHash","type":"bytes32"},{"name":"error","type":"uint64"},{"name":"respData","type":"bytes32"}],"name":"deliver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"requestId","type":"uint64"}],"name":"cancel","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"requestType","type":"uint8"},{"name":"callbackAddr","type":"address"},{"name":"callbackFID","type":"bytes4"},{"name":"timestamp","type":"uint256"},{"name":"requestData","type":"bytes32[]"}],"name":"request","outputs":[{"name":"","type":"int256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"FAIL_FLAG","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"requestCnt","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CANCELLATION_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"requests","outputs":[{"name":"requester","type":"address"},{"name":"fee","type":"uint256"},{"name":"callbackAddr","type":"address"},{"name":"callbackFID","type":"bytes4"},{"name":"paramsHash","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GAS_PRICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"unrespondedCnt","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"},{"name":"minGas","type":"uint256"},{"name":"cancellationGas","type":"uint256"}],"name":"reset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CANCELLED_FEE_FLAG","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUCCESS_FLAG","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"suspend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"externalCallFlag","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAddr","type":"address"}],"name":"Upgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"gas_price","type":"uint256"},{"indexed":false,"name":"min_fee","type":"uint256"},{"indexed":false,"name":"cancellation_fee","type":"uint256"}],"name":"Reset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint64"},{"indexed":false,"name":"requestType","type":"uint8"},{"indexed":false,"name":"requester","type":"address"},{"indexed":false,"name":"fee","type":"uint256"},{"indexed":false,"name":"callbackAddr","type":"address"},{"indexed":false,"name":"paramsHash","type":"bytes32"},{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"requestData","type":"bytes32[]"}],"name":"RequestInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"requestId","type":"uint64"},{"indexed":false,"name":"fee","type":"uint256"},{"indexed":false,"name":"gasPrice","type":"uint256"},{"indexed":false,"name":"gasLeft","type":"uint256"},{"indexed":false,"name":"callbackGas","type":"uint256"},{"indexed":false,"name":"paramsHash","type":"bytes32"},{"indexed":false,"name":"error","type":"uint64"},{"indexed":false,"name":"respData","type":"bytes32"}],"name":"DeliverInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"requestId","type":"uint64"},{"indexed":false,"name":"canceller","type":"address"},{"indexed":false,"name":"requester","type":"address"},{"indexed":false,"name":"fee","type":"uint256"},{"indexed":false,"name":"flag","type":"int256"}],"name":"Cancel","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052640ba43b740060009081556605543df729c000600155660470de4df820006002556804000000000000000455341561003b57600080fd5b6003805460048054600160a060020a03191633600160a060020a031617905569ffffffffffffffff00001916620100001761ffff605060020a03609060020a03191690556111878061008e6000396000f30060606040526004361061010e5763ffffffff60e060020a6000350416630900f010811461011b5780631ef3755d1461013a57806329cdda231461014d5780632e28b3f51461017257806339c2697c146101a15780633ccfd60b146101b457806342dd96f7146101c7578063487a6e32146101ee5780634c125e791461021b57806358487bee1461023b57806366a39350146102bd5780636ba7ffd5146102d057806376c7a3c71461030057806378b17ccf1461031357806381d12c58146103265780638b0ee5a314610397578063908f68ee146103aa578063a6801cbd146103bd578063be0da251146103d9578063d073ca3d146103d9578063e6400bbe146103ec578063fc9bfaa6146103ff575b341561011957600080fd5b005b341561012657600080fd5b610119600160a060020a0360043516610412565b341561014557600080fd5b6101196104b3565b341561015857600080fd5b6101606104eb565b60405190815260200160405180910390f35b341561017d57600080fd5b6101856104f9565b604051600160a060020a03909116815260200160405180910390f35b34156101ac57600080fd5b610160610511565b34156101bf57600080fd5b610119610516565b34156101d257600080fd5b6101da610582565b604051901515815260200160405180910390f35b34156101f957600080fd5b61011967ffffffffffffffff600435811690602435906044351660643561058b565b341561022657600080fd5b61016067ffffffffffffffff600435166109b4565b6101606004803560ff169060248035600160a060020a0316916044357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191691606435919060a4906084359081019083013580602080820201604051908101604052809392919081815260200183836020028082843750949650610c2495505050505050565b34156102c857600080fd5b610160610fdc565b34156102db57600080fd5b6102e3610fe4565b60405167ffffffffffffffff909116815260200160405180910390f35b341561030b57600080fd5b610160610ffa565b341561031e57600080fd5b610160611000565b341561033157600080fd5b61033c600435611006565b604051600160a060020a0395861681526020810194909452919093166040808401919091527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff199093166060830152608082015260a001905180910390f35b34156103a257600080fd5b610160611061565b34156103b557600080fd5b6102e3611067565b34156103c857600080fd5b610119600435602435604435611085565b34156103e457600080fd5b610160611122565b34156103f757600080fd5b610119611127565b341561040a57600080fd5b6101da61114d565b60045433600160a060020a03908116911614801561044857506003546a0100000000000000000000900467ffffffffffffffff16155b156104b057600160a060020a03811660000368040000000000000004556003805460ff191660011790557ff78721226efe9a1bb678189a16d1554928b9f2192e2cb93eeda83b79fa40007d81604051600160a060020a03909116815260200160405180910390a15b50565b60045433600160a060020a0390811691161480156104d957506804000000000000000454155b156104e9576003805460ff191690555b565b680400000000000000045481565b733a8de03f19c7c4c139b171978f87bfac9ffe99c081565b600081565b60045433600160a060020a03908116911614801561054c57506003546a0100000000000000000000900467ffffffffffffffff16155b156104e957600454600160a060020a039081169030163160405160006040518083038185875af19250505015156104e957600080fd5b60035460ff1681565b60008033600160a060020a0316733a8de03f19c7c4c139b171978f87bfac9ffe99c01415806105c5575060008667ffffffffffffffff1611155b806105f55750600467ffffffffffffffff8716604060020a81106105e557fe5b6004020154600160a060020a0316155b8061062157506000600467ffffffffffffffff8816604060020a811061061757fe5b6004020160010154145b1561062b576109ac565b600467ffffffffffffffff8716604060020a811061064557fe5b60040201600101549150846000191660048767ffffffffffffffff16604060020a8110151561067057fe5b600402016003015460001916141515610688576109ac565b600182141561073357600254733a8de03f19c7c4c139b171978f87bfac9ffe99c09080156108fc0290604051600060405180830381858888f1935050505050600060048767ffffffffffffffff16604060020a811015156106e557fe5b60040201600101556003805471ffffffffffffffff000000000000000000001981166a01000000000000000000009182900467ffffffffffffffff90811660001901169091021790556109ac565b6000600467ffffffffffffffff8816604060020a811061074f57fe5b60040201600101556003805471ffffffffffffffff000000000000000000001981166a01000000000000000000009182900467ffffffffffffffff90811660001901811690920217909155600290851610156107dc57733a8de03f19c7c4c139b171978f87bfac9ffe99c082156108fc0283604051600060405180830381858888f1935050505050610838565b6003805461ff001916610100179055600467ffffffffffffffff8716604060020a811061080557fe5b6004020154600160a060020a03166108fc83604051600060405180830381858888f150506003805461ff00191690555050505b3a600154830381151561084757fe5b0490507fe36d392c21a3a1548b2b8da5316872a216610b14139ec0d80335e1b139c35c6286833a5a858a8a8a60405167ffffffffffffffff988916815260208101979097526040808801969096526060870194909452608086019290925260a085015290931660c083015260e082019290925261010001905180910390a16113885a038111156108d9576113885a0390505b6003805461ff001916610100179055600467ffffffffffffffff8716604060020a811061090257fe5b60049081029190910160020154600160a060020a031690829067ffffffffffffffff8916604060020a811061093357fe5b6004020160020160149054906101000a900460e060020a0260e060020a90049088878760405160e060020a63ffffffff871602815267ffffffffffffffff9384166004820152919092166024820152604481019190915260640160006040518083038160008887f150506003805461ff00191690555050505b505050505050565b6003546000908190610100900460ff16156109ce57600080fd5b60035460ff16156109e25760009150610c1e565b600467ffffffffffffffff8416604060020a81106109fc57fe5b6004020160010154905033600160a060020a031660048467ffffffffffffffff16604060020a81101515610a2c57fe5b6004020154600160a060020a0316148015610a4957506002548110155b15610b80576001600467ffffffffffffffff8516604060020a8110610a6a57fe5b60040201600101556003805461010061ff001990911617905560025433600160a060020a031690820360405160006040518083038185875af1925050501515610ab257600080fd5b6003805461ff00191690557f0e2984d10e577bb65e890413616fdf852498a063437ca194d43fe257b33cd1ce8333600467ffffffffffffffff8316604060020a8110610afa57fe5b60049081029190910154600160a060020a03169067ffffffffffffffff8816604060020a8110610b2657fe5b6004020160010154600160405167ffffffffffffffff9095168552600160a060020a039384166020860152919092166040808501919091526060840192909252608083015260a0909101905180910390a160019150610c1e565b7f0e2984d10e577bb65e890413616fdf852498a063437ca194d43fe257b33cd1ce8333600467ffffffffffffffff8316604060020a8110610bbd57fe5b6004020154600160a060020a03168460001960405167ffffffffffffffff9095168552600160a060020a039384166020860152919092166040808501919091526060840192909252608083015260a0909101905180910390a160fa60020a91505b50919050565b6000806000600360019054906101000a900460ff1615610c4357600080fd5b60035460ff1615610ca4576003805461ff001916610100179055600160a060020a0333163460405160006040518083038185875af1925050501515610c8757600080fd5b6003805461ff001916905568040000000000000004549250610fd1565b600154341015610cfe576003805461ff001916610100179055600160a060020a0333163460405160006040518083038185875af1925050501515610ce757600080fd5b6003805461ff001916905560fa60020a9250610fd1565b600380546a0100000000000000000000600167ffffffffffffffff620100008085048216838101831690910269ffffffffffffffff0000199095169490941783810482169092011690910271ffffffffffffffff000000000000000000001990911617909155915087846040517f010000000000000000000000000000000000000000000000000000000000000060ff841602815260018101828051906020019060200280838360005b83811015610dc0578082015183820152602001610da8565b5050505090500192505050604051908190039020905033600467ffffffffffffffff8416604060020a8110610df157fe5b6004020160000160006101000a815481600160a060020a030219169083600160a060020a031602179055503460048367ffffffffffffffff16604060020a81101515610e3957fe5b60040201600101819055508660048367ffffffffffffffff16604060020a81101515610e6157fe5b6004020160020160006101000a815481600160a060020a030219169083600160a060020a031602179055508560048367ffffffffffffffff16604060020a81101515610ea957fe5b6004020160020160146101000a81548163ffffffff021916908360e060020a900402179055508060048367ffffffffffffffff16604060020a81101515610eec57fe5b6004020160030181600019169055507f295780ea261767c398d062898e5648587d7b8ca371ffd203be8b4f9a43454ffa828933348b868b8b60405167ffffffffffffffff8916815260ff88166020820152600160a060020a038088166040830152606082018790528516608082015260a0810184905260c0810183905261010060e0820181815290820183818151815260200191508051906020019060200280838360005b83811015610fa9578082015183820152602001610f91565b50505050905001995050505050505050505060405180910390a18167ffffffffffffffff1692505b505095945050505050565b60fa60020a81565b60035462010000900467ffffffffffffffff1681565b60015481565b60025481565b600481604060020a811061101657fe5b60040201805460018201546002830154600390930154600160a060020a03928316945090929182169174010000000000000000000000000000000000000000900460e060020a029085565b60005481565b6003546a0100000000000000000000900467ffffffffffffffff1681565b60045433600160a060020a0390811691161480156110bb57506003546a0100000000000000000000900467ffffffffffffffff16155b1561111d576000839055818302600181905581840260028190557f8ccc42b6e039247437260d1393a4352a1bbf3f2f9091caef694b2482a2ed914e91859160405180848152602001838152602001828152602001935050505060405180910390a15b505050565b600181565b60045433600160a060020a03908116911614156104e9576003805460ff19166001179055565b600354610100900460ff16815600a165627a7a723058201d9063b801fce1fe27f6a799b41b194f53dc04beacf43a59c9ba7cc1fb9518f30029

   Swarm Source:
bzzr://1d9063b801fce1fe27f6a799b41b194f53dc04beacf43a59c9ba7cc1fb9518f3

 

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