Aperture-Finance / uniswap-v3-automation-sdk

Other
17 stars 8 forks source link

refactor getAllPositions to avoid 429 error #257

Closed vhenwan closed 4 months ago

vhenwan commented 4 months ago
  1. Refactor

    1. Batch fetch token ids.
    2. Batch fetch position details.
  2. Update publicClient.multicall({batchSize}) from 2_048 to 102_400 for less eth_call

Note: Test pass on Arbitrum - 0x732468B15E9DD854B86D10a0fb8E83F6283fE7a2 up to 9000+ positions. Test pass on Ethereum - 0x6dD91BdaB368282dc4Ea4f4beFc831b78a7C38C0 up to 7000+ positions.

vhenwan commented 4 months ago
截屏2024-06-05 下午12 30 04
lanceaper commented 4 months ago

I will handle the comments and take a look at the test