GoodforGod / java-etherscan-api

🔗 Polished Java library for EtherScan.io API
https://etherscan.io
MIT License
58 stars 47 forks source link

[Need Help] EtherScan Logs API condition #15

Closed Zergity closed 2 years ago

Zergity commented 2 years ago

I'm trying to use the Logs API to query the following condition: topic0 and (topic1 or topic2), but I can't seem to figure it out.

E.g. this query should not return tx 0x74086ddc2f74d8bab13bdeaf1b4a98ceac3d042ec4901fdafe9c585b88369b14, since its topic0 is not 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

https://api.etherscan.io/api?module=logs&action=getLogs
&fromBlock=13938782
&toBlock=13938782
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic1=0x000000000000000000000000864ba7f98750ff42cbf07e1f47fd8636d251dfe0
&topic2=0x000000000000000000000000864ba7f98750ff42cbf07e1f47fd8636d251dfe0
&topic1_2_opr=or

Any suggestion is really appreciated.

GoodforGod commented 2 years ago

Hello, thanks for the issue, not sure that this is library related problem, looks like more of Etherscan API related issue, that they return incorrect data for query you provided