Luke 16:17 Jesus says: "And it is easier for heaven and earth to pass, than one tittle of the law to fail." Psalm 89:34 God says: "My covenant will I not break, nor alter the thing that is gone out of my lips." Deuteronomy 11:1 Moses. Genesis 26:5 Abraham same Commandments.
ESV - 5 Because Abraham obeyed my voice and kept my charge, my commandments, my statutes, and my laws.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
There was no law in Abraham's day and time (Ten Commandments). Abraham was counted righteous with God because he believed God, and because of this God called Abraham His friend - Praise God !
Abraham - yes obeyed - in Genesis 12 :1-5, and Gen 15:6). Abraham broke the law: the man lied about his wife. . . and the man acted totally in opposition to the Gen 15 promise. Beside the Romans text says clearly "all have sinned and fallen short of the glory of the Lord. That is Abram, Moses, Job David etc. Only by God's grace are we saved and that works when we obey and do what the Lord commands.
Abraham obeyed the same Commandments as did Moses. Deuteronomy 11:1 and Genesis 26:5.