Apply RFCs from #3139.

Co-authored-by: David Núñez <david@nucypher.com>
pull/3139/head
derekpierre 2023-06-08 13:20:13 -04:00
parent 0700a126dd
commit 85a65ad4c5
2 changed files with 2 additions and 1 deletions

View File

@ -1 +1 @@
`TimeCondition` now uses the timestamp of the latest block for evaluating conditions, instead of system time. System time condition evaluation is no longer supported.
``TimeCondition`` now uses the timestamp of the latest block for evaluating conditions, instead of system time. System time condition evaluation is no longer supported.

View File

@ -52,5 +52,6 @@ class TimeCondition(RPCCondition):
def _execute_call(self, parameters: List[Any]) -> Any:
"""Execute onchain read and return result."""
# TODO may need to rethink as part of #3051 (multicall work).
latest_block = self.w3.eth.get_block("latest")
return latest_block.timestamp