Current location - Quotes Website - Personality signature - Query and Analysis of Event Log in Ethereum
Query and Analysis of Event Log in Ethereum
Find a way to specify multiple events from the json-rpc document of Ethereum for OR or AND query. The following are the ways to query approval or transfer events:

Please refer to the link above for the syntax of specifying query conditions in the subject field.

The transaction details with the transaction number of 0x7E9EAF019928B7F8CF6F5FA626A 58D477F4800054F7101FFE941FD353ABC were found on the ropsten test website through the getTransactionReceipt.

The transaction is sent from the "sender": "0xdb33dfdd d61308c33c63209845dad3E6bf2c674" to the contract address "0xa7F6C9a5052a08a14ff0e3349094b6fbc59". As can be seen from the first element of topics, a transfer event has occurred in the contract (the first element of topics must be the keccak hash of the event). The second field of the subject is the address of the transmitted token, and the third field is the address of the receiver. The signature of ERC20 token transfer event is

We notice that the first and second parameters of the Transfer event are marked as indexed, so their values are placed in the topics array. Because the tokens parameter is not marked as an index, its value is placed in the data field. If there are multiple fields in the event that are not marked as indexes, their values will be recorded in the data field.