From 6c856df429695e877646a233c393bd3c5d1e95d0 Mon Sep 17 00:00:00 2001 From: Mary Anthony Date: Tue, 29 Oct 2019 08:23:03 -0700 Subject: [PATCH] updating the sample code Signed-off-by: Mary Anthony --- _core/smart/tutorial.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/_core/smart/tutorial.md b/_core/smart/tutorial.md index 663f236f..b0ed36fd 100644 --- a/_core/smart/tutorial.md +++ b/_core/smart/tutorial.md @@ -159,12 +159,22 @@ In this task, you interact with the the contracts using the `clarity-cli` comman When the `check` command executes successfully and exits with the stand UNIX `0` exit code. -4. Launch the `tokens.clar` contract. +4. Generate a Stacks address for your contract. + + This address is used to name your contract at launch time. You can use any existing Stacks address. For this sample, you are going to use the `generate_address` to create one for use. + + ```bash + # clarity-cli generate_address + SPN7V35591YV8TMHAZYXDF2EKTGG5SR6RZZRD00Q + ``` + + +5. Launch the `tokens.clar` contract. You use the `launch` command to instantiate a contract on the Stacks blockchain. If you have dependencies between contracts, for example names.clar is dependent on tokens.clar, you must launch the dependency first. ```bash - # clarity-cli launch tokens sample-programs/tokens.clar /data/db + clarity-cli launch SPN7V35591YV8TMHAZYXDF2EKTGG5SR6RZZRD00Q.tokens sample-programs/tokens.clar /data/db Contract initialized! ```