eth_getFilterLogs
Returns an array of all logs matching filter with given id.
Parameters
QUANTITY - the filter id.
Returns
See eth_getFilterChanges.
Example
NOTE: In this example we are using public Ethereum endpoint. Ideally, for your own projects, you should use your own endpoint, which you can generate for free by connecting to your wallet here.
Query
NOTE: ethers
used below is a well-known web3 library, check it out here.
import { ethers } from 'ethers';
const provider =
new ethers
.providers
.JsonRpcProvider("https://www.noderpc.xyz/rpc-mainnet/public")
const fetchLogs = async ()=> {
const params = ["0x0700000000000000f9383206a08e58ea"];
const result = await provider.send("eth_getFilterLogs", params);
console.log(result);
}
fetchLogs();
Result
[
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000045d150a4c2b899b3fa1439933b0c7c6919dbd137",
"0x0000000000000000000000009ccfd7f45e44fe3c67803da1ff8954aa339ba128"
],
"data": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
"blockNumber": "0x1094aca",
"transactionHash": "0xb9318de5076a5ad2fc80042c023685fd4d310254cf2e8c54f70f01a92c321935",
"transactionIndex": "0x59",
"blockHash": "0x51f45586c34b25b626098db4ac24ccb3cfaaab37c8f56d57252c90c73eee8926",
"logIndex": "0xdd",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000014d11ca53a6d88feb277b16e6ba04044ea89eb0b",
"0x000000000000000000000000d05f6cb0546192053c9621ad74ae312a529c3e3b"
],
"data": "0x000000000000000000000000000000000000000000000a84e69ce854279b72ac",
"blockNumber": "0x1094acb",
"transactionHash": "0x0de78508df5f49c7991114a4d4d5703b07d1b06b4dc5ebdc824a487b1e3ae360",
"transactionIndex": "0x46",
"blockHash": "0xc8362803747cbe240f74e388401cab0ef67819ae71425aa014f302b9fef25c7a",
"logIndex": "0x84",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000051f793395d73756e3f38ccc4ca139b63bc90a5c7",
"0x000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b91"
],
"data": "0x00000000000000000000000000000000000000000000005ede20f01a45980000",
"blockNumber": "0x1094acf",
"transactionHash": "0xd1cce670553772fa3091fa964de8f6edaf134f96787b290e4d2b691e65e0400c",
"transactionIndex": "0x47",
"blockHash": "0xbf3410b8690df6006ab45a813ef5bec6e92aa7b7a28d8830bce605639348c5a6",
"logIndex": "0x8b",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000c564ee9f21ed8a2d8e7e76c085740d5e4c5fafbe",
"0x000000000000000000000000e20d8f6847592a2f053ab1dd894d658a1c59f2fc"
],
"data": "0x00000000000000000000000000000000000000000000021beec43da88aa00000",
"blockNumber": "0x1094ad0",
"transactionHash": "0xa6c6cc3c9449b283c980b5abed3240dd95ed8dc68843598b54f265a211a4c107",
"transactionIndex": "0x10",
"blockHash": "0x66989e521f78575a1b31256c38e1e340395f201134bfc4d2a74e1289dc3ffbeb",
"logIndex": "0x4b",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000c9ebbdccf421349dc04149493fc2e337b18b4048",
"0x000000000000000000000000fd20190d1e7f9728c5482e26558f8e803f23b920"
],
"data": "0x0000000000000000000000000000000000000000000000a59ca449ea925c0000",
"blockNumber": "0x1094ad0",
"transactionHash": "0x7999947fe88b01a54318e9bf35f4145aeb1b4c90130466e061b74dc684612f9b",
"transactionIndex": "0xa1",
"blockHash": "0x66989e521f78575a1b31256c38e1e340395f201134bfc4d2a74e1289dc3ffbeb",
"logIndex": "0x138",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000912fd21d7a69678227fe6d08c64222db41477ba0",
"0x000000000000000000000000dd95953ec12164c083794f85008b5e39840ec999"
],
"data": "0x00000000000000000000000000000000000000000000001a53269790e6da636d",
"blockNumber": "0x1094ad1",
"transactionHash": "0x9c3a4422151edcdc4cd6e145cc7255eb3f22ace0bb0c94171a54cdde2513c4ff",
"transactionIndex": "0x3",
"blockHash": "0x5c170c22b657bda425b9c2abb11497addc084c44a2f3dbd347e58b9f0de43eaa",
"logIndex": "0x8",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000a9d1e08c7793af67e9d92fe308d5697fb81d3e43",
"0x0000000000000000000000004cb6eb53386c144c7b7c93ab2fbd5b4bb6ce20d8"
],
"data": "0x0000000000000000000000000000000000000000000000004b7fba941198c800",
"blockNumber": "0x1094ad3",
"transactionHash": "0xddac85692b2596e11988e6f3c545a517172e7be3ce18dddd2f1ca7d3b964ab18",
"transactionIndex": "0x4c",
"blockHash": "0xc661f1fbe52d0d9d8d85aacacbf7d64ec49c27c5961f5227971d6b9a3bc89ee4",
"logIndex": "0x8c",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000df16a7e7a9a23888bc18e32c855bb4fb0e5c56f",
"0x00000000000000000000000051e23c7817ba240f17551f2aca9a1c0008617c69"
],
"data": "0x000000000000000000000000000000000000000000000001158e460913d00000",
"blockNumber": "0x1094ad5",
"transactionHash": "0x411e690c285286a15e12fa19cac6e39f6c92915eed54bffeac2dc6dd590ae734",
"transactionIndex": "0x2b",
"blockHash": "0x673918b906892597029c10e4936b61864dddf53d9efe1d8aee4c39467168eb57",
"logIndex": "0xb6",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000096c23ef196e9cfd7d9f3abae91e5fafc3c736c91",
"0x00000000000000000000000060594a405d53811d3bc4766596efd80fd545a270"
],
"data": "0x00000000000000000000000000000000000000000000000735beeb55f6f40000",
"blockNumber": "0x1094ad6",
"transactionHash": "0xee1c2041eabc4c760c9e75daebf7490e5e678ccfff88e6a490edf2b79e1addca",
"transactionIndex": "0x22",
"blockHash": "0xc9c1406651c7eeb6e7723c89cf837514280b96736d22be4633a44a94c817bbda",
"logIndex": "0x4f",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000dd95953ec12164c083794f85008b5e39840ec999",
"0x0000000000000000000000006cc5f688a315f3dc28a7781717a9a798a59fda7b"
],
"data": "0x00000000000000000000000000000000000000000000001a53269848ff520c00",
"blockNumber": "0x1094ad6",
"transactionHash": "0x7b40fa8db597cdd7082acdaa79f61d5f171f084dbd3d2b6918ae1057998db23f",
"transactionIndex": "0x31",
"blockHash": "0xc9c1406651c7eeb6e7723c89cf837514280b96736d22be4633a44a94c817bbda",
"logIndex": "0x72",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000941b4fdb4b1533ab2cc8b90ff0700f658b4aa642",
"0x0000000000000000000000002ab6ab65565696527291c16e36788c092e86f019"
],
"data": "0x000000000000000000000000000000000000000000000005a4ae36d177b4dc00",
"blockNumber": "0x1094ad7",
"transactionHash": "0x03f2ed115092d63c0d9f286f33c47dae6479513d40d044e44e4c4f9e2988b865",
"transactionIndex": "0x36",
"blockHash": "0x442a1bbe7de8c9afc76b8ff27548bbc30c94377d4f93e662f56159a2bce4ff6c",
"logIndex": "0x85",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000fd20190d1e7f9728c5482e26558f8e803f23b920",
"0x00000000000000000000000084bbc906e2973ae10d740c966dec826e24ba88b1"
],
"data": "0x0000000000000000000000000000000000000000000000a59ca449ea925c0000",
"blockNumber": "0x1094ad8",
"transactionHash": "0x506a4ad3be84b44142f2921b3d26ed24590637c23817586bc4eab35c506523b8",
"transactionIndex": "0x3",
"blockHash": "0x68968bc2c81112d416ad64b55c4dd89a7e8411779313687c1848d080161a0f1b",
"logIndex": "0x2",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000c564ee9f21ed8a2d8e7e76c085740d5e4c5fafbe",
"0x000000000000000000000000e20d8f6847592a2f053ab1dd894d658a1c59f2fc"
],
"data": "0x0000000000000000000000000000000000000000000008763c669ad8a1600000",
"blockNumber": "0x1094adb",
"transactionHash": "0xda002e4a4fecfcf40b70ec8a7b8651529209d867505a22de5c765263e050a85f",
"transactionIndex": "0x1d",
"blockHash": "0x950f9faa7aa07791e0f77465b362f7ea7df34aa827e29231f53b080fb6bd26a4",
"logIndex": "0x84",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000033cd051be5004929d750f4e9a5bb741caf3aa76e",
"0x000000000000000000000000a478c2975ab1ea89e8196811f51a7b7ade33eb11"
],
"data": "0x0000000000000000000000000000000000000000000000167b5240ddd7acabbe",
"blockNumber": "0x1094adc",
"transactionHash": "0xa8f9caf9179a4472be4adf66f6736b19a3c97d0b1ae8cbf51bdb9731fc9a77bd",
"transactionIndex": "0x86",
"blockHash": "0x499cbc3d9dc115f5f1b2940f0d37198d18f7f779f6aaf5681cb06a60330df5d9",
"logIndex": "0x126",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000033cd051be5004929d750f4e9a5bb741caf3aa76e",
"0x0000000000000000000000001a250dfc8c3687d0dd082065c471ff0ddb784fe0"
],
"data": "0x00000000000000000000000000000000000000000000000549a58e67c74cb63c",
"blockNumber": "0x1094adc",
"transactionHash": "0xa8f9caf9179a4472be4adf66f6736b19a3c97d0b1ae8cbf51bdb9731fc9a77bd",
"transactionIndex": "0x86",
"blockHash": "0x499cbc3d9dc115f5f1b2940f0d37198d18f7f779f6aaf5681cb06a60330df5d9",
"logIndex": "0x12e",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000c3d03e4f041fd4cd388c549ee2a29a9e5075882f",
"0x000000000000000000000000e4945afba92cf4b493d08eb67f429e739616a576"
],
"data": "0x0000000000000000000000000000000000000000000000005cd21acb26932706",
"blockNumber": "0x1094adc",
"transactionHash": "0xf507cc2425ed3540c2715aa8995c7f2ba6ce370017761e99f6776f7d817e99ca",
"transactionIndex": "0x96",
"blockHash": "0x499cbc3d9dc115f5f1b2940f0d37198d18f7f779f6aaf5681cb06a60330df5d9",
"logIndex": "0x154",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x000000000000000000000000db413c154079b55ecf0f687fa74410074ad63746",
"0x0000000000000000000000001715a3e4a142d8b698131108995174f37aeba10d"
],
"data": "0x0000000000000000000000000000000000000000000000840fc538943eb38800",
"blockNumber": "0x1094ade",
"transactionHash": "0x63dbbda19d98eb7e06674e40ad963491e6d97247e3f3c1b1e42691b6b1d25f31",
"transactionIndex": "0x66",
"blockHash": "0x39bf8e69e10527b1b16165ca07f77b68266899a5bd39afc547788e2982d33093",
"logIndex": "0xb6",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000009632aa2248e88d356658214e5bf1e0b3d4b09df6",
"0x000000000000000000000000c08ebca2eb1ce5bc6213d3f4b9ebdf557d26134c"
],
"data": "0x00000000000000000000000000000000000000000000010f0cf064dd59200000",
"blockNumber": "0x1094ae1",
"transactionHash": "0x9cb0c1538edce963e20f02d99f5df4c1dfaae9ff881c51933ad56d82d485c3b1",
"transactionIndex": "0x52",
"blockHash": "0xd8c5488ceeb0b2ae6d95696064ef9e17fb91e39f367119198c86e9746a99ccaf",
"logIndex": "0xd4",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000db413c154079b55ecf0f687fa74410074ad63746",
"0x0000000000000000000000001715a3e4a142d8b698131108995174f37aeba10d"
],
"data": "0x0000000000000000000000000000000000000000000000840fc538943eb38800",
"blockNumber": "0x1094ae1",
"transactionHash": "0x6437825b8ba0b6e90197ff57f789d32855c4ea99262be4c729316f1f0310693b",
"transactionIndex": "0x57",
"blockHash": "0xd8c5488ceeb0b2ae6d95696064ef9e17fb91e39f367119198c86e9746a99ccaf",
"logIndex": "0xe7",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000060594a405d53811d3bc4766596efd80fd545a270",
"0x000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564"
],
"data": "0x0000000000000000000000000000000000000000000002c5629e29552aa677ac",
"blockNumber": "0x1094ae2",
"transactionHash": "0x75f4b7f2d6ea229e2f19bfa432b8e91f9ae82ac5b470b2e6fad9fe30980f850e",
"transactionIndex": "0x68",
"blockHash": "0x953f46d801112754cb2c28ab4e007366725cbbdd3dc8a436298dae318da2b80b",
"logIndex": "0x127",
"removed": false
},
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564",
"0x0000000000000000000000006c6bc977e13df9b0de53b251522280bb72383700"
],
"data": "0x0000000000000000000000000000000000000000000002c5629e29552aa677ac",
"blockNumber": "0x1094ae2",
"transactionHash": "0x75f4b7f2d6ea229e2f19bfa432b8e91f9ae82ac5b470b2e6fad9fe30980f850e",
"transactionIndex": "0x68",
"blockHash": "0x953f46d801112754cb2c28ab4e007366725cbbdd3dc8a436298dae318da2b80b",
"logIndex": "0x12c",
"removed": false
}
]
Last updated