How eth_getLogs works?
What are Logs?
Logs and events are used synonymously — smart contracts generate logs by triggering events, so logs provide insight into the events that occur within a smart contract. Logs can be found on transaction recipes.
Query eth_getLogs
When you make a request to eth_getLogs, all parameters are OPTIONAL, that is, you don't need to specify fromBlock, toBlock, address, topics or blockHash
Let’s look at an example of a request. Take the USDT address and limit the search parameters from 10,000,000 block to 10,000,001 block. Let’s add a topic on event transfers. We’ll describe it in more detail below
{
"id": 1,
"method": "eth_getLogs",
"jsonrpc": "2.0",
"params": [
{
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"fromBlock": 10000000,
"toBlock": 10000001,
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}
In our paramshere we have specified theaddress, fromBlockand toBlock
We use fromBlock and toBlock in our params. It is important to understand that you can use either fromBlockand toBlockor blockHash, not both.
The fromBlock and toBlock parameters specify the start and end block numbers to limit the search. The address field represents the address of the contract that creates the log.
Topicsis an ordered array of data. Notice how the first item in the topics field above matches the event signature of our Transfer(address,address,uint256).
This means that we specifically request the Transfer event. So I will get all transfers in USDT from 10,000,000 block to 10,000,001 block.
Now that we have a better understanding of how to make queries, let’s look at the answer.

Response

You will get a list of logs in a given range (You will get a response with much more data than the following):
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x00000000000000000000000000000000000000000000000000000000121eac00",
"logIndex": "0x3",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000039bb7d39a395e0ce36875244ad48bcaec54faf03",
"0x0000000000000000000000009354de9e63674f3e44303b8cc3853d7f10f97d06"
],
"transactionHash": "0x80e195cabafd0358a35cec5fadc9b304734ac1f0ed6edf607d170dab13f5e069",
"transactionIndex": "0x7",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x00000000000000000000000000000000000000000000000000000000b2d05e00",
"logIndex": "0x8",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000001987ae42dbb74b80996e16a4d1d581465226f24d",
"0x000000000000000000000000c054429edce0b6172ab9fed39254fba802639aa6"
],
"transactionHash": "0xd104afd704cef2b36800e6472793ff52211f3253f0e1a21416ad7735ababf6bf",
"transactionIndex": "0x11",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x000000000000000000000000000000000000000000000000000000174876e800",
"logIndex": "0x58",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000006f013cb44095efe19e2af1fb4dae2e9b90eaa654",
"0x00000000000000000000000001787eeb697b730616956f225a981619d2cc4216"
],
"transactionHash": "0x99a5105016f2ddbddfcf14a3f02944d1c77587801fd7c45cdbcbb166dfdfdb63",
"transactionIndex": "0x39",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x0000000000000000000000000000000000000000000000000000000005f5e100",
"logIndex": "0x5b",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000090d09db3ed3e6c8b4f169e7620ec32fec0f86410",
"0x000000000000000000000000b7c0239857d616b8eb46bcb2203304fb2abf8b03"
],
"transactionHash": "0x6fc44162434aa6acf0d51089ec99ea74ba710b77f5532aa875f53e0adf99bd1d",
"transactionIndex": "0x3c",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x0000000000000000000000000000000000000000000000000000000005f5e100",
"logIndex": "0x5c",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000090d09db3ed3e6c8b4f169e7620ec32fec0f86410",
"0x000000000000000000000000e21d7f5d23307114f037639210f0cffa594fe0c6"
],
"transactionHash": "0xc7d6f90ce2bf83222667b356057b04c7458f17de67b97efa484fa17e64952c59",
"transactionIndex": "0x3d",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x00000000000000000000000000000000000000000000000000000000001e8480",
"logIndex": "0x61",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000623e9429a8d081b545b0364a840b5289790909f2",
"0x000000000000000000000000532e3c5cc8114fb4d18a8396e0720b184e45ea27"
],
"transactionHash": "0x28248c09df0ddf6b7bf9253653a0003bbdfaa2a65418188519e26b8fa1e5f9cc",
"transactionIndex": "0x3f",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x000000000000000000000000000000000000000000000000000000000044aa20",
"logIndex": "0x62",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000623e9429a8d081b545b0364a840b5289790909f2",
"0x000000000000000000000000ecc917d8a140da84c80589d104ff8a60fdc59c3b"
],
"transactionHash": "0xae8f1b0c5e9676fb7b7dd1f1053c194c25698255cd16c454060ba636d501477e",
"transactionIndex": "0x40",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x0000000000000000000000000000000000000000000000000000000005f5e100",
"logIndex": "0x67",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000de774da29c2d70d404f04fd54905c7bb31bde0d8",
"0x00000000000000000000000005d538e568b94dc8317c2d7f3ddad8c97d8381d9"
],
"transactionHash": "0x6b9004b9c2dcbb6185919d2f7f6dbf5178dc71c53c8b7d97420a29aa1170462e",
"transactionIndex": "0x44",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x0000000000000000000000000000000000000000000000000000000005f5e100",
"logIndex": "0x68",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000de774da29c2d70d404f04fd54905c7bb31bde0d8",
"0x000000000000000000000000284e4f50957291b489f81e76d1ab025a2f293782"
],
"transactionHash": "0xe5fab0493a9df1c7b15f453c7b5daf99de8fa00643444e2ce566ec0f123cbb29",
"transactionIndex": "0x45",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x00000000000000000000000000000000000000000000000000000000966b8252",
"logIndex": "0x6c",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000093d94a4a5e1d85e7e1d71926a11d4eec9a4fc3ef",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0xc101ab009af89d14100421a6d93a479bcc0f80f5cafa6cd1a03f79fe7eab5056",
"transactionIndex": "0x4b",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x000000000000000000000000000000000000000000000000000000009621116e",
"logIndex": "0x77",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000012863ffd7bac0de393a1a432b5f01ab83b92b3bd",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0xd1ea08832875594d8c53c7e7032221b74dd6ebd1bdbdef4725c40b4e55bc3eb9",
"transactionIndex": "0x51",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x0000000000000000000000000000000000000000000000000000000000ab5cc0",
"logIndex": "0x7e",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000004a9bfca68519f9a83c5792c14ea986b81d187416",
"0x000000000000000000000000c1ca34d48e419852fa36f1183a8df26d73c45191"
],
"transactionHash": "0xe0b11ad27372e4c05ce24cc9717d8be6dfa9d51464ab732450b734a58a20f534",
"transactionIndex": "0x58",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x00000000000000000000000000000000000000000000000000000000a75e821c",
"logIndex": "0x82",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005a170011080f6e4696c2c8940e560bccfe61da47",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x5116b1370d3e36abb51f7f5ff31d7fb82924d7bfc69bcc41952f6d23a23f0a7d",
"transactionIndex": "0x5e",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"data": "0x000000000000000000000000000000000000000000000000000000009f280a06",
"logIndex": "0x86",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000009c43d6a63f7fd0ae469ec0aeda2a90be93038f59",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0xf9084755ea9905d54a61b1109626ad3de5e8c2edf3b9f7a42831037ace6f2456",
"transactionIndex": "0x63",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000002e14e00",
"logIndex": "0x0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000b9c764114c5619a95d7f232594e3b8dddf95b9cf",
"0x0000000000000000000000003182e61020ea312e46ff8c0900308fcddabfb3ed"
],
"transactionHash": "0x266aeac0134dd7a73824adfb7422f756ff6833b79f2fac2ad2375d6a3c153148",
"transactionIndex": "0x1",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000029d1ccdd",
"logIndex": "0x1",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000002b5634c42055806a59e9107ed44d43c426e58258",
"0x00000000000000000000000068bec23207838317a745a58b5634f1d666920950"
],
"transactionHash": "0x01ef762c0b1a39936fc0492506d7c024dc79e4c5caa94c1ded2cf7370aad7b4e",
"transactionIndex": "0xa",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000002160ec0",
"logIndex": "0x4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005d79a46abeade3ee458c95437a677c4f18be619d",
"0x000000000000000000000000859bf1053031514f954d748e062c2f4e20b8553c"
],
"transactionHash": "0xc52e02c718a601cb34293fad238217abb1ad43cafe75c1f825b92ee1f8679fcc",
"transactionIndex": "0xf",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000000c708260",
"logIndex": "0xb",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000001a79b8bfcd0e74fd2306c02d88c892b67df80dc4",
"0x0000000000000000000000008f20a07e0541ca2db9152d7e521aee5d639b211d"
],
"transactionHash": "0x1d55903a0daabeac15207eced6e0471baa58357c6ac78f7c631537f2bbc970fd",
"transactionIndex": "0x13",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000009bbc2a0",
"logIndex": "0x10",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000010d8f6adee7d5d846609876449bb8443be1d3fb7",
"0x0000000000000000000000008eac7cf70c6ca1cb225bdc81f62104faf872fa6d"
],
"transactionHash": "0x44cb6bf0e0a5d3252f980b10daac7f6bb3a62729ee4819f394a7c215aef212e5",
"transactionIndex": "0x16",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000011e1a300",
"logIndex": "0x16",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000042215ace06db4e2b7001d082bff0420c661ecbbb",
"0x000000000000000000000000d06bf60095a0f073e24371a8587ea18e2452b671"
],
"transactionHash": "0x7fd534b826b11e0874d368875edfb736b8dea60f566ca67a41468bea96f46312",
"transactionIndex": "0x28",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000011e1a300",
"logIndex": "0x17",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000042215ace06db4e2b7001d082bff0420c661ecbbb",
"0x000000000000000000000000b61f5b3991536896f8990e170fe0a1dc5f6794f6"
],
"transactionHash": "0x20370c53c619293f3e4982ec12eacd59676f06d8b0eaddd9e29ad690eda8280b",
"transactionIndex": "0x2a",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000003b9aca00",
"logIndex": "0x19",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000b70e8be1049dcfb3d319bbc768dd355f32ada55b",
"0x00000000000000000000000097a3da0c179206130fbde0e8d5b46fac0a233ce2"
],
"transactionHash": "0xa26b22eab6325cfd6ab5f15eeeebd1b0bb9d59a082aaebab27c3f969ce1b71e7",
"transactionIndex": "0x2e",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000000c751640",
"logIndex": "0x4f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000c85cf4ddf77104741d7eb1d4199bb5c9759bdbe8",
"0x000000000000000000000000c3f4c2ce51c2c167c684625a118a24339b23c35b"
],
"transactionHash": "0x21a75db817290b7fae3e69e153e88a2ec0b3ed50ce43bcba675ca0e09b3b3fd5",
"transactionIndex": "0x45",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000005f5e100",
"logIndex": "0x50",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000090d09db3ed3e6c8b4f169e7620ec32fec0f86410",
"0x000000000000000000000000ffcb88275c7c9f0336fa328244460fe2e2b58789"
],
"transactionHash": "0x8d8e033cd94446b4bcfab29fdc8ea202ec7b57cbf86e5a9f9fb3d76edd28bac1",
"transactionIndex": "0x47",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000000044aa20",
"logIndex": "0x52",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000623e9429a8d081b545b0364a840b5289790909f2",
"0x0000000000000000000000008c3502e2f1b401b0b753b9382456301c04798f25"
],
"transactionHash": "0x22a22aa4634caf9ed5cd03b44aaa69153b496f5c493bda0724774028df75cf7e",
"transactionIndex": "0x49",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000a0985ea5",
"logIndex": "0x58",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000686ae85ee613d007d704ff000639d91065bd2a06",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x9c441eff60bc71ec7d97e1504dffdeb810096ce2efbe965cb810da81836c826c",
"transactionIndex": "0x4e",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000009f7d3a96",
"logIndex": "0x5b",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003e190f22f0323ce66b3b3339f4b6e5a1b49bef79",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x3a2d7a1afc4d495aad93be3d5b8ca90d66395557c09529930ca6d3fc2e2227a5",
"transactionIndex": "0x50",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000009da77f40",
"logIndex": "0x5c",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000e2fbec810153e5d7b1d147bc9cd43f8c67b35800",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x47986d0af7a16188e118f1d0a80a204afb3747e35792e3fa761df6ef47a5ebd0",
"transactionIndex": "0x51",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000a7d7df10",
"logIndex": "0x63",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000440f287924e112597e6c1d020c4bca9040fd64ec",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0xdb5cd343701accadb8ac7c23c9023c847bc72d7c8a49071c0443dd22dba9f581",
"transactionIndex": "0x57",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000b2c11bc0",
"logIndex": "0x6a",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000db5251981c9f07cbac1f936cbb78b6c761d582d9",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x497a2a5cfa23091e0b24307c15bc438680f7e5a0bfea1bd3ec3aa250e8173550",
"transactionIndex": "0x5d",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000ac7928cd",
"logIndex": "0x6d",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d6008203a02de532034c2e448a8f008c2dba3ae0",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x4d5571bf0578ff6cd7504a57caed467a74e2d96b03b2810ad33c572de901758b",
"transactionIndex": "0x5f",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x0000000000000000000000000000000000000000000000000000000a223e9640",
"logIndex": "0x73",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005b87679dc731546b887dc60ece4ab55478ac4862",
"0x000000000000000000000000456fc1d208fb7c61a8c5594e7572b8523fb05da4"
],
"transactionHash": "0xc13bd949e2e7ee6bb711d49d39bdfb3eabc0308b35e8189e93883122dbd6fa16",
"transactionIndex": "0x63",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000b07c06b2",
"logIndex": "0x74",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000048f0b0727a1376c3e7c5b79628885054738decc7",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0xf3cdefcf19c23e32a94646ea611100d7e7db77bfdcd53066160cbd45f57ca8dd",
"transactionIndex": "0x65",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x00000000000000000000000000000000000000000000000000000000b2b1d980",
"logIndex": "0x75",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000030752fd30e855d801c8081e6417963aa144ad6b3",
"0x00000000000000000000000096e9a06a22d4445a757dfe9b4ff2c77a12dd60f2"
],
"transactionHash": "0x241c89a577a28c1bbbe37b95d57e46ebbfb0ff3e97553c3c26d20bb90d3770d0",
"transactionIndex": "0x66",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"blockHash": "0x7823fa4da327cf97a9b86da990b0755ebfaa3b490ecd0be80b0ed24106d1a8d7",
"blockNumber": "0x989681",
"data": "0x000000000000000000000000000000000000000000000000000000000014463c",
"logIndex": "0x76",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000001350c3bca588a0806dbb7364b23c7d535d6d157d",
"0x000000000000000000000000f2e462136581f8f026ac69911d1d8f5c6933a892"
],
"transactionHash": "0x706541c3dff7cda1ea0519b2bed446bd038b5d74893a2c0932244c89bea3c6c7",
"transactionIndex": "0x69",
"removed": false
}
]
}
The interesting fields to watch out for are data - which is an unrestricted field for encoding hexadecimal data related to a specific event. By default, if the information is not indexed in the other topics field, it is automatically placed in the data field. This requires more work to analyze the individual hex string information rather than their indexed topics.
And topics - can contain up to 4 topics. The first topic is mandatory and will always contain hash keccak 256 event signature. As you may see the example above shows a Transfer event between address 0x39bb7d39a395e0ce36875244ad48bcaec54faf03 and 0x 9354de9e63674f3e44303b8cc3853d7f10f97d06(the second and third topics).
We can check this data on etherscan
Now you know a bit more about the eth_getLogs.
Copy link