I couldn't find any relevant documentation information about the now keyword.
However the now keyword and block.timestamp both return the time of the block function when executed.
Can anyone provide any insight?
Asked
Active
Viewed 280 times
0
Suyash Joshi
- 1
- 2
1 Answers
1
There isn't any difference between block.timestamp and now. They're aliases.
But note that in Solidity v0.7.0, the now keyword has been deprecated.
Thus, from this version onwards, you should use block.timestamp instead of now for retrieving the current time of the block.
You can find more information about this change in the documentation.
Paul Razvan Berg
- 17,902
- 6
- 73
- 143
Antonio Carito
- 2,445
- 3
- 10
- 23