Faithfully Abel offered to God a greater sacrifice than Cain, through which he testified existing righteous, God testifying to the extent of his gift through his faith, and dead still he speaks (Hebrews 11:4)
Abel was a keeper of sheep while Cain worked the ground. Cain brought before the Lord an offering of the fruit of the ground, and "Abel also brought of the firstborn of his flock and of their fat portions And the Lord looked favorably upon Abel and his offering, but for Cain and his offering he did not look" (Genesis 4:1-6). Abel testified of his faith through his deed, and it was accounted unto him as righteousness. What did Abel do that God would look favorably upon him and count him righteous?
Just as Abraham “believed God, and it was counted to him as righteousness”? Know then that the ones from of faith exist the sons of Abraham. Now, the scripture foreseeing that God justifies the Gentiles from faith, preached the gospel beforehand to Abraham, saying, “In you shall all the nations be blessed" (Galatians 3:6-8)
It is an amazing verse. The promise that through his seed all nations and peoples would be blessed was given to Abraham before circumcision and the Law so that it did not rest on these but on faith according to grace (Romans 4:16). Even those under the Law stumbled because they did not seek righteousness from faith but from works (Romans 9:30-33). Abraham testified of his faith through his deeds, he would have sacrificed his own son. When they were going up the mountain to build an altar, Issac asked his father we have the wood and fire but where is the lamb? Abraham said God will provide.
Abraham “believed God, and it was counted to him as righteousness”
In the new covenant, we are justified through faith, through the blood of the Lamb, by grace through redemption, thereby receiving through believing in the gospel abundant grace and the gift of righteousness (Romans 5:9; Romans 5:17-21). Those before the new covenant, even those under the Law, were counted righteous through faith.
Paul writes the church was founded upon the prophets, not just the apostles with Jesus as the foundation stone. The prophets got to look into the mystery and see the gospel, thus faith was available to others through them. Paul writes Abraham heard the gospel beforehand and believed which was counted unto him as righteousness. In this verse Jesus speak of it, "your father Abraham rejoiced that he would see my day. He saw it and was glad.”
(John 8:56 ESV). Is there any other way one can be counted righteous before God?
For the promise, he existed heir of the world, not to Abraham neither his descendant through the law but through the righteousness of faith (Romans 4:13)
How is one counted righteous? "Now the righteousness of God has been manifested apart from the law, although the Law and the Prophets bear witness to it— the righteousness of God through faith in Jesus Christ for all who believe. For there is no distinction: for all have sinned and fall short of the glory of God," (Romans 4:5) Now, it is not the deed or work that makes one righteous though the deed testifies of faith. "And to the one who does not work but believes in him who justifies the ungodly, his faith is counted as righteousness" (Romans 4:13).
So back to Abel and our question. What did Abel do that God would look favorably upon him and count him righteous? Abel had faith and testified of his faith through his deed. We have established he wasn't counted righteous by works, because he gave a tithe of his best or some first fruit offering while Cain did not. No, his deed testified of his faith, that he believed the gospel, that God would give a spotless lamb. God looked favorably upon Abel through which he testified existing righteous, testifying to the extent of his gift through his faith. Does Abel's faith go deeper? that he chose a career path as a shepherd so he could testify of his faith by giving a spotless lamb. Abel's faith still speaks though he is dead.