0

I need to test my contract with Uniswap and I'm facing difficulty in using test networks of Ethereum.

For example, the Goerli faucet wants us to buy actual Ethereum on the mainnet. Besides that, is there any other way?

2 Answers 2

3

Sepolia is the testnet which should be used for testing dapps, including Uniswap. Unfortunately, it looks like Uniswap only supports Goerli (Ropsten and Rinkeby are already deprecated).

As I see it, your options are:

  1. Go through Uniswap governance to get Uniswap officially deployed in Sepolia (although this has most likely been suggested already somewhere)

  2. Deploy it yourself

  3. Search for existing deployments (You are most likely not the first one with this problem)

2
  • to deploy myself, what contracts I have to deploy can you give link? Because I see there is factory, router, trading pairs contracts etc Commented May 9, 2023 at 8:46
  • Sorry, that's a bit out of scope for this question. You can try submitting a new question or asking in Uniswap discord. In general, router is the one you probably want to deploy. Commented May 9, 2023 at 11:12
0

The Uniswap Interface officially supports the following testnets:

  • Goerli
  • Optimism Goerli
  • Arbitrum Goerli
  • Celo Alfajores
  • Polygon Mumbai

Only Goerli is Ethereum test network as such, but the others are EVM networks as well, and might be sufficient for many kinds of smart contract testing. There are some other, unofficial testnet forks for example on Linea.

An alternative option is to fork the Ethereum mainnet with foundry or a similar tool, and test the contracts locally. This faster and cheaper option, and should be used whenever possible.

Deploying Uniswap locally is also possible, but almost certainly not the best or the first idea to try out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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