getLogs API changes to return txHash, make contract arg optional. (#81)

* getLogs API changes to return txHash, make contract arg optional.

* Populate log index.

* Add test for txn hash in GetLogs request.

* Convert tx string to common.Hash after fetching.

Co-authored-by: Arijit Das <arijitad.in@gmail.com>
This commit is contained in:
Ashwin Phatak
2021-07-26 15:43:38 +05:30
committed by GitHub
co-authored by Arijit Das
parent afc63ac960
commit 70f7face75
6 changed files with 43 additions and 16 deletions
+3 -2
View File
@@ -161,8 +161,9 @@ var _ = Describe("GraphQL", func() {
expectedLogs := []graphql.LogResponse{
{
Topics: test_helpers.MockLog1.Topics,
Data: hexutil.Bytes(test_helpers.MockLog1.Data),
Topics: test_helpers.MockLog1.Topics,
Data: hexutil.Bytes(test_helpers.MockLog1.Data),
Transaction: graphql.TransactionResp{Hash: test_helpers.MockTransactions[0].Hash()},
},
}
Expect(logs).To(Equal(expectedLogs))