Oraclize's address resolver from October 2015, the fixed address early contracts called to find the oracle service, and still answering.
Historical Significance
Oraclize was the first oracle service on Ethereum to see broad use, and for years it was effectively the only practical way for a contract to learn anything the chain did not already know. Prediction markets, insurance experiments, lotteries needing randomness and any contract quoting a real world price went through it. This resolver is the front door to all of that.
It is also an early, working answer to a problem the ecosystem had not yet named. Deployed code is immutable, so any service other contracts depend on needs a stable address that is not the service itself. Proxies, registries and upgrade patterns all rest on that idea, and here it is in twenty lines, two and a half months after Frontier.
Context
Deployed on 24 October 2015, this is the earliest Oraclize contract in the archive, roughly eleven weeks after the chain opened. Three more resolvers followed as the service grew, in December 2015, January 2016 and finally May 2016 at 0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed, which is the address the usingOraclize helper library hardcoded for mainnet and the one most developers ever saw.
The source carries the line 'Copyright (c) 2015-2016 Oraclize srl, Thomas Bertani'. The company renamed itself Provable in 2018 after a trademark dispute, so contracts written before and after that date call the same service by two different names.
Contract Information
Key Facts
Description
A deliberately tiny contract with one job: hold the current address of the Oraclize service and hand it out. It stores a public addr, an owner set at construction, a getAddress() that returns addr, and a setAddr() that only the owner may call.
The point is indirection. A contract cannot reach outside the chain, so anything needing a price, a random number or a web response had to call an oracle contract, and hardcoding that oracle's address meant redeploying every dependent contract whenever the oracle moved. Instead a dapp hardcoded this resolver and asked it, at call time, where the service currently lived. Oraclize could then replace the machinery behind it without breaking anything already deployed. This is the naming problem ENS solved for people, solved narrowly for one service and two years earlier.
Verified on chain: addr() and getAddress() both return 0x6f28B146804dBa2D6f944C03528A8FDbc673df2C, a contract that was not deployed until June 2017. The resolver was still being pointed at new machinery more than eighteen months after it went out, which is the clearest evidence that the indirection was used rather than merely intended.
One detail dates it precisely: getAddress() is not marked constant, because Solidity in October 2015 did not lean on that keyword the way later code does. Read off chain it costs nothing, but a contract calling it in a transaction pays for a state write that never happens.
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 on Etherscan.
Show source code (Solidity)
/*
Copyright (c) 2015-2016 Oraclize srl, Thomas Bertani
*/
contract OraclizeAddrResolver {
address public addr;
address owner;
function OraclizeAddrResolver(){
owner = msg.sender;
}
function getAddress() returns (address oaddr){
return addr;
}
function setAddr(address newaddr){
if (msg.sender != owner) throw;
addr = newaddr;
}
}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