Back to Home

Migrations

Utility
0x765c898cb7c6...981329e36a52
DAO ForkSource VerifiedEdit this contract
Deployed July 29, 2016 (10 years ago)Block 1,970,775

Truffle's Migrations bookkeeping contract: it records the number of the last completed migration so a rerun knows where to resume.

DAO Fork EraVerified Source

Historical Significance

Evidence of tooling rather than of an application: this contract exists because somebody ran a deployment framework instead of sending transactions by hand. Its presence on mainnet dates the point at which Ethereum development had a standard project layout and a migration runner that assumed one.

Context

Truffle was the dominant development framework for Ethereum in 2016 and 2017, and every project it created began with this contract. Copies of it on mainnet mark the deployments that came out of that toolchain.

Key Facts
Deployment Block
1,970,775
Deployment Date
Jul 29, 2016, 12:02 AM
Code Size
247.0 B
Transactions by Year
20162

Description

The bookkeeping contract Truffle deploys before any project contract. It stores the deploying account as owner and a single number, last_completed_migration, which the tool updates through setCompleted after each migration script finishes. Rerunning the migrations reads that number and skips everything already done.

upgrade(newAddress) copies the number into another Migrations contract, so a project can move its bookkeeping without losing its place. Both writes are restricted to the owner, although the restriction is written as a modifier that silently does nothing when the caller is wrong rather than reverting.

It is generated code, identical in every project that used the framework, and it holds no funds and controls nothing.

Heuristic Analysis

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

Detected Type: Utility

Bytecode Overview

Opcodes247
Unique Opcodes59
Jump Instructions19
Storage Operations6

External Links

Related contracts