protected static Code getCode(final EVM evm, final MessageFrame frame, final Account account) {
    if (account == null) {
      return CodeV0.EMPTY_CODE;
    }

    final Hash codeHash = account.getCodeHash();
    if (codeHash == null || codeHash.equals(Hash.EMPTY)) {
      return CodeV0.EMPTY_CODE;
    }

    if (!hasCodeDelegation(account.getCode())) {
      return evm.getCode(account.getCodeHash(), account.getCode());
    }

    final CodeDelegationAccount targetAccount =
        getTargetAccount(frame.getWorldUpdater(), evm.getGasCalculator()::isPrecompile, account);

    return evm.getCode(targetAccount.getCodeHash(), targetAccount.getCode());
  }
Gets the code from the contract or EOA with delegated code.

@param evm the evm
@param frame the message frame
@param account the account which codes needs to be retrieved
@return the code
evm/src/main/java/org/hyperledger/besu/evm/operation/AbstractCallOperation.java