Browse Source

Feedback on nav, language, and more (#577)

* language fixes/typos

* docs: update clarity references to latest from stacks-blockchain:master (#578)

* language fixes/typos

* fixing #579

* Update installation steps

* Update logs and add #573

Co-authored-by: Aaron Blankstein <aaron@blockstack.com>
deploy-contracts
Alexander Graebe 5 years ago
committed by GitHub
parent
commit
c558b6eff9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      _core/smart/neon-node.md
  2. 2
      _core/smart/principals.md
  3. 6
      _core/smart/tutorial.md
  4. 1
      _data/navigation_smart.yml

19
_core/smart/neon-node.md

@ -20,16 +20,22 @@ sudo apt-get install build-essential cmake libssl-dev pkg-config
### Download and install the `stacks-blockchain` repository
The first step is to ensure that you have Rust and the support software installed.
The first step is to ensure that you have Rust installed. If you are using macOS, Linux, or another Unix-like OS, run the following. If you are on a different OS, follow the [official Rust installation guide](https://www.rust-lang.org/tools/install).
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
If you already have the Rust toolchain installed, you might see this prompt. Select 'Proceed with Installation' to make sure you have the latest version installed.
If Rust is already installed, you might see this prompt. Select 'Proceed with Installation' to make sure you have the latest version installed.
![rustup prompt](/core/images/rust-install.png)
In case you just installed Rust, you will be prompted to run the following command to make the `cargo` command available:
```bash
source $HOME/.cargo/env
```
Next, clone this repository:
```bash
@ -57,10 +63,7 @@ stacks-node neon
The first time you run this, you'll see some logs indicating that the Rust code is being compiled. Once that's done, you should see some logs that look something like the this:
```
Starting testnet with config ./testnet/follower-conf.toml...
Transactions can be posted on the endpoint:
POST http://127.0.0.1:9001/v2/transactions
INFO [1587602447.879] [src/chainstate/stacks/index/marf.rs:732] First-ever block 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
INFO [1588108047.585] [src/chainstate/stacks/index/marf.rs:732] First-ever block 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
```
Awesome! Your node is now connected to the Neon network. Your node will receive new blocks when they are produced, and you can use your [node's RPC API](/core/smart/rpc-api) to send transactions, fetch information for contracts and accounts, and more.
@ -72,13 +75,13 @@ The steps above are great for trying to run a node temporarily. If you want to h
```bash
cd testnet
cargo build --release --bin stacks-node
cd ..
```
The above code will compile an optimized binary. To use it, run:
```bash
./target/release/stacks-node ./testnet/conf/neon-follower-conf.toml
cd ..
./target/release/stacks-node start --config=./testnet/conf/neon-follower-conf.toml
```
### Enable debug logging

2
_core/smart/principals.md

@ -3,7 +3,7 @@ layout: smart
description: "Clarity: Understanding Principals"
permalink: /:collection/:path.html
---
# Principals
# Understanding Principals
{:.no_toc}
_Principals_ are a Clarity native type that represents an entity that can have a token balance. This section discusses principals and how they are used in the Clarity.

6
_core/smart/tutorial.md

@ -40,14 +40,14 @@ In this step, you initialize a starter project for Clarity development:
npm init clarity-starter
```
2. After the starter project was loaded up, have to select a template and a name for your local folder. Feel free to hit ENTER both times to accept the default suggestion.
2. After the starter project was loaded up, you have to select a template and a name for your local project folder. Feel free to hit ENTER both times to accept the default suggestion.
```bash
? Template - one of [hello-world, counter]: (hello-world)
? Project name: (clarity-hello-world)
```
Finally, the project dependencies are installed and your project is ready for development.
Finally, after the project dependencies have been installed, your project is ready for development.
3. The project is located in a new folder, `clarity-hello-world` by default. Jump into the folder and have a look at the file structure:
@ -192,7 +192,7 @@ const receipt = await helloWorldClient.submitQuery(query);
const result = Result.unwrapString(receipt);
```
As you see, smart contract calls are realized through query definitions. The `createQuery` function defines the name and arguments passed to the smart contract function. With `submitQuery`, the function executed and the response is wrapped into a `Result` object. To obtain the readable result, we use the `unwrapString` function, which should return `hello world`.
As you see, smart contract calls are realized through query definitions. The `createQuery` function defines the name and arguments passed to the smart contract function. With `submitQuery`, the function is executed and the response is wrapped into a `Result` object. To obtain the readable result, we use the `unwrapString` function, which should return `hello world`.
Now, review the last test `should echo number` on your own and try to understand how arguments are passed to the `echo-number` smart contract.

1
_data/navigation_smart.yml

@ -10,7 +10,6 @@
- title: Guides
docs:
- core/smart/principals
- core/smart/functions
- core/smart/neon-node
- core/smart/cli-wallet-quickstart

Loading…
Cancel
Save