function (bool wasTransactions) external callback = validIds[queryId];
        delete validIds[queryId];
        
        callback(bytes(result).length != 0);
    }

    

    
    function buildUrl(address target, uint startBlock, uint endBlock) internal constant returns (string) {
        strings.slice memory strAddress = toHex(target).toSlice();
        uint8 i = 0; 
        var parts = new strings.slice[](9);
        parts[i++] = "json(https:
        parts[i++] = strAddress;
        
        parts[i++] = "&startblock=".toSlice();
        parts[i++] = uint2str(startBlock).toSlice();
        parts[i++] = "&endblock=".toSlice();
        parts[i++] = uint2str(endBlock).toSlice();
        parts[i++] = "&sort=desc&apikey=FJ39P2DIU8IX8U9N2735SUKQWG3HPPGPX8).result[?(@.from=='0x".toSlice();
        parts[i++] = strAddress;
        parts[i++] = "')].timeStamp".toSlice();
        return "".toSlice()
                 .join(parts);
    }

    
    function parseJsonArrayAndGetFirstElementAsNumber(string json) internal constant returns (uint) {
        var jsonSlice = json.toSlice();
        strings.slice memory firstResult;
        jsonSlice.split(", ".toSlice(), firstResult);
        var ts = firstResult.beyond("[\"".toSlice()).toString();
        return parseInt(ts);
    }

    function toHex(address adr) internal constant returns (string) {
        var ss = new bytes(40);
        for (uint i = 0; i < 40; i ++) {
            uint c;
            assembly {
                c := and(adr, 0xf)
                adr := div(adr, 0x10)
                c := add(add(c, 0x30), mul(0x27, gt(c, 9)))
            }
            ss[39-i] = byte(c);
        }