0

Can somebody please help me? Created and deployed a smart contract and now ETH is stuck in it and won’t show in the creator’s account. any way to get it using the creator’s PK? Need help so badly, please. Thanks a lot in advance!

CONTRACT ADDRESS: 0x2193B9F2B5E5051E41C32c71B25587D6A6f045C8

You may also reach me at cryptojiru@gmail.com

1

If the contract does not have a built-in way to send funds from it (like a function that will send the Ether or self destruct), there is no way to retreive the Ether from the contract. Looking at the contract code on Etherscan, there doesn't seem to be a way to do this.

| improve this answer | |
0

That contract's fallback function has a couple of problems:

function() payable {
    totalEthInWei = totalEthInWei + msg.value;
    uint256 amount = (msg.value + unitsOneEthCanBuy) - msg.value;
    if (balances[fundsWallet] < amount) {
        return;
    }

    balances[fundsWallet] = balances[fundsWallet] - amount;
    balances[msg.sender] = balances[msg.sender] + amount;

    Transfer(fundsWallet, msg.sender, amount); // Broadcast a message to the blockchain

    //Transfer ether to fundsWallet
    fundsWallet.transfer(msg.value);                               
}
  • It will always transfer the same amount of tokens unitsOneEthCanBuy regardless of the amount of ether sent.

  • If tokens for fundsWallet fall below unitsOneEthCanBuy then it will not transfer any tokens nor it will return the ether deposited. The ether will remain in the contract stuck forever since it doesn't provide a mechanism to extract it.

| improve this answer | |
  • And if i send enough tokens back to the contract address, will it forward the ETH to the creator? Thank you so much for the help. – Jiru Saka Aug 30 at 4:51
  • @JiruSaka No, the ether deposited cannot be extracted since the contract doesn't provide a way to achieve that, it only forward the received amount it doesn't touch the previous balance. – Ismael Aug 30 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.