Cryptocurrency Ethereum Mastering Development

Uniswap Factory contract event – how to find addresses for new token pair

When creating a new pair on Uniswap, Uniswap emits a PairCreated event that details which tokens are invovled. However, it sorts the token like this in the factory contract: (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); I’m lost as to retrieving specific token(s) as the order changes, here’s […]