---
eip: 8360
title: TCREATE Opcode
description: Introduce a new opcode for creating contracts that exist only for the duration of a single transaction
author: Helkomine (@Helkomine), abc-123-c (@abc-123-c), Milos (@milonite), Peter Phillips (@PeterMPhillips)
discussions-to: https://ethereum-magicians.org/t/eip-8360-tcreate-opcode/29258
status: Draft
type: Standards Track
category: Core
created: 2026-08-03
requires: 161, 684, 1014, 1153, 2681, 3529, 6780, 7708, 7928, 8037, 8038
---

## Abstract

This EIP introduces a new EVM opcode, `TCREATE`, where `T` stands for transient, providing an official, gas-efficient, and state-aware mechanism for deploying temporary contracts.

## Motivation

Many Ethereum applications do not require deployed code to persist beyond a single transaction. Examples include state-channel contracts, single-use accounts, and other ephemeral execution environments.

Today, such patterns rely on a combination of `CREATE`/`CREATE2` and `SELFDESTRUCT`. However, `SELFDESTRUCT` has no longer provided gas refunds since [EIP-3529](./eip-3529.md), can only delete contracts created within the same transaction since the Cancun upgrade, and is expected to undergo further semantic restrictions in future protocol upgrades. As a result, the deploy-and-self-destruct pattern is no longer economically attractive, nor can its long-term behavior be relied upon.

Providing a dedicated EVM opcode for temporary contract deployment offers a lower-cost alternative while improving state management by preventing unnecessary long-term code accumulation. This proposal also provides a gradual migration path away from `SELFDESTRUCT`.

The proposal is fully compatible with account abstraction. Existing account semantics remain unchanged, while accounts may deploy transient contracts to implement extended execution logic entirely through calldata, for example, hook-based execution. Such hooks may execute dedicated logic or serve as reusable code templates that are invoked through `DELEGATECALL`.

## Specification

### Parameters

| Parameter| Description| Value | Source |
| --- | --- | --- | --- |
| `TCREATE` | New opcode | TBD | This EIP |
| `BASE_OPCODE_COST` | Base opcode cost | 100 | This EIP |
| `CPSB` | State gas price per byte | 1530 | [EIP-8037](./eip-8037.md) |
| `STATE_BYTES_PER_NEW_ACCOUNT`| State bytes created per account| 120 | [EIP-8037](./eip-8037.md) |
| `WARM_ACCESS` | Touch of an already warm account or storage slot| 100 | [EIP-8038](./eip-8038.md) |
| `COLD_ACCOUNT_ACCESS` | Cold touch of an account | 3000 | [EIP-8038](./eip-8038.md) |
| `ACCOUNT_WRITE` | Write to an account's leaf values (nonce, balance, code hash), charged per operation | 9000 | [EIP-8038](./eip-8038.md) |

### Semantics

The behavior of `CREATE2` is defined in [EIP-1014](./eip-1014.md).

`TCREATE` behaves identically to `CREATE2` except for the following changes:

- The address is computed as `keccak256(0xfe || deployer_address || salt || keccak256(init_code))[12:]`, where `deployer_address` is the address of the account that executes `TCREATE` (the value returned by `ADDRESS` in the executing frame) and `||` denotes byte concatenation.
- The nonce of the account at `deployer_address` is not incremented. This applies in every outcome, including an address collision and a `REVERT` or exceptional halt of the initcode. Nonce changes caused by the initcode follow their existing rules. The nonce limit of [EIP-2681](./eip-2681.md) still applies: if the nonce of the account at `deployer_address` is `2^64-1`, `TCREATE` ends with `0` pushed on the stack and the target address is not accessed, as for `CREATE2`.
- At the end of the transaction, the code and nonce that the target account has during the transaction are discarded and are not written to the state. The account balance is preserved. An account that becomes empty is removed from the state at the end of the transaction in accordance with [EIP-161](./eip-161.md). The semantics are clarified further [here](#state-transition-handling).
- Code deployment rules and collision semantics are identical to `CREATE2`, except for the nonce rule above and the gas rules in [Gas Accounting](#gas-accounting). If the target address has a nonzero nonce or a nonzero code length, the creation fails as specified in [EIP-684](./eip-684.md): the initcode is not executed, `0` is pushed on the stack, and the gas passed to the creation is consumed. The target account has a nonzero nonce from the start of its initcode execution until the end of the transaction, unless the creation fails, so a further `TCREATE` to the same address in that transaction fails in this way.

### State transition handling

At the end of the transaction, the account state of every `TCREATE` account is finalized as follows:

- The account nonce is 0.
- The account has no code.
- The account balance is preserved.

A `TCREATE` account has no storage, because `SLOAD` and `SSTORE` halt in its context (see [`SLOAD` and `SSTORE` handling](#sload-and-sstore-handling)). Before the transaction, a `TCREATE` address has a zero nonce and no code, because otherwise the creation fails in accordance with [EIP-684](./eip-684.md). The post-transaction state of the account therefore differs from its pre-transaction state only in its balance, and finalization does not delete code or storage from the state. The only state entry that finalization can remove is an empty account, in accordance with [EIP-161](./eip-161.md).

### `TCREATE` accounts

A *`TCREATE` account* is the account at an address computed by `TCREATE` in the current transaction. An address is a `TCREATE` account from the start of initcode execution at that address until the end of the transaction. If that `TCREATE` fails, or a frame that contains it reverts, the address is no longer a `TCREATE` account.

Code executes *in the context of* a `TCREATE` account when the current address, as returned by `ADDRESS`, is a `TCREATE` account. This includes the initcode and the runtime code of that account, and code that the account executes through `DELEGATECALL` or `CALLCODE`. It does not include code that executes with another current address: code of accounts that the `TCREATE` account calls or creates with `CREATE` or `CREATE2`, and code of the `TCREATE` account that another account executes through `DELEGATECALL`, `CALLCODE`, or an [EIP-7702](./eip-7702.md) delegation.

Each rule of this EIP that applies to a `TCREATE` account applies to all code that executes in the context of that account, and only to that code.

### Opcode Behavior Changes

#### `SLOAD` and `SSTORE` handling

In the context of a `TCREATE` account, `SLOAD` and `SSTORE` MUST result in an exceptional halt of the current execution frame. The storage slot is not accessed, and no BAL entry is created for it. `TLOAD` and `TSTORE` ([EIP-1153](./eip-1153.md)) are unchanged and remain available.

#### BAL handling

Because `SLOAD` and `SSTORE` halt in the context of a `TCREATE` account, a `TCREATE` account has no storage entries in the block-level Block Access List (BAL) defined by [EIP-7928](./eip-7928.md).

The finalization defined in [State transition handling](#state-transition-handling) MUST be applied before the post-transaction values of the transaction are determined for the BAL. A `TCREATE` account therefore MUST NOT have `nonce_changes` or `code_changes` entries for the transaction, including when it executed `CREATE` or `CREATE2`. Its address is included in the BAL under the rules that [EIP-7928](./eip-7928.md) defines for `CREATE2` target addresses, and its balance changes are recorded in accordance with [EIP-7928](./eip-7928.md).

`TCREATE` does not by itself cause a `nonce_changes` entry for the executing account. A contract created by `CREATE` or `CREATE2` in the context of a `TCREATE` account is recorded as any other deployed contract.

#### `CREATE`, `CREATE2`, and `TCREATE` handling

In the context of a `TCREATE` account, `CREATE` and `CREATE2` are permitted and follow their existing semantics, including their gas costs. The contracts they create are not `TCREATE` accounts, and the finalization of this EIP does not apply to them.

The nonce of a `TCREATE` account is 1 when its initcode execution begins ([EIP-161](./eip-161.md)) and is reset to 0 at the end of the transaction. A `CREATE` executed when the account nonce is `n` derives its address from `n`. If the account is created again in a later transaction, a `CREATE` executed at a given nonce therefore derives the same address as a `CREATE` executed at that nonce in the earlier transaction. If that address has a nonzero nonce or a nonzero code length, the creation fails as specified in [EIP-684](./eip-684.md). This EIP does not change the nonce rule of `CREATE`: as for any other account that executes `CREATE`, the nonce of the `TCREATE` account is incremented when the creation fails in this way. A further `CREATE` in the same transaction therefore derives its address from the next nonce. A nonzero balance alone at that address does not cause the creation to fail.

A `CREATE2` address does not depend on the nonce. If the `TCREATE` account is created again in a later transaction, a `CREATE2` with the same salt and initcode derives the same address as in the earlier transaction. If that address has a nonzero nonce or a nonzero code length, the creation fails as specified in [EIP-684](./eip-684.md), as a repeated `CREATE2` from any other account does. `CREATE2` increments the nonce of the `TCREATE` account as it does for any other account, including when the creation fails in this way, so it changes the address that a later `CREATE` in the same transaction derives.

In the context of a `TCREATE` account, `TCREATE` is permitted. The account it creates is also a `TCREATE` account, and all rules of this EIP apply to it.

#### `SELFDESTRUCT` handling

In the context of a `TCREATE` account, `SELFDESTRUCT` behaves as specified in [EIP-6780](./eip-6780.md) for an account that was not created in the current transaction: it transfers the entire balance of the account to the target and halts the current execution frame. The account is not marked for deletion and is not treated as destroyed within the transaction for the purposes of [EIP-7928](./eip-7928.md); its BAL entries follow [BAL handling](#bal-handling), and it is finalized only as specified in [State transition handling](#state-transition-handling). The change to its balance is accounted as specified in [Gas Accounting](#gas-accounting), and the `SELFDESTRUCT` refill rules of [EIP-8037](./eip-8037.md) do not apply to it. All other rules of `SELFDESTRUCT`, including the state-gas charge when the transfer creates the target account and the transfer log of [EIP-7708](./eip-7708.md), are unchanged.

A contract created by `CREATE` or `CREATE2` in the context of a `TCREATE` account is not a `TCREATE` account. `SELFDESTRUCT` executed by that contract is not changed by this EIP. If its beneficiary is a `TCREATE` account, the change to the balance of that account is accounted as specified in [Gas Accounting](#gas-accounting).

#### Code opcode handling

This EIP does not change `CODESIZE`, `CODECOPY`, `EXTCODESIZE`, `EXTCODECOPY`, or `EXTCODEHASH`. `CODESIZE` and `CODECOPY` refer to the code that the current frame executes. During the transaction, `EXTCODESIZE`, `EXTCODECOPY`, and `EXTCODEHASH` observe a `TCREATE` account as they observe an account that `CREATE2` creates in the same transaction:

- During initcode execution, the account has no code. `CODESIZE` and `CODECOPY` in the initcode frame refer to the initcode. For the address of the account, `EXTCODESIZE` returns 0, `EXTCODECOPY` copies from empty code and fills the memory range with zeros, and `EXTCODEHASH` returns the hash of empty code. A call to the account executes no code.
- When the initcode returns and the code deposit succeeds, the returned code becomes the code of the account. From then until the end of the transaction, unless a frame that contains that `TCREATE` reverts, `EXTCODESIZE`, `EXTCODECOPY`, and `EXTCODEHASH` observe that code, and calls to the account execute it.
- A `TCREATE` that fails, and a `TCREATE` in a frame that later reverts, leave the code of the address as it was before that `TCREATE`, as for `CREATE2`.

After the transaction, the account has nonce 0 and no code, as specified in [State transition handling](#state-transition-handling). `EXTCODESIZE` returns 0, and `EXTCODEHASH` returns the value that [EIP-1052](./eip-1052.md) specifies: 0 if the account does not exist, and the hash of empty code if it holds a balance.

### Gas Accounting

Each execution of `TCREATE` is charged `BASE_OPCODE_COST` together with the execution-gas costs that normally apply to `CREATE2`, including initcode execution, jumpdest analysis, memory expansion, copying costs, and other execution-related charges.

`TCREATE` does not incur the account-creation charges associated with `CREATE2`, such as `GAS_NEW_ACCOUNT`, or the code-deposit state gas of [EIP-8037](./eip-8037.md) (`CPSB` per byte of deployed code). The code-deposit hash cost of [EIP-8037](./eip-8037.md), `6 × ceil(L / 32)` execution gas where `L` is the length of the deployed code, is charged as for `CREATE2`.

These waivers apply only to the account that `TCREATE` creates. `CREATE` and `CREATE2` executed in the context of a `TCREATE` account pay the same execution gas and state gas for the account that they create as from any other account. The value that they transfer out of the `TCREATE` account is accounted under the table below.

Account access costs continue to follow [EIP-8038](./eip-8038.md). In particular, accesses to cold accounts are charged `COLD_ACCOUNT_ACCESS` as appropriate.

State-gas accounting is defined separately by this EIP. Rather than charging for account creation itself, state-gas is charged only for state changes that cannot be reasonably reclaimed by the end of the transaction, and refilled when those state changes are reverted within the same transaction. `TCREATE` therefore charges no state gas for the creation of the account, because the nonce and the code of that account are not written to the state. Only changes of its balance are charged, including the value that `TCREATE` passes to it, as specified in the table below.

Any operation that modifies the balance of the target account of a `TCREATE` operation, including during contract initialization, performs state-gas accounting according to the following table. The original balance is the balance of the account at the start of the transaction. Each transfer of value to or from the account is one operation. The current balance and the new balance are its balances immediately before and after that transfer. For this table, an operation that leaves the balance unchanged, for example a transfer from the account to itself, does not modify the balance and causes no adjustment. The rows are evaluated in order, and the first matching row applies.

| Original balance | Current balance | New balance | Description | State-gas charges/refills |
| --- | --- | ---- | --- | --- |
| 0 | x | 0 | Balance restored to zero when the initial transaction balance was zero | `STATE_BYTES_PER_NEW_ACCOUNT × CPSB` refilled |
| 0 | 0 | x | First balance written to the account | `STATE_BYTES_PER_NEW_ACCOUNT × CPSB` charged |
| 0 or x | y | z | Existing account balance updated | No state-gas adjustment |

In the first two rows, x is a nonzero balance. In the third row, x, y and z stand for any balance, so this row applies to every other change of the balance.

A charge or a refill of this table is a state-gas charge or refill as defined in [EIP-8037](./eip-8037.md). A refill is therefore credited in last-in, first-out order: to `gas_left` up to the current value of `state_gas_from_gas_left`, and the remainder to `state_gas_reservoir`.

For example, a `TCREATE` account has a zero balance at the start of the transaction and receives its first nonzero value during it. The second row applies, and `STATE_BYTES_PER_NEW_ACCOUNT × CPSB` is charged. If the value arrived at the address before `TCREATE` executed there, [EIP-8037](./eip-8037.md) charged the same amount for the new account, and no row applies. If the account later transfers its entire balance with `CALL`, the first row applies, and the same amount is refilled. The charges that [EIP-8037](./eip-8037.md) defines for the recipient are separate. If that `CALL` creates the recipient account, [EIP-8037](./eip-8037.md) charges `STATE_BYTES_PER_NEW_ACCOUNT × CPSB` for it, and the net state-gas change of that `CALL` is zero.

This EIP does not change the `ACCOUNT_WRITE` charges of [EIP-8038](./eip-8038.md). These charges apply to a `TCREATE` account as to any other account, with no per-account tracking and no refund.

## Rationale

### Lower Deployment and Execution Costs

Today, combining `CREATE` with `SELFDESTRUCT` is the only mechanism for implementing temporary contracts. This approach is relatively expensive and no longer benefits from gas refunds, reducing incentives for efficient state management.

By making the cost of temporary contracts comparable to that of a regular `CALL`, this proposal encourages experimentation with transient execution models while avoiding unnecessary long-term state growth.

### Address Prefix Selection

The `0xfe` prefix is chosen to ensure that the address derivation scheme used by `TCREATE` cannot collide with that of `CREATE2`, which uses the `0xff` prefix as specified in [EIP-1014](./eip-1014.md).

The `TCREATE` preimage has the same length as the `CREATE2` preimage (85 bytes), so the prefix byte is what separates the two address spaces. As the first byte of an RLP encoding, `0xfe` starts a list whose payload is at least 2^48 bytes long, so it cannot collide with `CREATE` addresses, whose preimages are 23 to 31 bytes long and start with a byte from `0xd6` to `0xde`. The preimage fits in a single 136-byte keccak256 block.

### Initcode Hash in the Address

The address includes the hash of the initcode, as for `CREATE2`. `EOFCREATE` ([EIP-7620](./eip-7620.md)) and the creation of [EIP-7873](./eip-7873.md) omit it and derive the address from the sender and salt only. Their reasons do not apply to `TCREATE`: `EOFCREATE` deploys a subcontainer that is fixed in the calling code, and hashing it would prevent rewriting that container and would be repeated on every execution. `TCREATE` takes its initcode from memory, as `CREATE2` does, so without the hash the deploying account could execute different code at the same address.

A `TCREATE` address is created again in later transactions and keeps its balance between them. With the hash, a party that sends value to the address can verify from the address alone which code will execute there. A deployment that needs an address independent of the code of the deployed contract can use `CREATE` from a `TCREATE` account, as described in [`CREATE`, `CREATE2`, and `TCREATE` handling](#create-create2-and-tcreate-handling).

### Temporary Nonce Semantics

Although `TCREATE` creates only transient account state, the account it creates follows the nonce semantics of `CREATE2` during the transaction: its nonce is incremented from 0 to 1 before initcode execution, in accordance with [EIP-161](./eip-161.md).

This avoids introducing additional exceptional rules for address collision handling. In particular, the target account has a nonzero nonce from the start of initcode execution, which prevents multiple initialization frames from executing simultaneously at the same address before code deposition.

Resetting the nonce of `TCREATE` accounts at the end of the transaction preserves the stateless nature of `TCREATE` while allowing implementations to reuse existing contract creation logic with minimal modifications.

Unlike `CREATE2`, `TCREATE` does not increment the nonce of the deploying account. The `TCREATE` address does not depend on this nonce, so an increment has no function. A permanent increment would change the deploying account on every transient deployment. An increment that is restored at the end of the transaction would cause address collisions: a `CREATE` executed by the deploying account after `TCREATE` in the same transaction would use the incremented nonce, and after the restore a `CREATE` in a later transaction would derive the same address again. Leaving the nonce unchanged also removes the need to record and restore it at the end of the transaction.

The nonce limit of [EIP-2681](./eip-2681.md) is kept, although no increment can overflow, so that `TCREATE` fails under the same preflight conditions as `CREATE2`. An account cannot reach this nonce in practice.

For an EOA delegated through [EIP-7702](./eip-7702.md), `TCREATE` executed by the delegated code does not change the nonce of the EOA, whether or not the EOA is the transaction sender. Unlike `CREATE` and `CREATE2`, `TCREATE` therefore cannot invalidate pending transactions of the EOA through a nonce change.

### `SLOAD` and `SSTORE` handling

An earlier version of this EIP made `SLOAD` and `SSTORE` in a `TCREATE` account operate on storage discarded at the end of the transaction, to keep existing contract code working. Specifying that precisely requires three additional rules, each of which clients could implement differently. First, whether this storage is shared with the [EIP-1153](./eip-1153.md) transient storage: contracts can observe the choice, because `TLOAD` after `SSTORE` of the same key returns either the stored value or 0. Second, whether `SSTORE` keeps the gas stipend check of [EIP-2200](./eip-2200.md), which `TSTORE` does not have. Third, how these accesses are recorded in the BAL of [EIP-7928](./eip-7928.md).

Temporary contracts in current use do not use storage. Deposit forwarders, intent executors, and CREATE3 proxies keep their data in memory or read it from the deploying contract. `TLOAD` and `TSTORE` provide storage scoped to the transaction, and Solidity exposes them as `transient` state variables.

The prohibition keeps the account free of state other than its balance and removes the three rules above. A later upgrade can remove it, and only executions that halt under this EIP would change. Its cost is that code which reads or writes regular state variables halts in this context, including library code that keeps state in storage, and must use transient storage instead.

### `CREATE`, `CREATE2`, and `TCREATE` handling

If a `TCREATE` account executes `CREATE` before any other `CREATE` or `CREATE2` in a transaction, that `CREATE` derives its address from nonce 1. The address then depends only on `deployer_address`, the salt, and the `TCREATE` initcode. If the `TCREATE` initcode does not fix the code of the created contract, for example when the account receives the initcode of the created contract in a later call, the address does not depend on the code of the created contract. This is the property of the deployment pattern commonly called CREATE3, in which a proxy deployed with `CREATE2` deploys the target contract with `CREATE`, and the proxy then either persists or executes `SELFDESTRUCT`. `TCREATE` provides this property without a persistent proxy and without `SELFDESTRUCT`. The proxy leaves no code, nonce, or storage in the state; its account remains only if it holds a balance at the end of the transaction. Because `TCREATE` addresses use the `0xfe` prefix, the resulting addresses differ from those of existing CREATE3 deployers.

While a contract created in this way has a nonzero nonce or a nonzero code length, a repeated creation at its address fails in accordance with [EIP-684](./eip-684.md). The failed creation increments the nonce of the `TCREATE` account. This is the existing behavior of `CREATE`: [EIP-684](./eip-684.md) specifies the failure as if the first byte of the initcode were an invalid opcode, and the nonce of the creating account is incremented before the initcode is executed. While the contract at an address in the sequence exists, that address therefore cannot be deployed to again, and after a collision the account can continue with the next nonce.

This EIP adds no way to remove a contract created in this way, and no use case of this EIP depends on its removal. Under [EIP-6780](./eip-6780.md), a created contract that executes `SELFDESTRUCT` in the transaction that created it is removed, and a later transaction can then deploy different code at the same address. A CREATE3 deployer whose proxy executes `SELFDESTRUCT` has the same property today (see [Security Considerations](#security-considerations)). If [EIP-4758](./eip-4758.md) is active, `SELFDESTRUCT` does not remove the contract, and this case does not exist.

`CREATE2` in the context of a `TCREATE` account is permitted, because it needs no rule of its own. This EIP restricts an opcode only when its semantics in a `TCREATE` account would otherwise have to be defined, as for `SLOAD` and `SSTORE`. The address of a `CREATE2` includes the hash of the initcode of the created contract. A repeated `CREATE2` with the same salt and initcode from a `TCREATE` account that is created again therefore derives the same address. While the contract created earlier exists, the creation collides in accordance with [EIP-684](./eip-684.md), in the same way as a repeated `CREATE2` from any other account.

An earlier version of this EIP made `CREATE2` halt in this context. It gave two reasons. `CREATE2` adds no capability: the deploying account can obtain an equally deterministic address by executing `CREATE2` directly, and existing patterns that create a contract from a proxy removed in the same transaction use `CREATE`. A prohibition can also be removed in a later upgrade, while a prohibition that is added later changes executions that succeed. The prohibition needed an additional check in clients and made existing code halt, including a Solidity `new` expression with a `salt` option and library code that deploys a clone at a deterministic address. A compiler cannot detect this case, because it does not know whether the contract will be deployed with `TCREATE`. Permitting `CREATE2` removes that exceptional case and gives up the option to prohibit `CREATE2` later without changing executions that succeed. No reason for a later prohibition is known, because `CREATE2` behaves in a `TCREATE` account as in any other account. The repeated creation that fails in later transactions, described in [Security Considerations](#security-considerations), occurs with `CREATE` in the same way, so a prohibition of `CREATE2` alone would not prevent it.

`TCREATE` in the context of a `TCREATE` account creates another account that is removed at the end of the transaction. Creating the parent again in a later transaction and executing the same `TCREATE` therefore does not collide, and `TCREATE` is permitted.

### Code opcode handling

The code opcodes are unchanged, so a temporary contract is observed in the same way as a contract of the `CREATE2` and `SELFDESTRUCT` pattern that it replaces. Under [EIP-6780](./eip-6780.md), the code of such a contract also remains observable until the end of the transaction. Accounts that call a `TCREATE` account, or execute its code through `DELEGATECALL`, need that code during the transaction. Hiding it from `EXTCODESIZE`, `EXTCODECOPY`, and `EXTCODEHASH` would add a special case with no benefit.

### `SELFDESTRUCT` handling

Without a rule, `SELFDESTRUCT` in the context of a `TCREATE` account would be subject to overlapping rules: [EIP-6780](./eip-6780.md) deletes an account that executes `SELFDESTRUCT` in the transaction that created it, [EIP-8037](./eip-8037.md) gives no state-gas refill in that case, [EIP-7928](./eip-7928.md) records the storage of such an account as reads, and this EIP refills state gas when the balance of a `TCREATE` account returns to an original value of 0.

The finalization of this EIP, not `SELFDESTRUCT`, removes the account. `SELFDESTRUCT` therefore keeps only the meaning that [EIP-6780](./eip-6780.md) gives it for accounts created in an earlier transaction and that [EIP-4758](./eip-4758.md) proposes for all accounts: it moves the balance without executing code at the target. The rules of this EIP apply to the balance change and the BAL, so the rules above do not overlap, and existing temporary-contract code that ends with `SELFDESTRUCT` runs unchanged. Prohibiting `SELFDESTRUCT` was considered. A value-transferring call is not an equivalent replacement, because it executes code at the target and fails if the target reverts; `PAY` ([EIP-5920](./eip-5920.md)) would be.

### `ACCOUNT_WRITE` for Balance Changes

An earlier version of this EIP charged `ACCOUNT_WRITE` once per `TCREATE` account and refunded it when the balance returned to its original value. [EIP-8038](./eip-8038.md) charges `ACCOUNT_WRITE` per operation, with no per-account tracking and no refund. A refund would also go through the refund counter of the transaction, which is capped and only credited at the end of the transaction, so a transaction would still need a gas limit that covers the full charge. This EIP therefore keeps the [EIP-8038](./eip-8038.md) charges unchanged and adjusts only state gas, which [EIP-8037](./eip-8037.md) refills directly.

### State-Gas Accounting for Balance Transfers

Removing balance accounting entirely would simplify gas accounting but would reintroduce a special case that [EIP-8246](./eip-8246.md) sought to eliminate.

Preserving balance semantics while accounting only for temporary state changes provides a more consistent design. This decision may be revisited if native balance-burning mechanisms are introduced in the future.

### Extended state accounting method

Unlike `CREATE2`, whose state-gas accounting is tied to permanent account creation, `TCREATE` accounts are ephemeral. Therefore, charging for account creation itself would overestimate the persistent state introduced by the opcode. Instead, this EIP generalizes the state-accounting model of [EIP-8037](./eip-8037.md) by charging only for state that remains after transaction execution and refilling charges when transient state is completely eliminated.

### State creation gas is not upfront

The absence of upfront account-creation and code-deposit state-gas charges is possible because the client knows from the execution of `TCREATE` that the target account is temporary. Unlike `CREATE2`, whose resulting account may persist after the transaction, the code and nonce of a `TCREATE` account are guaranteed by the protocol not to be written to the state at the end of the transaction. The client therefore does not need to reserve gas in advance for persistent account state that cannot survive the transaction.

This does not make account creation or code execution free. The execution costs required to initialize and execute the account are still charged normally, including the hash of the deposited code, which clients compute at deposit to set the code hash of the account, and state-gas is charged whenever execution creates state that may persist beyond the temporary lifetime of the account. In particular, the first nonzero balance of a `TCREATE` account whose balance was zero at the start of the transaction is charged as account state, because the balance is preserved at the end of the transaction. If that balance is subsequently transferred out in full during the same transaction, the corresponding state-gas charge is refilled because the state no longer needs to be preserved.

## Backwards Compatibility

### Contract Execution Flow

This EIP adds a new opcode and does not change the behavior of existing contracts.

A temporary-use contract deployed with `TCREATE` instead of `CREATE` or `CREATE2` followed by `SELFDESTRUCT` differs in the following ways:

- No deployed bytecode is retained after the transaction completes. The account balance remains at the account's address.
- Its address uses the `0xfe` prefix and differs from the address of an equivalent `CREATE2` deployment.
- `TCREATE` does not increment the nonce of the deploying account.
- `SLOAD` and `SSTORE` in the context of the account result in an exceptional halt. Code that uses regular state variables cannot run in this context. Such code can use transient storage.
- `SELFDESTRUCT` in the context of the account transfers the balance and halts, without deleting the account.

Applications requiring persistent code or storage should continue to use `CREATE` or `CREATE2`.

## Security Considerations

### Repeated Contract Deployment

A `TCREATE` address depends only on `deployer_address`, the salt, and the initcode hash. It is derived in the same way as a `CREATE2` address, but with the prefix `0xfe`. No account state except balance is written to the state at the end of the transaction, so the same address is a valid deployment target again in a later transaction under [EIP-684](./eip-684.md).

Contracts whose runtime code depends on execution context (for example, using `NUMBER`, `ORIGIN`, or similar opcodes) may exhibit different behavior across deployments if appropriate safeguards are not implemented.

### Contracts Created from `TCREATE` Accounts

The nonce of a `TCREATE` account is 1 at the start of its initcode execution in every transaction in which it is created, so a `CREATE` executed at a given nonce derives the same address in each of these transactions. These addresses commit to the `TCREATE` initcode, but not to the initcode passed to `CREATE` unless the `TCREATE` initcode fixes it. If the `TCREATE` account takes that initcode from its input, the party that supplies it decides the code at these addresses. A contract that executes `TCREATE` for arbitrary callers should include the caller address in the salt, as current CREATE3 factories do, and a `TCREATE` account should accept `CREATE` and `CREATE2` requests only from its deploying account. Otherwise any caller can deploy arbitrary code with `CREATE` at an address that another user expects, on every chain where the deploying contract has the same address. With `CREATE2` the address fixes the initcode, but any caller can create the expected contract first, in an execution context that it chooses, and the expected creation then fails.

An earlier `CREATE` or `CREATE2` in the same transaction increments the nonce of the `TCREATE` account and so changes the address of a later `CREATE`. The increment also occurs when the initcode of the earlier creation reverts or its address collides. It does not occur when the creation fails before the new address is accessed: the endowment exceeds the balance of the account, the call depth limit is reached, or the nonce is at its limit. The balance of a `TCREATE` address is preserved between transactions and any account can increase it, so the result of the endowment check can differ between transactions. A `TCREATE` account that serves as a CREATE3 proxy should execute that `CREATE` before any other `CREATE` or `CREATE2`.

The finalization of this EIP does not remove a contract created by `CREATE` or `CREATE2` from a `TCREATE` account. When the account is created again and executes the same creation while that contract exists, the creation fails as specified in [EIP-684](./eip-684.md) and consumes the execution gas passed to it. A Solidity `new` expression, and library code that checks the result, then reverts. If the initcode of the `TCREATE` account executes such a creation every time, every later `TCREATE` of that address fails, and value at that address can no longer be moved. Code in a `TCREATE` account should check for code at the derived address before it creates a contract, and should use `TCREATE` for a contract that it needs only during the transaction. This check does not detect a contract that was deployed with empty code, because that contract has nonce 1 and no code.

If a contract created in this way executes `SELFDESTRUCT` in the transaction that created it, it is removed in accordance with [EIP-6780](./eip-6780.md). A later transaction can create the `TCREATE` account again and deploy different code at the same address. For a contract created by `CREATE2`, the address fixes the initcode. Different code then requires initcode that returns different code in different executions, for example code that it reads from another contract or code that depends on the block number. Existing CREATE3 deployers that remove their proxy with `SELFDESTRUCT` have the same property. A contract that persists beyond the transaction that created it cannot be replaced. This case exists only while `SELFDESTRUCT` can remove a contract in the transaction that created it. If [EIP-4758](./eip-4758.md) is active, it cannot, and no contract created in this way can be replaced.

### Authority Granted to `TCREATE` Accounts

The finalization at the end of the transaction does not remove state that other accounts hold about a `TCREATE` address, such as an owner, an allowance, or an allowlist entry. In a later transaction, the deploying account can use that authority again by creating the account again with the same salt and initcode, and that initcode can return different runtime code in each transaction. A contract created by `CREATE` or `CREATE2` from a `TCREATE` account observes that account as `CALLER` in its initcode. Contracts should not grant lasting authority to a `TCREATE` address. A contract created from one should receive privileged addresses as explicit initcode arguments.

An [EIP-7702](./eip-7702.md) delegation to a `TCREATE` address is a case of such authority. The delegation indicator remains in the code of the delegating account, but the `TCREATE` address has no code between transactions. In a transaction that does not create the `TCREATE` account, a call to the delegating account executes empty code and succeeds with no effect. The delegated code is available only after the deploying account creates the `TCREATE` account in the same transaction, and the initcode can return different runtime code in each transaction. This code executes in the context of the delegating account, so the rules of this EIP do not apply to it. Accounts should not delegate to a `TCREATE` address.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).
