Sahih al-Bukhari, Book 64, Hadith 50 (Bukhari 3834)

Narrated 'Ubada bin As-Samit:

(who was one of the Badr warriors) Allah's Messenger (ﷺ) said, "Give me the pledge of allegiance."