Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions EIPS/eip-7708.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
eip: 7708
title: ETH transfers emit a log
description: All ETH transfers emit a log
author: Vitalik Buterin (@vbuterin), Peter Davies (@petertdavies), Etan Kissling (@etan-status), Gajinder Singh (@g11tech), Carson (@carsons-eels)
author: Vitalik Buterin (@vbuterin), Peter Davies (@petertdavies), Etan Kissling (@etan-status), Gajinder Singh (@g11tech), Carson (@carsons-eels), Jared Wasinger (@jwasinger)
discussions-to: https://ethereum-magicians.org/t/eip-7708-eth-transfers-emit-a-log/20034
status: Draft
type: Standards Track
Expand Down Expand Up @@ -42,15 +42,18 @@ This matches the [ERC-20](./eip-20.md) Transfer event definition.

A log, identical to a LOG2, is issued for:

- Any nonzero-value-transferring `SELFDESTRUCT` to the same account, at the time that the value removal executes
- Any nonzero-value-transferring `SELFDESTRUCT` to self, at the time that the value subtraction executes
- Any nonzero-value-holding account closure, after any other logs created by EVM execution, but before charging the [EIP-1559](./eip-1559.md) priority fee, in lexicographical order of closed account address

| Field | Value |
| - | - |
| `address` emitting log | `0xfffffffffffffffffffffffffffffffffffffffe` ([`SYSTEM_ADDRESS`](./eip-4788.md)) |
| `topics[0]` | `0x4bfaba3443c1a1836cd362418edc679fc96cae8449cbefccb6457cdf2c943083` (`keccak256('Selfdestruct(address,uint256)')`) |
| `topics[1]` | `from` address (zero prefixed to fill uint256) |
| `topics[1]` | Closed `contract_address` (zero prefixed to fill uint256) |
| `data` | `amount` in Wei (big endian uint256)

The Selfdestruct log is emitted when (1) a `SELFDESTRUCT` to self is triggered, or when (2) a smart contract is closed after receiving more ETH after already flagged for `SELFDESTRUCT`.

## Rationale

This is the simplest possible implementation that ensures that all ETH transfers are implemented in some kind of record that can be easily accessed through making RPC calls into a node, or through asking for a Merkle branch that is hashed into the block root. The log type is compatible with the ERC-20 token standard, but does not introduce any overly-specific ERC-20 features (eg. ABI encodings) into the specification.
Expand Down