Oraclize connector, 24 Oct 2015: free queries with withdraw functions and an empty fallback.
Historical Significance
Part of the earliest onchain history of Oraclize, the first widely used oracle service on Ethereum. Source reconstructed from bytecode; exact runtime and creation match with solc v0.1.6, verified on Etherscan and Sourcify.
Context
Deployed by the Oraclize operator account (0x0047a8033cc6d6ca2ed5044674fd421f44884de8) between 22 and 24 October 2015, while Thomas Bertani was building the Oraclize service onchain, weeks before Oraclize published its API in December 2015. Over those three days the connector went from a query() that only emitted a log event, through forwarding proxies and address resolvers, to a connector that charged per query and let callers withdraw their balance.
Key Facts
Description
Oraclize connector, 24 Oct 2015: free queries with withdraw functions and an empty fallback.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Oraclize {
uint counter = 0;
address public cb_address = 0x26588a9301b0428d95e6fc3a5024fce8bec12d51;
mapping (address => uint) balances;
address owner;
event Log1(bytes32 myid, uint timestamp, string datasource, string arg);
event Log2(bytes32 myid, uint timestamp, string datasource, string arg1, string arg2);
function Oraclize() {
owner = msg.sender;
}
function() {
}
function getPrice(string datasource) returns (uint) {
return 10;
}
function getBalance(address _addr) returns (uint) {
return balances[_addr];
}
function withdraw() {
msg.sender.send(balances[msg.sender]);
balances[msg.sender] = 0;
}
function withdrawAll() {
if (msg.sender == owner) owner.send(this.balance);
}
function query(uint timestamp, string datasource, string arg) returns (bytes32 myid) {
myid = sha3(now + counter);
counter++;
Log1(myid, timestamp, datasource, arg);
return myid;
}
function query(uint timestamp, string datasource, string arg1, string arg2) returns (bytes32 myid) {
myid = sha3(now + counter);
counter++;
Log2(myid, timestamp, datasource, arg1, arg2);
return myid;
}
}External Links
Related contracts
Target
Same deployerTarget contract.
0x9e0ae8...c9428eSeptember 17, 2015GetSet
Same deployerA minimal getter/setter proxy from the Oraclize team. set() forwards calls to a hardcoded target contract, get() returns constant 255.
0x77beac...7e96c2September 17, 2015SimpleStorage
Same deployerThe storage example rewired to send a wei and return a constant
0x7aa73b...46473bSeptember 17, 2015Controller
Same deployerController contract.
0x3c9492...e332e5September 17, 2015GetSet
Same deployerA 57-byte test contract: set() stores the transaction's ether value into storage slot 0, and get() reads it back.
0xe595e8...423530September 17, 2015GetSet
Same deployerA 57-byte test contract: set() stores the transaction's ether value into storage slot 0, and get() reads it back.
0xd17e9b...03b76aSeptember 17, 2015