I am trying to fork uniswap. I have successfully deployed uniswap-core and uniswap-periphery on my local machine (ganache).For this, I could get many tutorials and articles. But could not find a single article that helps me to connect the locally deployed contracts with the uniswap-interface. I could fork the uniswap-interface and run on HTTP://localhost:3000 using

npm install
npm start

But don't know how to connect it with the locally deployed contracts. Any help ??

  • yeah, run geth locally with your own chainId, deploy uniswap contracts, add some pairs, and do all the test you want.
    – Nulik
    Jul 13, 2021 at 11:12
  • Done that, I am stuck with Interfcace Jul 14, 2021 at 7:06
  • 2
    unfortunately your question is not clear, and you won't likely to get any help on this matter
    – Nulik
    Jul 14, 2021 at 15:09
  • Hi @Nulik , I have deployed the smart contracts (Both Core and Periphery), but I don't know how to connect them with the uniswap interface. Jul 16, 2021 at 4:47
  • Hey @AmalnathSathyan, I recommend you go through the Hardhat tutorial. Your question is very broad and cannot be answered succinctly. I also recommend you take a look at create-eth-app, which is a CLI tool for building Ethereum frontends with one command (disclaimer: I'm the author). Sep 6, 2021 at 12:18

1 Answer 1


Here are step by step things to deploy uniswap fork successfully

  1. deploy core contract - uniswap factory

  2. Deploy WETH contract

  3. Before moving to periphery get the init code from UniswapV2Pair.sol(in uniswap core repo). For that, compile it and copy the byte code and use this service to get the init code. Change the init code in router with new value.

  4. Now its time to deploy UniswapV2Router02.sol. Before deploying, change the original values to your own contract values. You may global search the contract addresses and replace it with your contract values.

//uniswap official deployment information









Replace the above 4 information with the contract address deployed by yourself

Now interface:-

  1. Download the uniswap interface repo. Open in vscode

Then install dependencies using terminal

yarn install

Now change the values containing official uniswap deployment details. Replace it with yours

Then Run

yarn start
  • any idea where to replace the above 4 information with the contract address deployed by yourself? I cannot find . Mar 5 at 22:02

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.