Logs
Get Event Logs by Address
Returns the event logs from an address, with optional filtering by block range.
https://api.mantlescan.xyz/api
?module=logs
&action=getLogs
&address=0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8
&fromBlock=0
&toBlock=latest
&page=1
&offset=2
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"address": "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f2e2912d8282e5f842069f445cd9c0d25df14928"
],
"data": "0x000000000000000000000000000000000000000000000000016345785d8a0000",
"blockNumber": "0xb12",
"blockHash": "0xd8ee9462e435544459f8b53d7f3faffee86850e6f4686da58b94ef4c6f60afba",
"timeStamp": "0x64ad3498",
"gasPrice": "0x2faf080",
"gasUsed": "0x10dd5",
"logIndex": "0x",
"transactionHash": "0x432de58712f407d00ec7f8f928d0154d3e6a1035744904f0917baf356da9b197",
"transactionIndex": "0x"
},
{
"address": "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
"topics": [
"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c",
"0x000000000000000000000000f2e2912d8282e5f842069f445cd9c0d25df14928"
],
"data": "0x000000000000000000000000000000000000000000000000016345785d8a0000",
"blockNumber": "0xb12",
"blockHash": "0xd8ee9462e435544459f8b53d7f3faffee86850e6f4686da58b94ef4c6f60afba",
"timeStamp": "0x64ad3498",
"gasPrice": "0x2faf080",
"gasUsed": "0x10dd5",
"logIndex": "0x1",
"transactionHash": "0x432de58712f407d00ec7f8f928d0154d3e6a1035744904f0917baf356da9b197",
"transactionIndex": "0x"
}
]
}
Get Event Logs by Topics
Returns the events log in a block range, filtered by topics.
https://api.mantlescan.xyz/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a
&page=1
&offset=2
&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 topic0_1_opr (and|or between topic0 & topic1), topic1_2_opr (and|or between topic1 & topic2) topic2_3_opr (and|or between topic2 & topic3), topic0_2_opr (and|or between topic0 & topic2) topic0_3_opr (and|or between topic0 & topic3), topic1_3_opr (and|or between topic1 & topic3)
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"0x000000000000000000000000218bf598d1453383e2f4aa7b14ffb9bfb102d637"
],
"data": "0x00000000000000000000000000000000000000000000000000000000001e847f",
"blockNumber": "0x22256",
"blockHash": "0x47155649e1cc440a6987424c3c79707c4bd8f9d6aad75bbe4ba62bda69324447",
"timeStamp": "0x64bf49a4",
"gasPrice": "0x2faf080",
"gasUsed": "0x2f99b",
"logIndex": "0x2",
"transactionHash": "0x150047865bee25f863533db170ec2fb0ba5f76e440ccf1338db608c1c644466a",
"transactionIndex": "0x"
},
{
"address": "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a",
"0x000000000000000000000000218bf598d1453383e2f4aa7b14ffb9bfb102d637"
],
"data": "0x0000000000000000000000000000000000000000000000005c67fd1412dfd4ad",
"blockNumber": "0x22256",
"blockHash": "0x47155649e1cc440a6987424c3c79707c4bd8f9d6aad75bbe4ba62bda69324447",
"timeStamp": "0x64bf49a4",
"gasPrice": "0x2faf080",
"gasUsed": "0x2f99b",
"logIndex": "0x3",
"transactionHash": "0x150047865bee25f863533db170ec2fb0ba5f76e440ccf1338db608c1c644466a",
"transactionIndex": "0x"
}
]
}
Get Event Logs by Address filtered by Topics
Returns the event logs from an address, filtered by topics and block range.
https://api.mantlescan.xyz/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&address=0x201eba5cc46d216ce6dc03f6a759e8e766e956ae
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x00000000000000000000000030f2a9c8821cede4db0bfeb5b7dfbefb68eddf7b
&page=1
&offset=2
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000030f2a9c8821cede4db0bfeb5b7dfbefb68eddf7b",
"0x000000000000000000000000628f7131cf43e88ebe3921ae78c4ba0c31872bd4"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000e7ef0",
"blockNumber": "0x2d7dbe",
"blockHash": "0x44c7b619a662ea751f20f3ab73b280052610798622c929f6248d74b286c5e0d2",
"timeStamp": "0x64e81b65",
"gasPrice": "0x2faf080",
"gasUsed": "0x20cda",
"logIndex": "0x1",
"transactionHash": "0x550e01251b00ed95b034905bfd5c480be11e84aee95fc1d2c5979dbba5dd129d",
"transactionIndex": "0x"
},
{
"address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000030f2a9c8821cede4db0bfeb5b7dfbefb68eddf7b",
"0x000000000000000000000000628f7131cf43e88ebe3921ae78c4ba0c31872bd4"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000c3500",
"blockNumber": "0x2d90e3",
"blockHash": "0xb3eb52deb67660b531b7e9f9607d1dd42030c81a4edc4a7f9166f16b6a9aff5f",
"timeStamp": "0x64e82122",
"gasPrice": "0x2faf080",
"gasUsed": "0x1ca28",
"logIndex": "0x1",
"transactionHash": "0xd806171adf1575a044e7c3b80e0fae619412589c656a62b69078853be384e2b0",
"transactionIndex": "0x"
}
]
}
Last updated