protected long dynamicIntrinsicGasCost(final Transaction transaction, final long baselineGas) {
    final int payloadSize = transaction.getPayload().size();

    long cost =
        clampedAdd(callDataCost(payloadSize, transaction.getPayloadZeroBytes()), baselineGas);

    if (cost == Long.MIN_VALUE || cost == Long.MAX_VALUE) {
      return cost;
    }

    if (transaction.isContractCreation()) {
      cost = clampedAdd(cost, contractCreationCost(payloadSize));

      if (cost == Long.MIN_VALUE || cost == Long.MAX_VALUE) {
        return cost;
      }
    }

    return cost;
  }
Calculates the dynamic part of the intrinsic gas cost

@param transaction the transaction
@param baselineGas how much gas is used by access lists and code delegations
@return the dynamic part of the intrinsic gas cost
evm/src/main/java/org/hyperledger/besu/evm/gascalculator/FrontierGasCalculator.java