God’s promise to Abraham was based on the principle of faith, not law or works.
For the promise that he would be the heir of the world was not to Abraham or to his seed through the law, but through the righteousness of faith. For if those who are of the law are heirs, faith is made void and the promise made of no effect, because the law brings about wrath; for where there is no law there is no transgression. Romans 4:13-15
All of God’s dealings with Abraham, Isaac, and Jacob happened before the giving of the Mosaic Law. Their righteousness or right-ness with God was not based on the law or their good deeds. Their right-ness was based on God’s declaration of Abraham’s righteousness through faith.
“Faith is the ground of God’s blessing. Abraham was a blessed man, indeed, but he became heir of the world on another principle entirely - simple faith.” (Newell)
