Upvote:2
It is implicit in the command given to Adam (Genesis 2:17):
but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.
Theologians understand this as the covenant of works.
The promise of blessing and life on the condition of obedience often comes with the punishment of curse and death upon disobedience.
For Adam, such promise was implicit because he lived in a state of blessedness.
See also Romans 5:18:
Therefore, as one trespass led to condemnation for all men, so one act of righteousness leads to justification and life for all men.
The 'one trespass' meant here is the trespass of Adam, while the 'one act of righteousness' is that of Jesus.
The agreement between God the Father and His Son Jesus that He would die to redeem sinners of course happened in eternity, before the command was even given to Adam.