Open HilliamT opened 1 month ago
Thanks for the PR, this change makes sense to me!
Thoughts on making thefactory_address
optional? There are some cases where a user may want to initialize a handful of pools with new_from_address
without needing to know the factory.
@0xKitsune Apologies for the delay - makes sense for factory_address
to be optional.
One later function that can be added as a filter is to filter in only e.g v2 / v3 AMMs with a whitelisted factory_address
, especially after discovering other AMMs from merely logs. This does require more thinking of how other AMM cases should be handled though, but can be done later when better thought out.
Motivation
A
factory_address
field in V2 and V3 proves helpful in understand what pools from which factories are discovered via thePairCreated
/PoolCreated
event. This can also prove helpful in analysing the contributions from which V2-like / V3-like protocols in pathing e.g 0x-style.Solution
factory_address
toUniswapV2Pool
andUniswapV3Pool
PR Checklist