Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
object— the filter options:fromBlock(optional) — integer block number, orlatest,earliest,pendingtoBlock(optional) — integer block number, orlatest,earliest,pendingaddress(optional) — contract address or list of addresses from which logs should originatetopics(optional) — array of 32-byte data topicsblockhash(optional) — restricts logs to a single block with the given hash
Response
result— array of log objects, or an empty array if nothing has changed:removed—truewhen the log was removed due to chain reorganizationlogIndex— integer of the log index position in the blocktransactionIndex— integer of the transaction’s index positiontransactionHash— hash of the transaction that generated this logblockHash— hash of the block containing this logblockNumber— block number containing this logaddress— address from which this log originateddata— non-indexed arguments of the logtopics— array of indexed log arguments
eth_getLogs code examples
Use case
A practical use case foreth_getLogs is tracking specific events from smart contracts, such as token transfers, swaps, or any custom events defined in your contracts.Body
application/json