I suffered from genital warts 2 years back and cured with treatment. Is it ok to have unprotected sex with my partner and would I infect them if I did?

Genital warts. You received treatment for your visible lesions, but may still have sub-clinical ones not identifiable with the naked eye. Men can undergo an aceto-wash test that can help reveal some genital lesions, but it is not "fool-proof" and I have never performed it in women. Best bet it to always assume that you could "infect" any partner, and should inform them/use "protection" at all times.
Sti. From your experience with genital warts, i would think that you learned the importance of sexual transmitted infection prevention. Condom is not perfect, but it's the best protection you can get.