added more accurate log search for minted lp tokens
This commit is contained in:
parent
85d854aa12
commit
60aa73dbc4
1 changed files with 3 additions and 1 deletions
4
main.py
4
main.py
|
|
@ -157,7 +157,9 @@ def main():
|
||||||
for log in tx_receipt['logs']:
|
for log in tx_receipt['logs']:
|
||||||
if log['topics'][0].hex() != '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef':
|
if log['topics'][0].hex() != '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef':
|
||||||
continue
|
continue
|
||||||
if web3.to_checksum_address('0x' + log['topics'][2].hex()[-40:]) != wallet_address:
|
log_from = web3.to_checksum_address('0x' + log['topics'][1].hex()[-40:])
|
||||||
|
log_to = web3.to_checksum_address('0x' + log['topics'][2].hex()[-40:])
|
||||||
|
if log_from != "0x0000000000000000000000000000000000000000" and log_to != wallet_address:
|
||||||
continue
|
continue
|
||||||
# extract lp tokens just created
|
# extract lp tokens just created
|
||||||
lp_balance = int(log['data'].hex(), 16)
|
lp_balance = int(log['data'].hex(), 16)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue