Logs
Get Event Logs by Address
Returns the event logs from an address, with optional filtering by block range.
https://api.kromascan.com/api
?module=logs
&action=getLogs
&address=0x0cf7c2a584988871b654bd79f96899e4cd6c41c0
&fromBlock=0
&toBlock=latest
&page=1
&offset=2
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"address": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
"0x000000000000000000000000acc21fd8526eaf5395f85fb2b15e3385d668d6b6"
],
"data": "0x",
"blockNumber": "0x9ec",
"blockHash": "0x484e15b33df7ee85bc7675d242cd7a99b5c866c56e8c4ab32f5316aca246f098",
"timeStamp": "0x64f6a41b",
"gasPrice": "0x5f5e132",
"gasUsed": "0xd2453",
"logIndex": "0x",
"transactionHash": "0x33c36d8fc0b2a632c73467b02706f7b53a8045598a1efce31b482e20d7845a16",
"transactionIndex": "0x1"
},
{
"address": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
"blockNumber": "0x9ec",
"blockHash": "0x484e15b33df7ee85bc7675d242cd7a99b5c866c56e8c4ab32f5316aca246f098",
"timeStamp": "0x64f6a41b",
"gasPrice": "0x5f5e132",
"gasUsed": "0xd2453",
"logIndex": "0x1",
"transactionHash": "0x33c36d8fc0b2a632c73467b02706f7b53a8045598a1efce31b482e20d7845a16",
"transactionIndex": "0x1"
}
]
}
Get Event Logs by Topics
Returns the events log in a block range, filtered by topics.
https://api.kromascan.com/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19
&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": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19",
"0x0000000000000000000000001782d71a0f16efcb632baf210a54ce641852a138"
],
"data": "0x00000000000000000000000000000000000000000000000000000000027dcbb4",
"blockNumber": "0x3ba977",
"blockHash": "0x59ae718ac8df83ef9ec3dca650b8bad84147e9d6e8664f9d8d25c2b4eb886b11",
"timeStamp": "0x656de331",
"gasPrice": "0x989680",
"gasUsed": "0x6d3c3",
"logIndex": "0x",
"transactionHash": "0x139b625d56a7692cdd40a2821cbe56f0114bf565158e7633f8b681c391725683",
"transactionIndex": "0x1"
},
{
"address": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19",
"0x0000000000000000000000001782d71a0f16efcb632baf210a54ce641852a138"
],
"data": "0x0000000000000000000000000000000000000000000000000000000002b8daba",
"blockNumber": "0x40a26e",
"blockHash": "0x08f7bd2944b5bac8dcbd84f21af458a24f979c0c2638bb922cb8ba4e4bda3bc6",
"timeStamp": "0x6577d51f",
"gasPrice": "0x989680",
"gasUsed": "0x38942",
"logIndex": "0x2",
"transactionHash": "0xb971101419ff4a56420f6e8a689f6017388790c2e2b2bafea994a3d9afba0589",
"transactionIndex": "0x1"
}
]
}
Get Event Logs by Address filtered by Topics
Returns the event logs from an address, filtered by topics and block range.
https://api.kromascan.com/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&address=0x0cf7c2a584988871b654bd79f96899e4cd6c41c0
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19
&page=1
&offset=2
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"address": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19",
"0x0000000000000000000000001782d71a0f16efcb632baf210a54ce641852a138"
],
"data": "0x00000000000000000000000000000000000000000000000000000000027dcbb4",
"blockNumber": "0x3ba977",
"blockHash": "0x59ae718ac8df83ef9ec3dca650b8bad84147e9d6e8664f9d8d25c2b4eb886b11",
"timeStamp": "0x656de331",
"gasPrice": "0x989680",
"gasUsed": "0x6d3c3",
"logIndex": "0x",
"transactionHash": "0x139b625d56a7692cdd40a2821cbe56f0114bf565158e7633f8b681c391725683",
"transactionIndex": "0x1"
},
{
"address": "0x0cf7c2a584988871b654bd79f96899e4cd6c41c0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000cd93ef1ce3adc9aa7c46ec4bc3a2fd76db1d1f19",
"0x0000000000000000000000001782d71a0f16efcb632baf210a54ce641852a138"
],
"data": "0x0000000000000000000000000000000000000000000000000000000002b8daba",
"blockNumber": "0x40a26e",
"blockHash": "0x08f7bd2944b5bac8dcbd84f21af458a24f979c0c2638bb922cb8ba4e4bda3bc6",
"timeStamp": "0x6577d51f",
"gasPrice": "0x989680",
"gasUsed": "0x38942",
"logIndex": "0x2",
"transactionHash": "0xb971101419ff4a56420f6e8a689f6017388790c2e2b2bafea994a3d9afba0589",
"transactionIndex": "0x1"
}
]
}
Last updated