0

Trying to figure out how to get all addresses and balances of all holders for both token0 and token1 from a UniPair and make a snapshot for all individual balances.

What I'm interested in is:

  1. Individual Holder addressess
  2. Individual Total balanceOf(UniPair LP)
  3. Individual Total balanceOf(token0 WETH)
  4. Individual Total balanceOf(token1 ERC20)

Thank you very much in advance!🕊️

1 Answer 1

0

This could be achieved pretty easily with an indexer. You can write your own or use an already existing one. The indexer will replay all the events you need and you'll be able to reconstruct the state you're interested in.

The Graph can help you achieve this. There's already a UniswapV2 Subgraph you can use, or you could write your own and index the data the way you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.