class EIP1559 {

  public long computeBaseFee(
      final long parentBaseFee, final long parentBlockGasUsed, final long targetGasUsed) {
    guardActivation();
    assert targetGasUsed != 0L;
    long delta = parentBlockGasUsed - targetGasUsed;
    long baseFee =
        parentBaseFee
            + floorDiv(
                floorDiv(parentBaseFee * delta, targetGasUsed),
                feeMarket.getBasefeeMaxChangeDenominator());
    boolean neg = false;
    long diff = baseFee - parentBaseFee;
    if (diff < 0) {
      neg = true;
      diff = -diff;
    }

    long max = floorDiv(parentBaseFee, feeMarket.getBasefeeMaxChangeDenominator());
    if (max < 1) {
      max = 1;
    }
    if (diff > max) {
      if (neg) {
        max = -max;
      }
      baseFee = parentBaseFee + max;
    }

    return baseFee;
  }

  public  EIP1559(final long forkBlockNumber);

}