contract Withdrawable is Ownable {
    using SafeERC20 for IERC20;

    function adminWithdraw(address asset) onlyOwner public {
        uint amount = adminWitrawAllowed(asset);
        require(amount > 0, "admin witdraw not allowed");
        if (asset == address(0)) {
            msg.sender.transfer(amount);
        } else {
            IERC20(asset).safeTransfer(msg.sender, amount);
        }
    }

    // can be overridden to disallow withdraw for some token
    function adminWitrawAllowed(address asset) internal view returns(uint allowedAmount) {
        allowedAmount = asset == address(0)
            ? address(this).balance
            : IERC20(asset).balanceOf(address(this));
    }
}
function adminWitrawAllowed(address asset) internal view returns(uint allowedAmount) {
    allowedAmount = asset == address(0)
        ? address(this).balance
        : IERC20(asset).balanceOf(address(this));
}

// can be overridden to disallow withdraw for some token