Hello everyone,
I tried to just copy-paste the UniswapV2 factory and UniswapV2 Router in order to learn how everything work but I have a problem : when I try to addLiquidity with 2 tokens, I can’t…
The error is : Transaction has been reverted by the EVM.
The factory contract : https://goerli.etherscan.io/address/0x952C4F94A3887914dE1024e9a2dc7BF2791313f9#code
The router contract : https://goerli.etherscan.io/address/0x9576c73e58C1Dad8A23Eb8554d0e835245c67b25#code
I don’t understand why it doesn’t work, because it’s the same contract, maybe I missed something ?
I managed to add liquidity with the (real) UniswapV2Router, this is the tx : https://goerli.etherscan.io/tx/0xb1f9f541cad4c2631be214d25c1005fbac8e163075764d98021a7c5f4ab52f66
And this is the tx where I have the error : https://goerli.etherscan.io/tx/0x4f23b915a7bf26ae0db1c1a9c7fb957348c3aab38a1531f99fbbbe1777337a26
There is a picture of the error on MetaMask :
Thank you for your time, have a good day !