From 86b71deca4146057743a8ec3e502f31015dec645 Mon Sep 17 00:00:00 2001 From: Sahil-4555 Date: Mon, 16 Feb 2026 09:23:36 +0530 Subject: [PATCH] chore: burn logs --- execution/protocol/misc/eip7708.go | 14 +++++++------- execution/vm/instructions.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/execution/protocol/misc/eip7708.go b/execution/protocol/misc/eip7708.go index f62ce647281..b9193930e59 100644 --- a/execution/protocol/misc/eip7708.go +++ b/execution/protocol/misc/eip7708.go @@ -37,8 +37,8 @@ var ( // keccak256('Transfer(address,address,uint256)') EthTransferLogEvent = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") - // keccak256('Selfdestruct(address,uint256)') - EthSelfDestructLogEvent = common.HexToHash("0x4bfaba3443c1a1836cd362418edc679fc96cae8449cbefccb6457cdf2c943083") + // keccak256('Burn(address,uint256)') + EthBurnLogEvent = common.HexToHash("0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5") ) // EthTransferLog creates and ETH transfer log according to EIP-7708. @@ -56,14 +56,14 @@ func EthTransferLog(from, to common.Address, amount uint256.Int) *types.Log { } } -// EthSelfDestructLog creates and ETH self-destruct burn log according to EIP-7708. +// EthBurnLog creates an ETH burn log according to EIP-7708. // Specification: https://eips.ethereum.org/EIPS/eip-7708 -func EthSelfDestructLog(from common.Address, amount uint256.Int) *types.Log { +func EthBurnLog(from common.Address, amount uint256.Int) *types.Log { amount32 := amount.Bytes32() return &types.Log{ Address: params.SystemAddress.Value(), Topics: []common.Hash{ - EthSelfDestructLogEvent, + EthBurnLogEvent, from.Hash(), }, Data: amount32[:], @@ -92,7 +92,7 @@ func LogSelfDestructedAccounts(ibs evmtypes.IntraBlockState, sender accounts.Add if !rules.IsAmsterdam { return } - // Emit SelfDestruct logs where accounts with non-empty balances have been deleted + // Emit burn logs where accounts with non-empty balances have been deleted // See case (2) in https://eips.ethereum.org/EIPS/eip-7708#selfdestruct-processing removedWithBalance := ibs.GetRemovedAccountsWithBalance() if removedWithBalance != nil { @@ -100,7 +100,7 @@ func LogSelfDestructedAccounts(ibs evmtypes.IntraBlockState, sender accounts.Add return removedWithBalance[i].Address.Cmp(removedWithBalance[j].Address) < 0 }) for _, sd := range removedWithBalance { - ibs.AddLog(EthSelfDestructLog(sd.Address, sd.Balance)) + ibs.AddLog(EthBurnLog(sd.Address, sd.Balance)) } } } diff --git a/execution/vm/instructions.go b/execution/vm/instructions.go index 04fdf5c8c28..d232d83e1f2 100644 --- a/execution/vm/instructions.go +++ b/execution/vm/instructions.go @@ -1317,7 +1317,7 @@ func opSelfdestruct6780(pc uint64, evm *EVM, scope *CallContext) (uint64, []byte if self != beneficiaryAddr { ibs.AddLog(misc.EthTransferLog(self.Value(), beneficiaryAddr.Value(), balance)) } else if newContract { - ibs.AddLog(misc.EthSelfDestructLog(self.Value(), balance)) + ibs.AddLog(misc.EthBurnLog(self.Value(), balance)) } } tracer := evm.Config().Tracer