@Override
  public OperationResult execute(final MessageFrame frame, final EVM evm) {
    try {
      final Address address = Words.toAddress(frame.popStackItem());
      final boolean accountIsWarm =
          frame.warmUpAddress(address) || gasCalculator().isPrecompile(address);
      final long cost = cost(accountIsWarm);
      if (frame.getRemainingGas() < cost) {
        return new OperationResult(cost, ExceptionalHaltReason.INSUFFICIENT_GAS);
      }

      final Account account = frame.getWorldUpdater().get(address);

      if (account == null || account.isEmpty()) {
        frame.pushStackItem(Bytes.EMPTY);
      } else {
        if (enableEIP3540) {
          final Bytes code = account.getCode();
          if (code.size() >= 2 && code.get(0) == EOFLayout.EOF_PREFIX_BYTE && code.get(1) == 0) {
            frame.pushStackItem(EOF_REPLACEMENT_HASH);
          } else {
            frame.pushStackItem(account.getCodeHash());
          }
        } else {
          frame.pushStackItem(account.getCodeHash());
        }
      }
      return new OperationResult(cost, null);

    } catch (final UnderflowException ufe) {
      return new OperationResult(cost(true), ExceptionalHaltReason.INSUFFICIENT_STACK_ITEMS);
    } catch (final OverflowException ofe) {
      return new OperationResult(cost(true), ExceptionalHaltReason.TOO_MANY_STACK_ITEMS);
    }
  }
Cost of Ext code hash operation.

@param accountIsWarm the account is warm
@return the long
evm/src/main/java/org/hyperledger/besu/evm/operation/ExtCodeHashOperation.java