The Book of the Rules of Inheritance
كتاب الفرائض
Chapter 1: Give The Shares Of Inheritance To Those Who Are Entitled To Them, And Whatever Is Left Goes To The Closest Male Relative
Tawus reported on the authority of Ibn Abbas (Allah be pleased with them) narrating that Allah's Messenger (ﷺ) said
Distribute the property amongst Ahl al-Fara'id, according to the Book of Allah, and what is left out of them goes to the nearest male heir.
Chapter 4: Whoever Leaves Behind Wealth, It Is For His Heirs
Abu Huraira (Allah be pleased with him) reported Allah's Apostle (ﷺ) as saying
He who leaves property, that is for the inheritors; and he who leaves behind destitute children, then it is my responsibility (to look after them).
This hadith has been narrated on the authority of Shu'ba with the same chain of transmitters.