whithdraw from contract in solidity
/** * @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); }