diff --git a/api/eth_types.go b/api/eth_types.go index dde434ab0..a27c5fca6 100644 --- a/api/eth_types.go +++ b/api/eth_types.go @@ -197,7 +197,6 @@ type EthTxReceipt struct { BlockNumber EthUint64 `json:"blockNumber"` From EthAddress `json:"from"` To *EthAddress `json:"to"` - StateRoot EthHash `json:"root"` Status EthUint64 `json:"status"` ContractAddress *EthAddress `json:"contractAddress"` CumulativeGasUsed EthUint64 `json:"cumulativeGasUsed"` @@ -205,6 +204,7 @@ type EthTxReceipt struct { EffectiveGasPrice EthBigInt `json:"effectiveGasPrice"` LogsBloom EthBytes `json:"logsBloom"` Logs []EthLog `json:"logs"` + Type EthUint64 `json:"type"` } const ( diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 9d4dc890a..74d6ceb4c 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -1459,7 +1459,7 @@ func newEthTxReceipt(ctx context.Context, tx api.EthTx, lookup *api.MsgLookup, r BlockNumber: tx.BlockNumber, From: tx.From, To: tx.To, - StateRoot: api.EmptyEthHash, + Type: api.EthUint64(2), LogsBloom: []byte{0}, } @@ -1481,6 +1481,12 @@ func newEthTxReceipt(ctx context.Context, tx api.EthTx, lookup *api.MsgLookup, r } if len(events) > 0 { + // TODO return a dummy non-zero bloom to signal that there are logs + // need to figure out how worth it is to populate with a real bloom + // should be feasible here since we are iterating over the logs anyway + receipt.LogsBloom = make([]byte, 256) + receipt.LogsBloom[255] = 0x01 + receipt.Logs = make([]api.EthLog, 0, len(events)) for i, evt := range events { l := api.EthLog{