@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);
      } else {
        final Account account = frame.getWorldUpdater().get(address);

        Bytes codeSize;
        if (account == null) {
          codeSize = Bytes.EMPTY;
        } else {
          final Bytes code = account.getCode();
          if (enableEIP3540
              && code.size() >= 2
              && code.get(0) == EOFLayout.EOF_PREFIX_BYTE
              && code.get(1) == 0) {
            codeSize = EOF_SIZE;
          } else {
            codeSize = Words.intBytes(code.size());
          }
        }
        frame.pushStackItem(codeSize);
        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 size operation.

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