From e731c5e521233df8e3f944d12efbe20b42625ad3 Mon Sep 17 00:00:00 2001 From: Gregor Date: Mon, 15 Jan 2024 08:40:16 +0100 Subject: [PATCH] remove example that suggests vulnerable code --- docs/zkapps/o1js/on-chain-values.mdx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/zkapps/o1js/on-chain-values.mdx b/docs/zkapps/o1js/on-chain-values.mdx index 7d85e3144..d44406069 100644 --- a/docs/zkapps/o1js/on-chain-values.mdx +++ b/docs/zkapps/o1js/on-chain-values.mdx @@ -64,13 +64,6 @@ class VotingApp extends SmartContract { A more refined example could store the current start date in an on-chain state variable, which can then be reset by some process that is also encoded by the zkApp. -In addition to using a predefined range, you can also construct a range that depends on another variable, such as the current time. For example, a DEX with an order book could support orders that expire after an hour. In this case, the range would be `[now, now + 1h]`: - -```ts -const now = this.network.timestamp.get(); -this.network.timestamp.requireBetween(now, now.add(60 * 60 * 1000)); -``` - ### Network reference For completeness, here is the full list of network states you can use and make assertions about in your zkApp.