Logs

Get Event Logs by Address

Returns the event logs from an address, with optional filtering by block range.

https://api-moonbeam.moonscan.io/api
   ?module=logs
   &action=getLogs
   &address=0xacc15dc74880c9944775448304b263d191c6077f
   &fromBlock=0
   &toBlock=latest
   &page=1
   &offset=10
   &apikey=YourApiKeyToken

Query Parameters

Get Event Logs by Topics

Returns the events log in a block range, filtered by topics.

https://api-moonbeam.moonscan.io/api
   ?module=logs
   &action=getLogs
   &fromBlock=0
   &toBlock=latest
   &topic0=0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000ff1fc55b3b5d2cc62b82d1f77da88355e8175254
   &page=1
   &offset=10
   &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 or or 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

Get Event Logs by Address filtered by Topics

Returns the event logs from an address, filtered by topics and block range.

https://api-moonbeam.moonscan.io/api
   ?module=logs
   &action=getLogs
   &fromBlock=0
   &toBlock=latest
   &address=0xacc15dc74880c9944775448304b263d191c6077f
   &topic0=0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000ff1fc55b3b5d2cc62b82d1f77da88355e8175254
   &page=1
   &offset=10
   &apikey=YourApiKeyToken

Query Parameters

Last updated