I'm writing a bot interacting with uniswap contracts to get data from the pool reserves. I'm using ganache-cli to fork mainnet to do so.

When I'm using infura as a websocket provider, everything is fine and my reserves update fine when interacting with Uniswap contracts.

However, whenever I use Ganache-cli to fork mainnet and switch my provider accordingly, my prices are not updated anymore, as if my sync event listener never picks up any of the events emitted whenever the reserves get updated. I have to close the connection and start it up again for prices to update. anyone know why this is? is it just something that happens when you're forking mainnet ?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.