Code to reproduce
Environment
I have ERC20 tokens accumulated in the smart contract and unable to recover the tokens from the contract, Any Help appreciated. Here is the contract address
I have ERC20 tokens accumulated in the smart contract and unable to recover the tokens from the contract, Any Help appreciated. Here is the contract address
Hey @Kiran_P you can use this function
It is not allowing me.
function recoverBEP20(address tokenAddress, uint256 tokenAmount) public onlyOwner {
// do not allow recovering self token
require(tokenAddress != address(this), "Self withdraw");
IERC20(tokenAddress).transfer(owner(), tokenAmount);
}
By design it won't let you withdraw if you're not the owner of the contract or if you're trying to withdraw the contracts token. Unfortunately (well, fortunately actually, that would be a huge problem if people could just take tokens out of a contract) there's no way around that
Hi,
I would like to assist you with your requirement, please reach me at seth(@)cisinlabs(dot)com to discuss further.
Regards!
Seth