I am trying to sell from my Solidity contrst in uniswap. I have approved and I am calling the correct method with the right arguments, but I always get INSUFFICIENT_INPUT_AMOUNT. any help?
May 14, 2022, 6:50 PM
i dont think so, I am testing on the testnet
anything wrong there?
May 14, 2022, 7:06 PM
broken function
May 14, 2022, 7:38 PM
what is broken?
May 14, 2022, 7:38 PM
bad code
May 14, 2022, 7:38 PM
yes, I can tell that from the fact that it is failing 😆but could you point me to the error?
or link to some reference code that works, maybe
block.timestamp works fine, that is not the problem, that would rise a different problem
May 14, 2022, 7:46 PM
Not true
May 14, 2022, 7:48 PM
are you trying to sell or buy
it's confusing.
May 14, 2022, 7:49 PM
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'PancakeRouter: EXPIRED');
_;
}
^ that is the error I would get if timestamp was the problem, that is not the error I am getting.
require(deadline >= block.timestamp, 'PancakeRouter: EXPIRED');
_;
}
^ that is the error I would get if timestamp was the problem, that is not the error I am getting.
I am using swapExactTokensForETH, that is a standard router method to sell
May 14, 2022, 7:49 PM
not saying timestamp is the problem
May 14, 2022, 7:49 PM
what is the problem, then?
that is what is strange
May 14, 2022, 7:51 PM
are you selling contracts token for wbnb?
May 14, 2022, 7:51 PM
I think it is realted with the approval, but not sure
yes...
May 14, 2022, 7:52 PM
i think it might be the approve
the router needs approve over the contract balance not the token
May 14, 2022, 7:56 PM
I can do it
Any token you need i create for you in bep20 or erc20
May 14, 2022, 9:50 PM
But not with working tax :D
May 14, 2022, 9:50 PM
This is hard man 😂😂
May 14, 2022, 9:52 PM
😆😆
May 14, 2022, 10:02 PM