diff --git a/pkg/eth/backend.go b/pkg/eth/backend.go index 1a4f910a..59246fee 100644 --- a/pkg/eth/backend.go +++ b/pkg/eth/backend.go @@ -492,7 +492,7 @@ func (b *Backend) GetReceipts(ctx context.Context, hash common.Hash) (types.Rece if err := rlp.DecodeBytes(rctBytes, rct); err != nil { return nil, err } - rct.TxHash = common.HexToHash(txs[i]) + rct.TxHash = txs[i] rcts[i] = rct } return rcts, nil @@ -512,7 +512,7 @@ func (b *Backend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log } for _, log := range rct.Logs { - log.TxHash = common.HexToHash(txs[i]) + log.TxHash = txs[i] } logs[i] = rct.Logs diff --git a/pkg/eth/ipld_retriever.go b/pkg/eth/ipld_retriever.go index 08801f45..7442756d 100644 --- a/pkg/eth/ipld_retriever.go +++ b/pkg/eth/ipld_retriever.go @@ -347,19 +347,19 @@ func (r *IPLDRetriever) RetrieveReceiptsByTxHashes(hashes []common.Hash) ([]stri } // RetrieveReceiptsByBlockHash returns the cids and rlp bytes for the receipts corresponding to the provided block hash -func (r *IPLDRetriever) RetrieveReceiptsByBlockHash(hash common.Hash) ([]string, [][]byte, []string, error) { +func (r *IPLDRetriever) RetrieveReceiptsByBlockHash(hash common.Hash) ([]string, [][]byte, []common.Hash, error) { rctResults := make([]ipldResult, 0) if err := r.db.Select(&rctResults, RetrieveReceiptsByBlockHashPgStr, hash.Hex()); err != nil { return nil, nil, nil, err } cids := make([]string, len(rctResults)) rcts := make([][]byte, len(rctResults)) - txs := make([]string, len(rctResults)) + txs := make([]common.Hash, len(rctResults)) for i, res := range rctResults { cids[i] = res.CID rcts[i] = res.Data - txs[i] = res.TxHash + txs[i] = common.HexToHash(res.TxHash) } return cids, rcts, txs, nil diff --git a/pkg/graphql/graphql.go b/pkg/graphql/graphql.go index 8eee9d87..181ac37a 100644 --- a/pkg/graphql/graphql.go +++ b/pkg/graphql/graphql.go @@ -1035,7 +1035,7 @@ func (r *Resolver) GetLogs(ctx context.Context, args struct { cid: receiptCID, ipldBlock: receiptBytes, transaction: &Transaction{ - hash: common.HexToHash(txs[index]), + hash: txs[index], }, }) }