public static CodeDelegationAccount getTargetAccount(
      final WorldUpdater worldUpdater, final Predicate<Address> isPrecompile, final Account account)
      throws IllegalArgumentException {
    if (account == null) {
      throw new IllegalArgumentException("Account must not be null.");
    }

    if (!hasCodeDelegation(account.getCode())) {
      throw new IllegalArgumentException("Account does not have code delegation.");
    }

    final Address targetAddress =
        Address.wrap(account.getCode().slice(CODE_DELEGATION_PREFIX.size()));

    final Bytes targetCode = processTargetCode(worldUpdater, isPrecompile, targetAddress);

    return new CodeDelegationAccount(account, targetAddress, targetCode);
  }
Returns the target account of the delegated code.

@param worldUpdater the world updater.
@param isPrecompile function to check if an address belongs to a precompile account.
@param account the account which has a code delegation.
@return the target account of the delegated code, throws IllegalArgumentException if account is
    null or doesn't have code delegation.
evm/src/main/java/org/hyperledger/besu/evm/worldstate/CodeDelegationHelper.java