Logs
Compare With EtherScan
Get Event Logs by Address
[https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address]
Returns the event logs from an address, with optional filtering by block range.
https://api.w3w.ai/mantle/v1/developer/api
?module=logs
&action=getLogs
&address=0x201eba5cc46d216ce6dc03f6a759e8e766e956ae
&fromBlock=19999000
&toBlock=20000000
&page=1
&offset=1000
&apikey=YourApiKeyToken
Query Parameters
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"transactionHash": "0x7fbafdc48171a5fea4253e877af8a1f1c8fd571e4c400fe6c1bf58ae58adaaa0",
"logIndex": "0",
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"data": "0x000000000000000000000000000000000000000000000000000000000007e1c9",
"blockNumber": "19999000",
"timeStamp": "1699389429",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"0x000000000000000000000000a53efa35eaed44014a0530894beeea93dabe6f83"
]
},
{
"transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
"logIndex": "1",
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"data": "0x0000000000000000000000000000000000000000000000000000000000076688",
"blockNumber": "19999001",
"timeStamp": "1699389429",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
"0x0000000000000000000000006488f911c6cd86c289aa319c5a826dcf8f1ca065"
]
},
{
"transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
"logIndex": "2",
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffff570247f",
"blockNumber": "19999001",
"timeStamp": "1699389429",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421"
]
}
]
}
Get Event Logs by Topics
[https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-topics]
Returns the events log in a block range, filtered by topics.
https://api.w3w.ai/mantle/v1/developer/api
?module=logs
&action=getLogs
&fromBlock=19999900
&toBlock=20000000
&topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
&topic0_1_opr=and
&topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
&page=1
&offset=1000
&apikey=YourApiKeyToken
Usage:
For a single topic, specify the topic number such as
topic0
,topic1
,topic2
,topic3
For multiple topics, specify the topic numbers and topic operator either
and
oror
such as below
Query Parameters
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"transactionHash": "0x308dedbaad3a9f38bb1afde34c5480840677ecb82ba69886b4d81bb188d2ef08",
"logIndex": "3",
"address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9adca0000000000000000000000000000000000000000000000000000c816bdd9c00000000000000000000000000000000000000059ff130ccbb39daea570acc00e9200000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008b536b600",
"blockNumber": "19999901",
"timeStamp": "1699389792",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x000000000000000000000000728011d2bd2f25fa6998b773e9508156caaaf281"
]
},
{
"transactionHash": "0xa44d26e33815278af7973c3dc68dd719ad0f4898e95f0c1cc521a306b70e7596",
"logIndex": "3",
"address": "0x6488f911c6cd86c289aa319c5a826dcf8f1ca065",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6898a00000000000000000000000000000000000000000000000000000000000975e00000000000000000000000000000000000000000fff4cb636f2ba2daaf0d4d590000000000000000000000000000000000000000000000000000c62e03e2f8cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014",
"blockNumber": "19999903",
"timeStamp": "1699389792",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x000000000000000000000000387d5210595e95f41649209f3c4cc5c459ac83cd"
]
},
{
"transactionHash": "0x905825b9bc452114c2ec784ad1cd1ca4674e9f4ebed27de49610bef9ccac651e",
"logIndex": "3",
"address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff425db0000000000000000000000000000000000000000000000000001772aa3f8480000000000000000000000000000000000000059ff1488f3ac76f03e606d8c8e1c00000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001053c69540",
"blockNumber": "19999904",
"timeStamp": "1699389792",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x00000000000000000000000095898dcb11b7ee61d20d440178f0b491e3aae006"
]
}
]
}
Get Event Logs by Address filtered by Topics
[https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address-filtered-by-topics]
Returns the event logs from an address, filtered by topics and block range.
https://api.w3w.ai/mantle/v1/developer/api
?module=logs
&action=getLogs
&address=0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a
&fromBlock=19999900
&toBlock=20000000
&topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
&topic0_1_opr=and
&topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
&page=1
&offset=1000
&apikey=YourApiKeyToken
Query Parameters
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"transactionHash": "0xa1ec08e21896b510ca7f1ade9221ea136000edea92beea757c5965263627ad95",
"logIndex": "3",
"address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3a40000000000000000000000000000000000000000000000000d7621dc58210000000000000000000000000000000000000017809b862193550103f74bf56bd1110000000000000000000000000000000000000000000000005f00d2fec24cd7c800000000000000000000000000000000000000000000000000000000000459230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095f9c5ec6800",
"blockNumber": "19999923",
"timeStamp": "1699389797",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x0000000000000000000000006658a52627f055c8ee1813da497256a87e283cc7"
]
},
{
"transactionHash": "0xbd52e6d7109a6518cc98913206d0ccfdf5dc1b720538f05826f16112becb1b5b",
"logIndex": "3",
"address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7e661000000000000000000000000000000000000000000000000117c6b5300fe0000000000000000000000000000000000000017809bb539e849e13c3cd656d595280000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2d052e93000",
"blockNumber": "19999928",
"timeStamp": "1699389797",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x0000000000000000000000006ac3c5b517c0a9024d8a6ff48c0d3977ae7993af"
]
},
{
"transactionHash": "0xab21ef4b1a6a18f17b5543f3245a46ec3d526c4ec64f56b4c81bb20639e235a8",
"logIndex": "3",
"address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff817c00000000000000000000000000000000000000000000000001111d67bb1bb0000000000000000000000000000000000000017809be3332f0829d4b17be6b0a3d10000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000be2ce338f800",
"blockNumber": "19999930",
"timeStamp": "1699389802",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x00000000000000000000000036bee9554fa814799054dfc6658c789416ee4ed7"
]
},
{
"transactionHash": "0x1a640471e7699b5230283c69159de5c4f3576525d324d1f4f37511fb78ea7063",
"logIndex": "3",
"address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff992450000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000017809c0893b3793d4e8f472ff043810000000000000000000000000000000000000000000000005f00d2fec24cd7c80000000000000000000000000000000000000000000000000000000000045923000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a9d359ca000",
"blockNumber": "19999931",
"timeStamp": "1699389802",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
"0x000000000000000000000000fd97098bac2ea76e1d1c39ea32b0c5b023fe761e"
]
}
]
}
Last updated