contract Withdrawable is Ownable {

    event EtherWithdrawn(
        address sender,
        uint amount
    );

    receive() external virtual payable {}

    // @dev: allows the owner to withdraw the eth that has been deposited in the contract
    function withdrawEth() external onlyOwner {
        address payable to = payable(msg.sender);
        uint bal;
        assembly {
            bal := selfbalance()
        }
        require(
            bal > 0, 
            "Withdrawable withdrawEth() - No ether balance in the contract"
        );
        (bool success, ) = to.call{value: bal}("");
        require(
            success,
            "Withdrawable withdrawEth() - Could not withdraw eth"
        );

        emit EtherWithdrawn(
            msg.sender,
            bal
        );
    }
}
function withdrawEth() external onlyOwner {
        address payable to = payable(msg.sender);
        uint bal;
        assembly {
            bal := selfbalance()
        }
        require(
            bal > 0, 
            "Withdrawable withdrawEth() - No ether balance in the contract"
        );
        (bool success, ) = to.call{value: bal}("");
        require(
            success,
            "Withdrawable withdrawEth() - Could not withdraw eth"
        );

        emit EtherWithdrawn(
            msg.sender,
            bal
        );
    }
// @dev: allows the owner to withdraw the eth that has been deposited in the contract