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: 0x3c
Introduced: Frontier (EVM genesis)
EXTCODECOPY copies bytecode from an external account into memory.
Specification
Stack Input:
Stack Output:
Gas Cost: 700 (access) + 3 + memory expansion + (length / 32) * 3
Behavior
Copies length bytes from external account’s code at offset to memory at destOffset. Zero-pads if code bounds exceeded.
Examples
Copy Contract Code
Verify Implementation
Gas Cost
Base: 700 gas (Tangerine Whistle+)
Memory expansion: Variable
Copy cost: 3 gas per word
Berlin+: 2600 (cold) / 100 (warm) + memory + copy
Common Usage
Clone Factory
Implementation
References