Whithdraw From Contract In Solidity

[Solved] Whithdraw From Contract In Solidity | Solidity - Code Explorer | yomemimo.com
Question : whithdraw from contract in solidity

Answered by : sheeeev66

 /** * @dev withdraw contract balance to a wallet * @dev won't execute if it isn't the owner who is executing the command * @dev using openzeppelins OnlyOwner.sol class * @param _address the address to withdraw to */ function withdraw(address payable _address) public onlyOwner { uint contractBal = address(this).balance; _address.transfer(contractBal); emit withdrawn(_address, contractBal); }

Source : | Last Update : Fri, 10 Sep 21

Answers related to whithdraw from contract in solidity

Code Explorer Popular Question For Solidity