The following question has been asked on Telegram:
In smartPy, how do I check that the time a call is being made is past the set time?
I tried using sp.now to get a timestamp but it returns 0
The following question has been asked on Telegram:
In smartPy, how do I check that the time a call is being made is past the set time?
I tried using sp.now to get a timestamp but it returns 0
sp.now
is the right way to get the time a call is being made.
In the test scenario system, the time is set to sp.timestamp(0)
by default, see How to test timestamp or other context on onchain views to set another value.