Overview
Opcode:0x3c
Introduced: Frontier (EVM genesis)
EXTCODECOPY copies bytecode from an external account into memory.
Specification
Stack Input:Behavior
Copieslength 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 + copyCommon Usage
Clone Factory
Implementation
- TypeScript
References
- Yellow Paper - Section 9.1
- EVM Codes - EXTCODECOPY
- EIP-150
- EIP-2929

