Logs
Below are the list of supported filter parameters:
- fromBlock, toBlock, address
- topic0, topic1, topic2, topic3 (32 Bytes per topic)
- 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)
Some parameters to take note of
📝
- FromBlock & ToBlock accepts the blocknumber (integer, NOT hex) or 'latest' (earliest & pending is NOT supported yet)
- Topic Operator (opr) choices are either 'and' or 'or' and are restricted to the above choices only
- FromBlock & ToBlock parameters are required
- An address and/or topic(X) parameters are required, when multiple topic(X) parameters are used the topicX_X_opr (and|or operator) is also required
For performance & security considerations, only the first **1000 results **are return. So please narrow down the filter parameters.
https://api-kovan.etherscan.io/api
?module=logs
&action=getLogs
&fromBlock=379224
&toBlock=latest
&address=0xac050b7f68367d59d5d37ab1e86fdeed35aa7ee1
&topic0=0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d
&apikey=YourApiKeyToken
https://api-kovan.etherscan.io/api
?module=logs
&action=getLogs
&fromBlock=379224
&toBlock=latest
&address=0x87b1f4cf9BD63f7BBD3eE1aD04E8F52540349347
&topic0=0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f
&topic0_1_opr=and
&topic1=0x000000000000000000000000464c71f6c2f760dda6093dcb91c24c39e5d6e18c
&apikey=YourApiKeyToken
Last modified 1yr ago