contestada

Is the underlined infinitive being used as a noun, adverb, or adjective?
April bought eighty lottery tickets to give as gifts.
____________