Browse Source

updating clarity command

Signed-off-by: Mary Anthony <mary@blockstack.com>
feat/clarity-updates
Mary Anthony 5 years ago
parent
commit
b8fdddee4a
  1. 22
      _core/smart/clarityCLI.md

22
_core/smart/clarityCLI.md

@ -3,10 +3,10 @@ layout: core
description: "Blockstack smart contracting language" description: "Blockstack smart contracting language"
permalink: /:collection/:path.html permalink: /:collection/:path.html
--- ---
# clarity-cli command line # clarity command line
{:.no_toc} {:.no_toc}
You use the `clarity-cli` command to work with smart contracts within the Blockstack virtual environment. This command has the following subcommands: You use the `clarity` command to work with smart contracts within the Blockstack virtual environment. This command has the following subcommands:
* TOC * TOC
{:toc} {:toc}
@ -14,7 +14,7 @@ You use the `clarity-cli` command to work with smart contracts within the Blocks
## initialize ## initialize
```bash ```bash
clarity-cli initialize [vm-state.db] clarity initialize [vm-state.db]
``` ```
Initializes a local VM state database. If the database exists, this command throws an error. Initializes a local VM state database. If the database exists, this command throws an error.
@ -22,7 +22,7 @@ Initializes a local VM state database. If the database exists, this command thro
## mine_block ## mine_block
```bash ```bash
clarity-cli mine_block [block time] [vm-state.db] clarity mine_block [block time] [vm-state.db]
``` ```
Simulates mining a new block. Simulates mining a new block.
@ -30,7 +30,7 @@ Simulates mining a new block.
## get_block_height ## get_block_height
```bash ```bash
clarity-cli get_block_height [vm-state.db] clarity get_block_height [vm-state.db]
``` ```
Prints the simulated block height. Prints the simulated block height.
@ -38,7 +38,7 @@ Prints the simulated block height.
## check ## check
```bash ```bash
clarity-cli check [program-file.scm] (vm-state.db) clarity check [program-file.scm] (vm-state.db)
``` ```
Type checks a potential contract definition. Type checks a potential contract definition.
@ -46,7 +46,7 @@ Type checks a potential contract definition.
## launch ## launch
```bash ```bash
clarity-cli launch [contract-name] [contract-definition.scm] [vm-state.db] clarity launch [contract-name] [contract-definition.scm] [vm-state.db]
``` ```
Launches a new contract in the local VM state database. Launches a new contract in the local VM state database.
@ -54,7 +54,7 @@ Launches a new contract in the local VM state database.
## eval ## eval
```bash ```bash
clarity-cli eval [context-contract-name] (program.scm) [vm-state.db] clarity eval [context-contract-name] (program.scm) [vm-state.db]
``` ```
Evaluates, in read-only mode, a program in a given contract context. Evaluates, in read-only mode, a program in a given contract context.
@ -69,7 +69,7 @@ Type check and evaluate an expression for validity inside of a function’s sour
## repl ## repl
```bash ```bash
clarity-cli repl clarity repl
``` ```
Type check and evaluate expressions in a stdin/stdout loop. Type check and evaluate expressions in a stdin/stdout loop.
@ -77,7 +77,7 @@ Type check and evaluate expressions in a stdin/stdout loop.
## execute ## execute
```bash ```bash
clarity-cli execute [vm-state.db] [contract-name] [public-function-name] [sender-address] [args...] clarity execute [vm-state.db] [contract-name] [public-function-name] [sender-address] [args...]
``` ```
Executes a public function of a defined contract. Executes a public function of a defined contract.
@ -85,7 +85,7 @@ Executes a public function of a defined contract.
## generate_address ## generate_address
```bash ```bash
clarity-cli generate_address clarity generate_address
``` ```
Generates a random Stacks public address for testing purposes. Generates a random Stacks public address for testing purposes.
Loading…
Cancel
Save