Here are step by step things to deploy uniswap fork successfully
deploy core contract - uniswap factory
Deploy WETH contract
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.
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
Factory
0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
WETH
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Routing
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
initCode
96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f
Replace the above 4 information with the contract address deployed by yourself
Now interface:-
- 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