Was mahavira from ikshavaku dynasty
Yes. In Jain accounts, Mahavira (Vardhamana) is described as belonging to the Ikshvaku dynasty, i.e., the solar (Suryavansha) lineage. He is said to have been born in Vaishali to King Siddhartha of the Ikshvaku lineage and Queen Trishala. Different Jain texts may give slightly varying details about exact genealogical steps, but the overarching tradition consistently places Mahavira in the Ikshvaku (solar) royal line.