interface IGasToken {

    /// @dev Frees up to `value` sub-tokens
    /// @param value The amount of tokens to free
    /// @return freed How many tokens were freed
    function freeUpTo(uint256 value) external returns (uint256 freed);

    /// @dev Frees up to `value` sub-tokens owned by `from`
    /// @param from The owner of tokens to spend
    /// @param value The amount of tokens to free
    /// @return freed How many tokens were freed
    function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);

    /// @dev Mints `value` amount of tokens
    /// @param value The amount of tokens to mint
    function mint(uint256 value) external;
}
function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);

/// @dev Frees up to `value` sub-tokens owned by `from`
/// @param from The owner of tokens to spend
/// @param value The amount of tokens to free
/// @return freed How many tokens were freed