Back to Home

Counter

Experimental
0x5fda63db52be...45c6a49df1f4
FrontierContract #502Exact Bytecode MatchEdit this contract

Bytecode verified via sibling

This contract shares identical runtime bytecode with Counter (0x96d95bb9...) which has been verified through compiler archaeology.

Deployed August 26, 2015 (11 years ago)Block 144,681

A 159-byte counter: inc() raises a stored number by one and logs an Incremented event carrying the new value and whether it is odd.

Frontier EraVerified Source

Historical Significance

An early demonstration of what indexed event parameters are for. Putting the parity in a topic rather than the data body means a filter can select on it directly, and doing that on a derived boolean rather than an identifier is an unusually clear illustration of the mechanism. Logs were the main way a 2015 dapp watched contract state, so this pattern is the ancestor of every modern indexer subscription.

Context

Deployed 2015-08-26 by 0x092a5172f796d4c3cd0e03520134317fc25b74f6. Three byte-identical copies of this runtime exist. Source recovered by exact runtime bytecode match, verified on Sourcify and Etherscan.

Key Facts
Deployment Block
144,681
Deployment Date
Aug 26, 2015, 05:42 AM
Code Size
189.0 B
Gas at Deploy
83,042
Transactions by Year
20151

Description

One function, inc() at selector 0x371303c0, pre-increments a uint in storage slot 0 and then emits Incremented(bool indexed odd, uint count). The parity flag is indexed, so it becomes a log topic rather than data, which lets a client filter for only the odd or only the even increments without reading the values. There is no getter, no access control and no way to reset: the count moves in one direction and the log is the only way to observe it.

Source Verified

SolidityExact bytecode match(189 bytes)
Compiler: v0.1.3+
Heuristic Analysis

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

Detected Type: Experimental

Bytecode Overview

Opcodes189
Unique Opcodes65
Jump Instructions6
Storage Operations6

External Links

Related contracts