diff --git a/CHANGES.rst b/CHANGES.rst index b29dc58533a4b5488680f4b45cdaf5b0ca80955a..73a6a57327307c05a76256dfb9319c6342a5e5fd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -72,6 +72,10 @@ Client - Added options to temporarily extend the context with other contracts and extra big maps in Michelson commands. (MR :gl:`!9946`) +- Added a ``run_step`` RPC in the plugin and a ``run michelson code`` + client command allowing to run a single Michelson instruction or a + sequence of Michelson instructions on a given stack. (MR :gl:`!9935`) + Baker ----- diff --git a/docs/alpha/michelson.rst b/docs/alpha/michelson.rst index 48c5e18ea6ea129ccb361300450098a75bfdf7b2..8de7c1472e5619c0f1e600ff7d1884022539a63b 100644 --- a/docs/alpha/michelson.rst +++ b/docs/alpha/michelson.rst @@ -1489,8 +1489,40 @@ Micheline expressions are encoded in JSON like this: As in the concrete syntax, all domain specific constants are encoded as strings. +Development tools +----------------- + +To ease the development of Michelson scripts, some tools are provided +to Michelson developers. + +Emacs mode +~~~~~~~~~~ + +`Emacs `_ can be used as a practical environment for writing, +editing and debugging Michelson programs. `Install it `_ and follow the +configuration instructions in the Michelson Emacs README `here `__. + +Interactive toplevel +~~~~~~~~~~~~~~~~~~~~ + +An interactive Michelson toplevel (also known as a `REPL +`__) +built on the :doc:`../user/mockup` mode of Octez client is available in +``scripts/michelson_repl.sh``, the typical usage is: + +:: + + $ octez-client --mode mockup --base-dir /tmp/mockup create mockup + $ rlwrap scripts/michelson_repl.sh + > UNIT + { Stack_elt unit Unit } + > UNIT + { Stack_elt unit Unit ; Stack_elt unit Unit } + > COMPARE + { Stack_elt int 0 } + Examples ---------- +-------- Contracts in the system are stored as a piece of code and a global data storage. The type of the global data of the storage is fixed for each diff --git a/docs/nairobi/michelson.rst b/docs/nairobi/michelson.rst index b4d1ca80ba4e9cc67dad60292cdf0034201f1777..1fa9c8b1217cb00b7b5fb090f4a35a253dd9d9d9 100644 --- a/docs/nairobi/michelson.rst +++ b/docs/nairobi/michelson.rst @@ -2583,8 +2583,15 @@ Micheline expressions are encoded in JSON like this: As in the concrete syntax, all domain specific constants are encoded as strings. +Environment for writing Michelson contracts +------------------------------------------- + +`Emacs `_ can be used as a practical environment for writing, +editing and debugging Michelson programs. `Install it `_ and follow the +configuration instructions in the Michelson Emacs README `here `__. + Examples ---------- +-------- Contracts in the system are stored as a piece of code and a global data storage. The type of the global data of the storage is fixed for each diff --git a/docs/user/various.rst b/docs/user/various.rst index 8175e23ef74b52f41410cd110cefd0fbb37997fd..b2a978ce95e2dc58ca9e6d216c7dfc7d9431a442 100644 --- a/docs/user/various.rst +++ b/docs/user/various.rst @@ -1,13 +1,6 @@ Various ======= -Environment for writing Michelson contracts -------------------------------------------- - -`Emacs `_ can be used as a practical environment for writing, -editing and debugging Michelson programs. `Install it `_ and follow the -configuration instructions in the Michelson Emacs README `here `__. - .. _octez-admin-client: Admin Client diff --git a/scripts/README.md b/scripts/README.md index 7e9f282135614ce4a6a63b13bfbc6ad774bb61a5..2f3399a0afe1c41870a6b1cdede74d11cab044eb 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -22,8 +22,10 @@ In particular, this includes scripts for: * setting user-activated upgrades (`user_activated_upgrade.sh`) * generating commitments (initial accounts) for test networks (`create_genesis/create_genesis_info.py`) -This directory also includes an example docker-compose file to run a node -with a baker and an accuser (`docker/docker-compose-generic.yml`). +This directory also includes an example docker-compose file to run a +node with a baker and an accuser (`docker/docker-compose-generic.yml`) +and a minimalistic Michelson REPL built on top of `octez-client` +(`michelson_repl.sh`). ## API