!!!! And look at the timeline! The promise to Abraham was before the law!
God's promise just for believing Him! ALL the glory to God!
Matthew 5:6
Blessed and fortunate and happy and spiritually prosperous (in that state in which the born-again child of God enjoys His favor and salvation) are those who hunger and thirst for righteousness (uprightness and right standing with God), for they shall be completely satisfied!
Deuteronomy 24:13
You shall surely restore to him the pledge at sunset, that he may sleep in his garment and bless you; and it shall be credited to you as righteousness (rightness and justice) before the Lord your God.
Psalm 106:31
And that was credited to him for righteousness (right doing and right standing with God) to all generations forever.
Romans 4:5
But to one who, not working [by the Law], trusts (believes fully) in Him Who justifies the ungodly, his faith is credited to him as righteousness (the standing acceptable to God).
Romans 4:22
That is why his faith was credited to him as righteousness (right standing with God).
Please know too...I am not in any way discrediting the law of the Lord. His law and is always the way things work. I just happen to believe that our only chance of doing things righteously is through the gift we have been given in Jesus Christ!