This page is a placeholder. All examples on this page are currently AI-generated and are not correct. This documentation will be completed in the future with accurate, tested examples.
Overview
Opcode: 0x3d
Introduced: Byzantium (EIP-211)
RETURNDATASIZE returns the size in bytes of the return data from the most recent external call.
Specification
Stack Input:
Stack Output:
Gas Cost: 2 (GasQuickStep)
Behavior
Returns the length of the return data buffer populated by the last CALL, STATICCALL, DELEGATECALL, or CALLCODE.
Key characteristics:
- Introduced in Byzantium hardfork
- Updated after each external call
- 0 if no call made yet or call failed
- Persists until next call
Examples
Basic Usage
Efficient Return Data Handling
Gas Cost
Cost: 2 gas (GasQuickStep)
Common Usage
Proxy Pattern
Dynamic Return Handling
Security
Safe opcode - just returns buffer size.
Implementation
References