I've created contract with function to withdraw ether from it to owner wallet:

contract test {
   address owner;
   function test() {
      owner = msg.sender;
   function sendEtherToOwner() {                       

And ether withdrawing works with this function.

If I've already created another smart contract without such function, is any way to withdraw ether from it to owner wallet?

  • So, what you are saying is that if there is no kill or withdraw function specifically implemented, the ether is stuck in the wallet forever and there is no way of getting it out? Commented Oct 5, 2017 at 17:39

2 Answers 2


No. Unless you have a self destruct / suicide function, or a way to transfer ether, there's no way to get ether out of the contract. This is by design: if there were an automatic "escape hatch", nobody could trust a smart contract they didn't deploy to hold ether for them.

It's also worth noting that the idea of an "owner" isn't built into contracts - unless you encode such a distinction, the creator of a contract has no more ability to influence the contract than anyone else.


unless you got a kill function like this no.

function kill() {
        if (msg.sender == owner)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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