I need to factory reset my device. Will my purchases be restored?
Yes. Just make sure to download Squid from the same store (e.g. Google Play, Samsung GALAXY Apps, Amazon Appstore) and that you're signed into the same account you used to make the in-app purchases.
See Do I have to purchase the premium features for each of my devices? for more information.