Skip to content
Verified contractPartial

Oraclize

Address0x9bb07a6b50bf10e0f8f238e998a2d6b2ed737dfb
Balance

0 ETH

 

Transactions

2

 

Compiler

solc 0.1.5

 

Same code

Only this contract

 

Details

Compiler
solc 0.1.5+commit.23865e39
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
458,932
Creation transaction
0x6fa47beaa8…4f7533083d

Oraclize.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Oraclize {
    uint reqc = 0;
    address public cb_address = 0x26588a9301b0428d95e6fc3a5024fce8bec12d51;
    address owner;
    mapping (bytes32 => uint) public price;

    event Log1(bytes32 cid, uint timestamp, string datasource, string arg);
    event Log2(bytes32 cid, uint timestamp, string datasource, string arg1, string arg2);

    function Oraclize() {
        owner = msg.sender;
    }

    function setPrice(string datasource, uint newPrice) {
        if (msg.sender != owner) throw;
        price[sha3(datasource)] = newPrice;
    }

    function getPrice(string datasource) returns (uint) {
        return price[sha3(datasource)];
    }

    modifier costs(string datasource) {
        uint dsprice = getPrice(datasource);
        if (this.balance >= dsprice) {
            address(0xf65b3b60010d57d0bb8478aa6ced15fe720621b4).send(dsprice);
            _
        } else throw;
    }

    function query(uint timestamp, string datasource, string arg) costs(datasource) returns (bytes32 id) {
        id = sha3(now + reqc);
        reqc++;
        Log1(id, timestamp, datasource, arg);
        return id;
    }

    function query(uint timestamp, string datasource, string arg1, string arg2) costs(datasource) returns (bytes32 id) {
        id = sha3(now + reqc);
        reqc++;
        Log2(id, timestamp, datasource, arg1, arg2);
        return id;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.