The Messenger of Allah (ﷺ) forbade selling the right of inheritance, or giving it as a gift. Sunan Ibn Majah Book 23, Hadith 30