smartcontractsbinance-smart-chainbsc

Can I get back BNB sent to contract address


I mistakeanly sent BNB to the BSC contract address 0xf4De1f6169C5a1189c0664f838BB44F293cf8cf3. The token owners say they cannot recover the funds. Can someone please take a look at the contract and see if the BNB can be recovered? Thank you.


Solution

  • As long as the contract doesn't have to withdraw function, you cannot get back your BNB from the contract anyway. I just took a look at the contract functions. There is no withdrawal function in the contract. Instead, there is a BEP20 token withdrawal function.

    function recoverBEP20(address token address, uint256 token amount) public onlyowner {
            // do not allow recovering self token
            require(tokenAddress != address(this), "Self withdraw");
            IERC20(tokenAddress).transfer(owner(), tokenAmount);
        }
    

    As you can see from the code, only the owner can call this function. If you can kindly ask the owner, you may find a way to get back the BNB or equivalent their tokens.

    Thank you.