I encounter a lot of troubles when swaping with APIs like 1inch or Paraswap in my local env with Infura fork via Ganache and test via truffle.
**I am wondering if Infura endpoints use the last block when forking on the mainnet endpoint ? (forking done via ganache) **
Thanks for any responses.
Hi @mersonax, and welcome to the Infura community! Can you be more specific when you say you “encounter a lot of troubles”? Are you able to share any error messages you’ve been encountering or the code you’re running when you get those errors?
Hi Leiya, thanks for you reply
In fact my questions is not about code, but rather about how fork work.
Some context : I use 1inch API to built swap transaction hexadecimal data. The API respond depending the current liquidity on mainnet of Uniswap, Sushiswap etc …
My question might be dumb since I don’t know how nodes works in deepth, but here it is :
When we fork mainnet Infura endpoint (e.g with Ganache), are we forking the last block ?
Because I suspect that when forking, the liquidity inside pools of Uniswap and others differs from the mainnet. But I might be wrong of course.
Not clear problem I know, but I can explain with other words in required
Thanks anyway for your help !
Hi @mersonax! I think I better understand your question now, thanks for clarifying!
When you access one of our Infura endpoints, yes, you are accessing the latest block and will be getting the latest block information. Hopefully this helps!