Back to Home

My Token(MTK)

Token
0x31dfa020ffcd...3d0f8890cc0c
DAO ForkContract #23KExact Bytecode MatchEdit this contract
Deployed September 15, 2016 (9 years ago)Block 2,265,217

A fixed-supply token with transfers and allowance spending, deployed September 2016.

DAO Fork EraVerified Source

Historical Significance

Instead of decrementing an allowance as it is drawn, this revision of the tutorial keeps a separate ledger of how much of each approval has been spent and compares against it. The result is the same limit enforced from the opposite direction, and it avoids the write-after-read that made the ERC-20 approve race famous. It is a road the standard did not take, preserved in the contracts that copied the tutorial while it was still there.

Context

By late 2016 ERC-20 had settled the interface a token was expected to answer, and the ethereum.org tutorial was still where most people copied one from. OpenZeppelin's contracts were not yet the default, so the code behind a token of this period is usually the tutorial's, with the constructor arguments changed and nothing else.

Token Information
Token Name
My Token
Symbol
MTK
Decimals
2
Key Facts
Deployment Block
2,265,217
Deployment Date
Sep 15, 2016, 09:43 PM
Code Size
1.5 KB
Gas at Deploy
577,474

Description

A token from the ethereum.org tutorial. Balances sit in a public balanceOf mapping and transfer(to, value) moves them, throwing rather than returning false when the sender is short and checking the recipient's balance for overflow before adding to it. An allowance mapping records what each spender has been authorised for. ApproveAndCall sets the allowance and calls receiveApproval on the spender in the same transaction, so a spending contract learns of its allowance at the moment it is granted. A separate spentAllowance ledger records how much of each approval has already been drawn, rather than decrementing the allowance itself. There is no owner and no way to create further units: the supply written at deployment is the whole supply. It was deployed as My Token, with the symbol MTK and 2 decimal places.

Source Verified

Exact bytecode match(1,557 bytes)
Compiler: v0.4.0+

Historian Categories

Token
Heuristic Analysis

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

Detected Type: Token
Has ERC-20-like patterns

Bytecode Overview

Opcodes1,557
Unique Opcodes124
Jump Instructions78
Storage Operations30

External Links

Related contracts