Back to Home

HashReg

registrar
Frontier GlobalRegistrar
0x23bf622b5a65...33ded3520620
FrontierContract #1,522Exact Bytecode MatchEdit this contract
Deployed September 24, 2015 (10 years ago)Block 282,885

The content hash registry hardcoded into go-ethereum — maps key hashes (contract code hashes, domain name hashes) to content hashes. Part of the three-contract

Contract Information

Registered Name
HashReg
Frontier GlobalRegistrar
The official Ethereum name registry hardcoded in go-ethereum for Frontier mainnet. Referenced in the original ethereum.org 'Register a name for your coin' tutorial (2015).

Key Facts

Deployment Block
282,885
Deployment Date
Sep 24, 2015, 11:07 AM
Code Size
164.0 B
Gas at Deploy
61,640
Transactions by Year
201514
201630

Description

Deployed on September 24, 2015 (block 282,885), just 5 blocks after the GlobalRegistrar, HashReg is the content hash registry that maps key hashes to content hashes on Ethereum mainnet. It was deployed by the same go-ethereum core developer who set up the entire Frontier registrar infrastructure in a rapid multi-contract deployment session.

HashReg served a specific role in go-ethereum's NatSpec documentation system: when a developer compiled and deployed a Solidity contract, the compiler could generate a JSON document containing human-readable descriptions of each function. The hash of this documentation was then registered in HashReg, linked to the contract's code hash. This allowed any geth user running a transaction against a verified contract to receive a plain-English explanation of what the transaction would do — before signing it.

The contract's address was hardcoded into go-ethereum as HashRegAddr = "0x23bf622b5a65f6060d855fca401133ded3520620" // frontier in common/registrar/registrar.go. It works in conjunction with GlobalRegistrar (which maps the name "HashReg" to this address so go-ethereum can find it on-chain) and UrlHint (which maps content hashes to URLs where the actual documentation files can be retrieved).

The contract exposes two core functions called via ABI signatures: setowner() (establishing ownership before registration) and register(uint256,uint256) (mapping a key hash to a content hash). No source code was verified on Etherscan, but the contract's bytecode was compiled from Solidity source embedded in the go-ethereum codebase.

Source Verified

Exact bytecode match(164 bytes)

Bytecode hardcoded verbatim in go-ethereum v1.0.0 common/registrar/contracts.go (HashRegCode). Source from HashRegSrc in same file. Authored by Gav Wood, Ethereum Foundation. Exact 152-byte runtime match confirmed.

Historian Categories

Registry

Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: registrar

Frontier Era

The initial release of Ethereum. A bare-bones implementation for technical users.

Block span: 01,149,999
July 30, 2015March 14, 2016

Bytecode Overview

Opcodes164
Unique Opcodes47
Jump Instructions14
Storage Operations4

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

View Verification Proof
Show source code (Solidity)
// SPDX-License-Identifier: UNLICENSED
// Reconstructed source of HashReg (0x23bf622b5a65f6060d855fca401133ded3520620)
// Originally authored by Gav Wood, Ethereum Foundation.
// Source preserved verbatim from go-ethereum v1.0.0 common/registrar/contracts.go (HashRegSrc)
// Compiler: unknown early Solidity (pre-release, Frontier era, ~Aug 7 2015)
// The bytecode was hardcoded directly in go-ethereum — no separate compilation needed.

contract HashReg {
	function setowner() {
		if (owner == 0) {
			owner = msg.sender;
		}
	}
	function register(uint256 _key, uint256 _content) {
		if (msg.sender == owner) {
			content[_key] = _content;
  	}
	}
	address owner;
	mapping (uint256 => uint256) content;
}

External Links