The Code of Hammurabi is a Babylonian legal text, dated approx. 1792-1750 BCE and written in Akkadian. It lays out the punishments administered for various crimes, including false testimony, fraud, and murder.
It was dedicated to the pantheon of Mesopotamian gods with no mention of Yahweh.
And like the Bible, it does not question the legality of slavery.