From 9c2a2f173353505e8e9ccf27d31f26e555892e20 Mon Sep 17 00:00:00 2001 From: Fede Sarquis <43999360+fede2442@users.noreply.github.com> Date: Tue, 27 Dec 2022 16:34:14 -0300 Subject: [PATCH] The opc command does not return 2 values. While following this tutorial I noticed that opc command does not return 2 values as the tutorial said but rather needed to run the command 2 times, one with the -H flag and one without to get the puzzle hash and puzzle reveal. From the command --help: -H, --script-hash Show only sha256 tree hash of program --- guides/chialisp-primer/first-smart-coin.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guides/chialisp-primer/first-smart-coin.md b/guides/chialisp-primer/first-smart-coin.md index 61bb585d..2ee8c33d 100644 --- a/guides/chialisp-primer/first-smart-coin.md +++ b/guides/chialisp-primer/first-smart-coin.md @@ -84,13 +84,19 @@ We will now use these concepts and the `password.clsp` file you just wrote to cr Don't use a password that you use or plan to use for anything else, as this is not a secure smart coin. The most ideal choice for this is any number of random characters of your choice, such as `x7h2dDkE`. Just write it down for later. ::: -The first step is to curry the puzzle with the password's hash and get the puzzle hash and puzzle reveal: +The first step is to curry the puzzle with the password's hash and get the puzzle hash: ```bash opc -H "$(cdv clsp curry password.clsp --args "$(run "(sha256 'password')")")" ``` -Write down both values this produces, the first one being the puzzle hash, and the second being the puzzle reveal. +Then run the same command without the -H flag to get the puzzle reveal: + +```bash +opc "$(cdv clsp curry password.clsp --args "$(run "(sha256 'password')")")" +``` + +Write down both values. You can convert the puzzle hash to an address and send funds to it like so: