"I am one of the chiefs who pledged allegiance to the Messenger of Allah ﷺ." He said, "We pledged to him that we would not associate anything with Allah, would not steal, would not commit adultery, would not kill the soul which Allah has forbidden except by right, would not plunder, and would not disobey. If we fulfilled that, paradise would be ours, but if we fell short in any of it, the matter would be left to Allah."
إني لمن النقباء الذين بايعوا رسول الله ﷺ، وقال: بايعناه على أن لا نشرك بالله شيئا، ولا نسرق، ولا نزني، ولا نقتل النفس التي حرم الله إلا بالحق، ولا ننتهب، ولا نعصى، فالجنة إن فعلنا ذلك، فإن غشينا من ذلك شيئا كان قضاء ذلك إلى الله.
Bukhari narrated it in the Merits of the Ansar (3893), and Muslim in the Punishments (1709:44), both from Qutayba bin Saeed, who said, Layth narrated to us, from Yazid bin Abu Habib, from Abu Khayr, from Sanabihi, from Ubada bin Samit, and he mentioned it, and their wording is the same.