The Messenger of Allah ﷺ said on the day of Hunayn, within a long account, "Who will stand guard over us tonight?"Anas bin Abu Marthad al-Ghanawi replied, "I will, Messenger of Allah."The account mentions that the Messenger of Allah ﷺ then said to him, "You have secured your reward, so it would not matter if you did no further deed after this."
أن رسول الله ﷺ قال يوم حنين في- سياق طويل-: من يحرسنا الليلة؟ قال أنس بن أبي مرثد الغنوي: أنا يا رسول الله، وفيه أن رسول الله ﷺ قال له: قد أوجبت، فلا عليك أن لا تعمل بعدها.
Abu Dawud (2501), Nasai in Kubra (8819), Hakim (2/83), and Bayhaqi (9/149) all narrated it through the route of Abu Tuba, who said, Muawiya bin Salam narrated to us, from Zayd bin Salam, that he heard Abu Salam say, Saluli Abu Kabsha narrated to me, that Sahl bin Hanzaliyyah narrated to him, and he then mentioned it. This chain is sahih. The full hadith was mentioned earlier in the chapter on the battle of Hunayn, in the section on the Prophet's ﷺ announcement of glad tidings about the spoils of Hunayn.