Sahih al-Bukhari, Book 24, Hadith 6 (Bukhari 1354)

Narrated Jarir bin `Abdullah:

I gave the pledge of allegiance to the Prophet (ﷺ) for offering prayer perfectly, giving Zakat, and giving good advice to every Muslim.