From 881fbe490632205f25ded4d81a442fc8804df54b Mon Sep 17 00:00:00 2001 From: Joseph Cook <33655003+jmcook1186@users.noreply.github.com> Date: Mon, 30 May 2022 17:13:51 +0100 Subject: [PATCH] add line about `js` command --- docs/_interface/JavaScript-Console.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_interface/JavaScript-Console.md b/docs/_interface/JavaScript-Console.md index 1da5f5071c..3d7c7c78b6 100644 --- a/docs/_interface/JavaScript-Console.md +++ b/docs/_interface/JavaScript-Console.md @@ -163,6 +163,13 @@ The `--jspath` flag is used to set a library directory for the Javascript script that do not explicitly define an absolute path will be interpreted relative to the `jspath` directory. +Another alternative way to run scripts is using Geth's `js` flag. In this case, run Geth with the `js` flag pass the path to the scripts, e.g. + +``` +geth js myscript.js + +``` + ## Timers In addition to the full functionality of JS (as per ECMA5), the Ethereum Javascript Runtime Environment (JSRE) is augmented with various timers. It implements `setInterval`, `clearInterval`, `setTimeout`, `clearTimeout` which some users will be familiar with from browser windows. It also provides implementation for `admin.sleep(seconds)` and a block based timer, `admin.sleepBlocks(n)` which sleeps till the number of new blocks added is equal to or greater than `n`.