0

I have 100 ether in my smart contract now I want to transfer the ether from contract to account automatically

  • 1
    Show your contract's code please. – goodvibration Jun 3 at 14:55
1

For you to be able to withdraw/transfer any ether from your smart contract, the functionality to do so, must be included as part of the smart contract i.e. some kind of withdraw function, selfdestruct etc. If the functionality is not defined within the smart contract, then the ether will be stuck in the smart contract.

0

use transfer() function. more detail

other Address = 0xsdlapd // ... target balance

otherAddress.transfer(100 * 10 **18) // 100 * 10 ** 18  = 100 ETH
0

Put msg.sender.transfer(yourAmount) inside some function, make sure it's written right and then call it from your account.

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.