diff --git a/eth/tracers/native/prestate.go b/eth/tracers/native/prestate.go index c072bf755f..b3d3bb7b96 100644 --- a/eth/tracers/native/prestate.go +++ b/eth/tracers/native/prestate.go @@ -45,6 +45,8 @@ type stateMap = map[common.Address]*account type account struct { Balance *big.Int `json:"balance,omitempty"` + // Pointer so omitempty can omit unchanged code (nil) while still + // emitting "0x" when code is cleared (e.g. EIP-7702 deauthorization). Code *[]byte `json:"code,omitempty"` CodeHash *common.Hash `json:"codeHash,omitempty"` Nonce uint64 `json:"nonce,omitempty"`