A registry mapping a content hash to the URL it can be fetched from, stored in 32-byte pieces, claimable by whoever registers it first.
Historical Significance
The location half of the early Ethereum content lookup. The chain can hold a hash cheaply but not a document, so tooling of the period stored the hash on chain and the URL beside it, accepting that the chain guarantees which document is meant while saying nothing about whether it can still be downloaded.
Context
Ethereum's Frontier network went live on 30 July 2015. The chain carried almost no applications in its first months: what was deployed was mostly tutorial code, token experiments and registries, written in a Solidity that was itself only a few months old and compiled from the geth console.
Contract Information
Key Facts
Description
URLhint maps a 256-bit hash to a URL. Because a URL does not fit in one word, it is written in 32-byte pieces: register(hash, index, chunk) stores one piece at a time in a fixed array of 256 slots, and a reader reassembles them in order.
Ownership is first come, first served and per hash rather than per contract. Whichever account registers a hash earliest becomes the owner of that entry and is the only one who can change it afterwards, while every other hash stays open to anyone.
Paired with a hash registry, the two answer the two halves of a lookup: what document describes this thing, and where can that document be fetched from.
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
This contract has verified source code on Etherscan.
Show source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract URLhint {
function register(uint256 _hash, uint8 idx, uint256 _url) {
if (owner[_hash] == 0 || owner[_hash] == msg.sender) {
owner[_hash] = msg.sender;
url[_hash][idx] = _url;
}
}
mapping (uint256 => address) owner;
mapping (uint256 => uint256[256]) url;
}
External Links
Related contracts
HashReg
Same deployerA single-owner key to value registry: whoever claims ownership first can then map any 256-bit key to any 256-bit value.
0xfeee3a...d1d0b2August 25, 2015Greeter
Same eraA HelloWorld greeter deployed at block 51,909 on 8 August 2015, one of a run of contracts from the same account that week.
0x412fda...7267edAugust 8, 2015Greeter
Same eraA Greeter with the message 'Ethereum will change the world smarter' - deployed Aug 8, 2015 by a developer connected to the Tokyo Smart Contract meetup.
0xda0c1c...7a68ebAugust 8, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015Greeter
Same eraThe go-ethereum Contract Tutorial greeter, deployed with the greeting: Hello World!
0x506f4b...466983August 8, 2015Contract 0xd4eae4...a2c77a
Same eraThe ethereum.org crowdsale tutorial, deployed on the ninth day of the public chain, with the funding goal, deadline and price fixed at construction.
0xd4eae4...a2c77aAugust 8, 2015