The datafeed example from the ethereum dapp-bin standardized contract APIs, a single owner key value oracle.
Context
Deployed 9 September 2015, during the Frontier era.
Key Facts
Description
The datafeed contract from the standardized contract APIs directory of the ethereum dapp-bin repository, one of the reference interfaces published so that early contracts could agree on how to read a price or a measurement from one another. The constructor records the deployer as owner. set takes a bytes32 key and a signed 256 bit value and writes it to storage when the caller is the owner; there is no else branch, so a call from anyone else succeeds and changes nothing. get returns the value stored under a key. get is declared as an ordinary function rather than a constant one, so a caller reading it through a transaction pays for the call even though it writes nothing.
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 datafeed {
mapping ( bytes32 => int256 ) data;
address owner;
function datafeed() {
owner = msg.sender;
}
function set(bytes32 k, int256 v) {
if (owner == msg.sender)
data[k] = v;
}
function get(bytes32 k) returns (int256 v) {
v = data[k];
}
}External Links
Related contracts
Democracy DAO
Same deployerOn-chain governance contract with proposals, voting, and execution. Stripped-down version of the go-ethereum wiki Democracy DAO tutorial.
0xb5b8a0...9cfec6September 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0xcbe06c...54c81cSeptember 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0x8d0c13...ff4f34September 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0x8ecd7a...605874September 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0xba2423...0516e0September 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0xc602cb...c710c5September 24, 2015