@Override
  public long calculateCodeDelegationResolutionGas(
      final MessageFrame frame, final Account targetAccount) {
    if (targetAccount == null) {
      return 0;
    }

    final Hash codeHash = targetAccount.getCodeHash();
    if (codeHash == null || codeHash.equals(Hash.EMPTY)) {
      return 0;
    }

    if (!hasCodeDelegation(targetAccount.getCode())) {
      return 0;
    }

    final Address targetAddress =
        CodeDelegationHelper.getTargetAccount(
                frame.getWorldUpdater(), this::isPrecompile, targetAccount)
            .getTargetAddress();
    final boolean isWarm = isPrecompile(targetAddress) || frame.warmUpAddress(targetAddress);
    return isWarm ? getWarmStorageReadCost() : getColdAccountAccessCost();
  }
Instantiates a new Prague Gas Calculator

@param maxPrecompile the max precompile
evm/src/main/java/org/hyperledger/besu/evm/gascalculator/PragueGasCalculator.java