diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 0d3aeb35c6..f5d6016efe 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -670,6 +670,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, "contractAddress": nil, "logs": receipt.Logs, "logsBloom": receipt.Bloom, + "type": hexutil.Uint(tx.Type()), } // Assign receipt status or post state. @@ -681,7 +682,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, if receipt.Logs == nil { fields["logs"] = [][]*types.Log{} } - if borReceipt != nil { + if borReceipt != nil && idx == len(receipts)-1 { fields["transactionHash"] = txHash } // If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation