henrytirla / Decentralized-Exchange-Trading-Scripts

Useful scripts to automate trading on different DEX
https://t.me/dexpnl_bot
MIT License
366 stars 154 forks source link

Information Query: What is the hash, and how can I get mine?? #1

Closed confusedeinstein closed 9 months ago

confusedeinstein commented 9 months ago

Hello, I was going through you CopyTrade-IrrespectiveOfRouter.py . I am unable to understand what is this hash

if logs['address'] == WETH and alchemy.to_hex(logs['topics'][0]) == "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":

also this hash

elif logs['address'] != WETH:
                if alchemy.to_hex(
                        logs['topics'][0]) == "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925":

can you help me out a bit over here?

henrytirla commented 9 months ago

Hello, the hash values you provided are standard function signatures commonly used in Ethereum transactions and logs. They are not specific to any particular user or application. For instance, the hash '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' is associated with the 'Transfer' function, commonly used in ERC-20 token contracts for transferring tokens between addresses. On the other hand, the hash '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925' represents the 'Approval' function, often used in the same context for approving the transfer of tokens. These standard function signatures play a crucial role in interpreting and understanding the actions encoded in Ethereum transactions and logs across the entire network. I have added screenshots for more context

Transfer Approve