# EIP-8298 Drafts SETCODEFROM Instruction for Ethereum Bytecode Reuse

Canonical: https://forkbrief.com/news/3867a4bc-92b8-4bae-9cc4-faca93b91ab3
Published: 2026-09-09T06:02:31.941Z
Publisher: Fork Brief

A draft of EIP-8298 proposes a SETCODEFROM instruction for the Ethereum Virtual Machine, allowing contracts to adopt code from other live contracts to improve deployment efficiency and enable secure account migration, while maintaining deterministic code availability.

## Proposal Targets Code Reuse and Deployment Costs

A new draft specification, EIP-8298, introduces the SETCODEFROM instruction to the Ethereum Virtual Machine (EVM). This opcode lets an account adopt the code hash of a live, deployed contract, enabling efficient bytecode reuse. The approach is designed to address high gas costs for deploying multiple contracts with identical runtime code—especially relevant if future proposals, like EIP-8037's gas repricing, make deployments more expensive relative to state growth. [ethereum-magicians.org](https://ethereum-magicians.org/t/eip-8298-setcodefrom-code-reuse-instruction/28779); [github.com](https://github.com/ethereum/EIPs/pull/11800); [github.com](https://github.com/ethereum/EIPs/pull/12259)

## Supports Secure EOA Migration

EIP-8298 also provides a migration path for externally owned accounts (EOAs) desiring to move to smart contract wallets with protocol-level ECDSA signature authorization disabled. Using SETCODEFROM, migration code can initialize account state for new wallet logic and then adopt deployed code, permanently disabling ECDSA transactions as specified in EIP-3607. This enhances security and aligns with emerging account abstraction models. [ethereum-magicians.org](https://ethereum-magicians.org/t/eip-8298-setcodefrom-code-reuse-instruction/28779); [github.com](https://github.com/ethereum/EIPs/pull/11800)

## Deterministic and Limited Scope for Safety

Unlike broader proposals such as SETCODE (EIP-6913), SETCODEFROM restricts adoption only to code that already exists in the consensus state, preserving deterministic code availability and avoiding arbitrary mutable code. The instruction is not allowed in contract initcode and does not enable general-purpose upgrades, which aims to simplify analysis and compatibility with other EVM changes. The draft has recently been updated to clarify gas pricing and compatibility with current and pending protocol changes. [ethereum-magicians.org](https://ethereum-magicians.org/t/eip-8298-setcodefrom-code-reuse-instruction/28779); [github.com](https://github.com/ethereum/EIPs/pull/11800); [github.com](https://github.com/ethereum/EIPs/pull/12259)

## Sources

- [Add EIP: SETCODEFROM Code Reuse Instruction by colinlyguo · Pull Request \#11800 · ethereum/EIPs](https://github.com/ethereum/EIPs/pull/11800) — github.com
- [Update EIP-8298: clarify code lifecycle and gas pricing by colinlyguo · Pull Request \#12259 · ethereum/EIPs](https://github.com/ethereum/EIPs/pull/12259) — github.com
- [EIP-8298: SETCODEFROM Code Reuse Instruction](https://ethereum-magicians.org/t/eip-8298-setcodefrom-code-reuse-instruction/28779) — Ethereum Magicians

- [Editorial policy](https://forkbrief.com/editorial-policy)
- [Request a correction](https://forkbrief.com/corrections)
