-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Update EIP-7708: Clarify selfdestruct event #11127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
1ba8c2f
bee6a22
eefb01c
76f6c08
c711809
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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), jwasinger (@jwasinger) | ||
| discussions-to: https://ethereum-magicians.org/t/eip-7708-eth-transfers-emit-a-log/20034 | ||
| status: Draft | ||
| type: Standards Track | ||
|
|
@@ -42,15 +42,17 @@ 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-holding account closure, (i.e., after `SELFDESTRUCT`), 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 receives unspent ETH after it is already flagged for `SELFDESTRUCT`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For 2, a balance transfer is emitted at the time the contract receives balance post-selfdestruct and another selfdestruct log is emitted when the account is removed at finalization.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Corrected my above comment
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, yeah! Revised wording, sounds good?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks good. |
||
|
|
||
| ## 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. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.