tradingstrategy-ai / web3-ethereum-defi

A Python library for trading automation on DeFi, data research and integration. Supporting Uniswap, Aave, Chainlink, USDC and other protocols.
https://tradingstrategy.ai
MIT License
580 stars 125 forks source link

PairCreated has no attribute web3 #216

Closed elier closed 1 week ago

elier commented 1 month ago

Running scripts/uniswap-v2-pairs-and-swaps.py fails with the following error:

File " ... scripts/uniswap-v2-pairs-and-swaps.py", line 136, in decode_pair_created
    web3 = log["event"].web3
           ^^^^^^^^^^^^^^^^^
AttributeError: type object 'PairCreated' has no attribute 'web3'

I guess those scripts might be outdated.

miohtama commented 1 week ago

Hi Elier.

Thanks for spotting this out.

Fixed in https://github.com/tradingstrategy-ai/web3-ethereum-defi/commit/c4107706a694fd3660a90b8699c6da7a08401995