Yes, addiction is hereditary. According to NCBI, both genetic and environmental variables contribute to the initiation of use of addictive agents and to the transition from use to addiction. Addictions are moderately to highly heritable. Family, adoption, and twin studies reveal that an individual’s risk tends to be proportional to the degree of genetic relationship to an addicted relative. An important view of the shifting balance in importance of genetic and environmental influences has been obtained from the developmental perspective.
I hope this helps you understand if addiction is hereditary.