Back to Home

Proxy

0x000a7e93fb00...8c1a7dd41c14
ByzantiumSource VerifiedEdit this contract
Deployed October 25, 2017 (8 years ago)Block 4,423,812

A 180 byte proxy that checks its implementation still has code, delegates the call, and returns a fixed size window of the result.

Byzantium EraVerified Source

Historical Significance

The fixed return size dates this contract to before RETURNDATASIZE was usable, when a proxy had to guess how much return data to reserve. Guessing high wasted memory gas on every call; guessing low truncated results. Reserving a flat 4096 bytes was the pragmatic answer, and the extcodesize guard addresses the other hazard of the era, that a delegatecall to nothing looks exactly like success.

This contract is a proxy that delegates all calls to 0xaf8a60b8d53f0563abadc3b33d0bf28517a6b696. See the master contract for the full logic.
Key Facts
Deployment Block
4,423,812
Deployment Date
Oct 25, 2017, 12:31 AM
Code Size
180.0 B
Transactions by Year
20182
20191

Description

An internal helper receives the hardcoded implementation address and the calldata. It uses a Yul switch on extcodesize to reject a target with no code, which matters because a delegatecall to an empty address succeeds silently and would make every call appear to work.

The delegatecall forwards all gas minus ten thousand and asks for a fixed 4096 byte return window rather than using returndatasize. A second switch on the result reverts through the invalid opcode on failure, and on success returns that whole fixed window.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.18

Bytecode Overview

Opcodes180
Unique Opcodes85
Jump Instructions9
Storage Operations0

External Links