I try to refund gas to the minimum even after using revert with the following example.
uint A = IERC20(base).balanceOf(address(this));
IERC20(token).transfer(owner,1000000);
then I run swaps functions
IUniswapV2Pair(pairA).swap( amount0Out2, amount1Out2, pairB, new bytes(0));
IUniswapV2Pair(pairB).swap( amount0Out2, amount1Out2, pairC, new bytes(0));
IUniswapV2Pair(pairC).swap( amount0Out2, amount1Out2, address(this), new bytes(0));
uint b = IERC20(base).balanceOf(address(this));
finally I apply a condition
if(a>b){revert(0,0)}
This revert consumes all the gas already used, is it possible to return the gas already used taking into account that the state in the block does not change?