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
611 stars 131 forks source link

PairCreated has no attribute web3 #216

Closed elier closed 3 months ago

elier commented 4 months 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 3 months ago

Hi Elier.

Thanks for spotting this out.

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