5

I'm just starting to use Ganache for building my smart contracts but have seen some youtubers using Infura.

After going through the Infura website, to my newbie eyes it seems to be exactly the same than Ganache.

Is this the case? What are the advantages of infura over Ganache?

1 Answer 1

6

Ganache and Infura are two very different things.

Ganache is a tool for quickly creating a local network that can be used for development. It can be used to automatically run tests, etc. completely locally, without relying on one of the public testnets (Goerli, Ropsten, etc.).

Infura is a infrastructure provider, primarily for Ethereum. It provides access to the Ethereum mainnet and the different public testnets. While you could use one of the testnets for running tests, Ganache is much easier to quickly set up for testing. If you want to test a more real world scenario, you can use Infura for deploying your smart contracts to the mainnet or one of the testnets.

3
  • In case I would like to use as an oracle to get for example a coin price I suppose this won't be possible with a local network am I right? Because in this local network only one node exists and does not contain any external contract.
    – Notbad
    Sep 21, 2021 at 12:20
  • In that case you could deploy a mock contract to your local Ganache network to use for testing, or fork the Ethereum mainnet (built in to Ganache).
    – Morten
    Sep 21, 2021 at 12:23
  • Understood, I could just deploy a mock contract following the real oracle contract ABI. Is that what you meant?
    – Notbad
    Sep 21, 2021 at 12:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.