Is there a way to interact with deployed smart contracts on the LocalHost?

I would like to interact with smart contracts that have been deployed on the TestNet. I would like to know if it is possible to interact with them on a local network that I am setting up through sandbox. I tried using a snapshot of the TestNet with ./sandbox up testnet but when I was trying to interact with smart contracts I was getting an error because of the indexer.

Is there a way to get a local copy of the TestNet/MainNet and interact with the smart contracts locally without having to download the whole indexer (as it takes a bit to download it from what I understand)?

You don’t necessarily need to use the indexer to interact with smart contracts.

However, if you need to use the indexer, then you have 3 choices:

  • use a sandbox private network instead of TestNet
  • use an API service for TestNet that has an indexer
  • use your own TestNet node outside of sandbox

For most testing, the first option is the best.

See Set up your development environment - Algorand Developer Portal for more information