Skip to content
Verified contractPartial

FlightAltitude

Address0x403b9b900efdddf9f921fd36c8b245258ce19b49
Balance

0 ETH

 

Transactions

138

 

Compiler

solc 0.1.6

 

Same code

Only this contract

 

Details

Compiler
solc 0.1.6+commit.d41f8b7c
Language
solidity
Optimization
No
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
423,979
Creation transaction
0x2f194d896a…02a903b715

FlightAltitude.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract OraclizeI {
    function query(uint timestamp, string datasource, string arg) returns (bytes32 id);
}

contract FlightAltitude {
    uint public checks = 0;

    function FlightAltitude() {
        OraclizeI oraclize = OraclizeI(0xd4cb3eb955e03ac64644678fd3d6a7f3104ee70d);
        oraclize.query(0, "WolframAlpha", "qfa11 flight altitude");
    }

    function() {
        if (msg.sender == address(0x26588a9301b0428d95e6fc3a5024fce8bec12d51)) callback();
    }

    function indexOf(string _haystack, string _needle) returns (int)
    {
    	bytes memory h = bytes(_haystack);
    	bytes memory n = bytes(_needle);
    	if(h.length < 1 || n.length < 1 || (n.length > h.length)) 
    		return -1;
    	else if(h.length > (2**128 -1))
    		return -1;									
    	else
    	{
    		uint subindex = 0;
    		for (uint i = 0; i < h.length; i ++)
    		{
    			if (h[i] == n[0])
    			{
    				subindex = 1;
    				while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex])
    				{
    					subindex++;
    				}	
    				if(subindex == n.length)
    					return int(i);
    			}
    		}
    		return -1;
    	}	
    }

    function callback() {
        if (indexOf(string(msg.data), "0 ") == 0) suicide(address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8));
        checks += 1;
        OraclizeI oraclize = OraclizeI(0xd4cb3eb955e03ac64644678fd3d6a7f3104ee70d);
        oraclize.query(0, "WolframAlpha", "qfa11 flight altitude");
    }

    function kill() {
        if (msg.sender == address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8)) suicide(address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8));
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.