EIP-7880은 EOF(EVM Object Format) 환경에서 실행 중인 컨트랙트가 자신의 코드 주소를 조회할 수 있는 EXTCODEADDRESS 명령어를 도입합니다. 이 명령어는 프록시 패턴과 같이 실행 컨텍스트에서 자신의 주소를 알아야 하는 시나리오에서 유용합니다.
Overview
EXTCODEADDRESS is a new EOF opcode that pushes the address of the currently-executing code onto the stack. In non-EOF contexts this information is already accessible via ADDRESS, but EOF's stricter code segmentation makes a dedicated opcode necessary.
Motivation
Proxy and delegate-call patterns often need to distinguish between the code address and the caller address. Without EXTCODEADDRESS, EOF contracts must resort to workarounds that can increase complexity and gas cost.
Technical Design
The opcode reads from the execution frame's code address slot rather than the message call's to-address, ensuring correctness under DELEGATECALL. It costs a small fixed amount of gas comparable to similar stack-manipulation opcodes.
Current Status
The proposal is under active Review as part of the broader EOF feature set. Final inclusion depends on coordination with other EOF EIPs targeting the same hardfork.