[Ethereum] Is any way to withdraw ether from a smart contract to owner wallet, if no such method in it


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?

Best Answer

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.

Related Topic