Requests off-chain data from a URL through an external fetcher contract and records the returned result on-chain by emitting an event.
Key Facts
Description
Written in Serpent and deployed on October 12, 2015. It bridges on-chain code to data that lives off-chain, which EVM contracts cannot access directly because every node has to re-execute a transaction and reach the same result.
The contract exposes two functions. call(fetcher, url, fetchId) takes the address of an external fetcher contract, a URL string, and a caller-supplied request id. It invokes the fetcher's get(string) method (ABI selector 693ec85e), forwarding any attached ether, and stores cbids[returnedId] = fetchId so the later response can be matched to the original request. callback(response, responseId) is invoked by the fetcher once it has the data. It reads cbids[responseId] and, if an entry exists, emits LogResponse(response, fetchId) carrying the fetched string. The caller and any off-chain listener read the result from that event.
State is a single storage array, cbids, mapping a fetcher's request id back to the caller's fetchId. The only event is LogResponse(response:string, fetchId:uint256). Before dispatching a request, call also emits LogResponse with the literal string "cow" and a fetchId of 0, a placeholder carried over from the tutorial source the contract derives from.
The request and the response run as two separate transactions: one to submit the request, and a later one from the fetcher to deliver the answer. At deployment in October 2015, Chainlink did not exist and Oraclize (later Provable) was only beginning to appear.
Source Verified
Serpent source (caller.se, the ethereum/pyethapp "Making a User Service" tutorial Caller) compiled with ethereum/serpent commit f0b4128 (2015-10-15) reproduces the full 869-byte creation bytecode and the 851-byte runtime exactly. runtime sha256 9642ec35587703931a8adfc7d830b0e1e0e7eeb7a9e927d4837072d6fdfbd669. The deployed callback drops the msg.sender guard shown in the wiki. Solidity, in any version, provably cannot produce this bytecode. Verified by EthereumHistory. External verification (2026-06-28): neither explorer can verify Serpent. Sourcify accepts only Solidity and Vyper and requires a solc-style semver compiler version, so it rejects serpent commit f0b4128. Etherscan accepts only solc compiler versions and returns Invalid compiler version. The byte-for-byte proof remains in the GitHub proof folder and on EthereumHistory.
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 (Serpent)
# Verified by EthereumHistory (ethereumhistory.com)
event LogResponse(response:string, fetchId:uint256)
data cbids[]
extern main: [get:[string]:int256]
def callback(response:str, responseId:uint256):
if self.cbids[responseId]:
log(type=LogResponse, response, self.cbids[responseId])
def call(fetcher:address, url:str, fetchId:uint256):
log(type=LogResponse, text("cow"), 0)
x = fetcher.get(url, value=msg.value)
self.cbids[x] = fetchIdExternal Links
Related contracts
SerpentGamble
Same deployerProvably-fair betting game where players choose their own odds. The owner settles bets with a commit-reveal random seed. Includes a 2-day emergency refund.
0x034df8...200e2fSeptember 20, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x9ca7e9...fa8bb4September 21, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x75649a...176028September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xe1a99f...0d2457September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xdc00a9...15861fSeptember 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xd0ed09...300b48September 21, 2015