Skip to content

Update EIP-7997: Add EAS-like bytecode + add required EIP#11856

Open
jochem-brouwer wants to merge 4 commits into
ethereum:masterfrom
jochem-brouwer:factory-contract-sys
Open

Update EIP-7997: Add EAS-like bytecode + add required EIP#11856
jochem-brouwer wants to merge 4 commits into
ethereum:masterfrom
jochem-brouwer:factory-contract-sys

Conversation

@jochem-brouwer

@jochem-brouwer jochem-brouwer commented Jul 3, 2026

Copy link
Copy Markdown
Member

This PR adds EAS-like bytecode treating the factory contract as a system contract, equivalent to existing system contract EIPs https://eips.ethereum.org/EIPS/eip-7002 and https://eips.ethereum.org/EIPS/eip-7251 (see "Bytecode")

Code taken from ethereum/sys-asm#51 after @fjl's comment on discord, thanks for that 😄 👍

Since we enforce the irreglar state transition to set the nonce from 0 to 1 in case the nonce of the account is (before transition) 0, which is a result of EIP-161 when created contracts started with nonce 1, not nonce 0.

@jochem-brouwer jochem-brouwer requested a review from eth-bot as a code owner July 3, 2026 02:32
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Jul 3, 2026
@eth-bot

eth-bot commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

File EIPS/eip-7997.md

Requires 1 more review from Authors: @Arachnid, @frangio, @nerolation

@eth-bot eth-bot added the a-review Waiting on author to review label Jul 3, 2026
Comment thread EIPS/eip-7997.md
title: Deterministic Factory Contract
description: A minimal `CREATE2` factory shared by EVM chains.
author: Francisco Giordano (@frangio), Toni Wahrstätter (@nerolation), Nick Johnson (@Arachnid)
author: Francisco Giordano (@frangio), Toni Wahrstätter (@nerolation), Nick Johnson (@Arachnid), Jochem Brouwer (@jochem-brouwer)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: adding myself as author here, if this is too much will remove myself.

Comment thread EIPS/eip-7997.md
category: Core
created: 2025-08-03
requires: 1014
requires: 161, 1014

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EIP-161 is implicitly required because of the hard-enforcement of setting nonce to 1 for the irregular state transition (or at least the result enforces that once the contract is deployed it has nonzero nonce). I assume this is because otherwise, if the nonce is not changed, it could deploy a contract with nonce 0, which would then be a new-ish kind of account which cannot be deployed anymore currently.

Note that prior to EIP-161 (Spurious Dragon) contracts deployed had nonce 0, and those which do not have CREATE/CALLCODE/DELEGATECALL opcodes are (currently) not possible to raise their nonce, so an account of type: "has code, nonce zero" currently exist on Mainnet.

I am actually not sure if we should impose "rules" in this EIP for the state transition. I would argue to simplify this EIP we leave out the irregular state transition in the specification. This EIP, once it is active, enforces that this specific address has this specific bytecode, and nothing more.

If a chain cannot deploy the factory by the keyless transaction and it did not have it in genesis, then this chain itself should come up with a way to add this factory (likely: via an irregular state transition).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants