I was making a swapping contract where a user could swap tokens using uniswapv2router. I have taken example code from here - https://cryptomarketpool.com/how-to-swap-tokens-on-uniswap-using-a-smart-contract/
I was swapping WETH to doge and getAmountOutMin function gives out min tokens. their contract addresses are:
WETH: 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6
DOGE: 0x962Da63FF7a33875b2D4ed47112ADe44B1Db96E7
However when I tried to swap tokens, it always fails with an error. I have deployed it to Kovan testnet. Any help is appreciated.
Failed transaction is- https://goerli.etherscan.io/tx/0xcbe5bae9b0bd77ae25f2cb900f1d355090d3f1b90c86c9627e609b06ea176864
Smart contract address is: 0x3801e3e49dc73e2a124ea82ec1327068d1b517d9
(Kovan)