The Messenger of Allah ﷺ forbade two types of transactions, mulamasah and munabadhah.
أخبرنا الحسين بن حريث المروزي قال حدثنا سفيان عن الزهري عن عطاء بن يزيد
نهى رسول الله ﷺ عن بيعتين عن الملامسة والمنابذة
Bukhari narrated it in "Isti'dhan," chapter on sitting however is convenient, hadith no. 6284, from the hadith of Sufyan Ibn Uyayna, transmitted through the same chain, and it is also found in Al-Kubra, hadith no. 6103.