0

How can I withdraw ether balance from a contract to a personal account? İ tried but I couldn't do it on Ropsten. Could anybody tell me step by step how to test this? Thanks.

1 Answer 1

2

Indeed, contracts can hold ether balance. To withdraw funds, you just need to do:

msg.sender.transfer(balance);

Where msg.sender is the external account which calls the contract's function. You can find an example escrow contract written in Solidity here.

0

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.