Browse Source

fix: change page name

build/update-latest-deps
Thomas Osmonson 4 years ago
committed by Alexander Graebe
parent
commit
4cff015930
  1. 9
      next.config.js
  2. 2
      src/common/navigation.yaml
  3. 2
      src/components/mdx/components/code.tsx
  4. 2
      src/pages/ecosystem/contributing.md
  5. 0
      src/pages/references/language-clarity.md
  6. 8
      src/pages/smart-contracts/counter-tutorial.md
  7. 6
      src/pages/smart-contracts/hello-world-tutorial.md
  8. 2
      src/pages/smart-contracts/overview.md
  9. 2
      src/pages/smart-contracts/signing-transactions.md
  10. 4
      yarn.lock

9
next.config.js

@ -270,12 +270,17 @@ async function redirects() {
{ source: '/core/cmdLineRef.html', destination: '/references/blockstack-cli', permanent: true },
{
source: '/core/smart/clarityref',
destination: '/references/clarity-language',
destination: '/references/language-clarity',
permanent: true,
},
{
source: '/core/smart/clarityRef.html',
destination: '/references/clarity-language',
destination: '/references/language-clarity',
permanent: true,
},
{
source: '/references/clarity-language',
destination: '/references/language-clarity',
permanent: true,
},
{

2
src/common/navigation.yaml

@ -96,7 +96,7 @@ sections:
usePageTitles: true
pages:
- path: /blockstack-cli
- path: /clarity-language
- path: /language-clarity
- path: /stacks-blockchain
- path: /stacks-rpc-api
- external:

2
src/components/mdx/components/code.tsx

@ -141,7 +141,7 @@ export const Code: React.FC<
}
: {},
},
})(theme)
})(theme) as any
}
{...bind}
>

2
src/pages/ecosystem/contributing.md

@ -153,7 +153,7 @@ The script will process that file and pull out the title from the frontmatter of
### Non-standard pages
There are a few pages within these docs that are non-standard markdown pages. This means they are using some kind of external data as their source,
such as the [Clarity Reference page](/references/clarity-language), or the [Blockstack CLI page](/references/blockstack-cli). These pages are using a function of Next.js called
such as the [Clarity Reference page](/references/language-clarity), or the [Blockstack CLI page](/references/blockstack-cli). These pages are using a function of Next.js called
[`getStaticProps`](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) which allows us to
fetch external data at runtime and use it in some way within our pages.

0
src/pages/references/clarity-language.md → src/pages/references/language-clarity.md

8
src/pages/smart-contracts/counter-tutorial.md

@ -132,14 +132,14 @@ Let's get familiar with the tests to understand what the new smart contract shou
(ok (var-get counter)))
```
The [`define-data-var`](/references/clarity-language#define-data-var) statement initializes a
The [`define-data-var`](/references/language-clarity#define-data-var) statement initializes a
new integer variable named `counter` and sets the value to `0`. It is important to note that all definition statements
in Clarity need to be at the top of the file.
The `counter` variable is stored in the data space associated with the smart contract. The variable is persisted and
acts as the global shared state.
To provide access to the `counter` variable from outside of the current smart contract, we need to declare a public function to get it. The last lines of the code add a public `get-counter` function. The [`var-get`](/references/clarity-language#var-get) statement looks for a variable in the contract's data space and returns it.
To provide access to the `counter` variable from outside of the current smart contract, we need to declare a public function to get it. The last lines of the code add a public `get-counter` function. The [`var-get`](/references/language-clarity#var-get) statement looks for a variable in the contract's data space and returns it.
With that, you are ready to rerun the tests!
@ -163,9 +163,9 @@ Let's get familiar with the tests to understand what the new smart contract shou
(ok (var-get counter))))
```
First, the [`begin`](/references/clarity-language#begin) statement evaluates multiple expressions and returns the value of the last one. In this case, it is used to set a new value and return the new value.
First, the [`begin`](/references/language-clarity#begin) statement evaluates multiple expressions and returns the value of the last one. In this case, it is used to set a new value and return the new value.
Next, a [`var-set`](/references/clarity-language#var-set) is used to set a new value for the `counter` variable. The new value is constructed using the [`+`](/references/clarity-language#-add) (add) statement. This statement takes a number of integers and returns the result. Along with add, Clarity provides statements to subtract, multiply, and divide integers. Find more details in the [Clarity language reference](/references/clarity-language).
Next, a [`var-set`](/references/language-clarity#var-set) is used to set a new value for the `counter` variable. The new value is constructed using the [`+`](/references/language-clarity#-add) (add) statement. This statement takes a number of integers and returns the result. Along with add, Clarity provides statements to subtract, multiply, and divide integers. Find more details in the [Clarity language reference](/references/language-clarity).
5. Next, implement a new public function `decrement` to subtract `1` from the `counter` variable. You should have all knowledge needed to succeed at this!

6
src/pages/smart-contracts/hello-world-tutorial.md

@ -83,9 +83,9 @@ On the first line, a new public function `say-hi` is declared. Public functions
-> To create private functions, you would use the `define-private` keyword. Private functions can only be executed by the current smart contract. Only public functions can be called from other contracts.
The function doesn't take any parameters and simply returns "hello world" using the [`ok`](/references/clarity-language#ok) response constructor.
The function doesn't take any parameters and simply returns "hello world" using the [`ok`](/references/language-clarity#ok) response constructor.
The second function, `echo-number`, is a [read-only function](/references/clarity-language#define-read-only). Read-only functions are also public, but as the name implies, they can not change and variables or datamaps. `echo-number` takes an input parameter of the type `int`. Along with integer, Clarity supports the following [types](/references/clarity-language#clarity-type-system):
The second function, `echo-number`, is a [read-only function](/references/language-clarity#define-read-only). Read-only functions are also public, but as the name implies, they can not change and variables or datamaps. `echo-number` takes an input parameter of the type `int`. Along with integer, Clarity supports the following [types](/references/language-clarity#clarity-type-system):
- `uint`: 16-byte unsigned integer
- `principal`: spending entity, roughly equivalent to a Stacks address
@ -93,7 +93,7 @@ The second function, `echo-number`, is a [read-only function](/references/clarit
- `buffer`: fixed-length byte buffers
- `tuple`: named fields in keys and values
`echo-number` uses an [`ok`](/references/clarity-language#ok) response to return the value passed to the function.
`echo-number` uses an [`ok`](/references/language-clarity#ok) response to return the value passed to the function.
## Step 3: Access the Explorer Sandbox

2
src/pages/smart-contracts/overview.md

@ -66,4 +66,4 @@ then learn how to construct [a counter](/smart-contracts/counter-tutorial), and
[test your smart contracts](/smart-contracts/testing-contracts) using Mocha.
Once you've got the hang of the general workflow, environment, and language syntax, you should be ready to start writing
contracts, referring to the [Clarity language reference](/references/clarity-language) as you go.
contracts, referring to the [Clarity language reference](/references/language-clarity) as you go.

2
src/pages/smart-contracts/signing-transactions.md

@ -98,7 +98,7 @@ interface ContractCallOptions {
| --------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress | string | false | The Stacks address that published this contract |
| contractName | string | false | The name that was used when publishing this contract |
| functionName | string | false | The name of the function you're calling. This needs to be a [public function](/references/clarity-language#define-public). |
| functionName | string | false | The name of the function you're calling. This needs to be a [public function](/references/language-clarity#define-public). |
| functionArgs | array | false | The arguments you're calling the function with. You'll need to provide the Clarity type with each argument. See the below section for details. Defaults to `[]`. |
| appDetails | object | false | A dictionary that includes `name` and `icon` |
| finished | function | false | A callback that is fired when the transaction is signed and broadcasted. Your callback will receive an object back with a `txId` and a `txRaw`, both of which are strings. |

4
yarn.lock

@ -9223,9 +9223,9 @@ vm-browserify@1.1.2, vm-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
"vscode-textmate@git+https://github.com/octref/vscode-textmate.git":
"vscode-textmate@https://github.com/octref/vscode-textmate":
version "4.0.1"
resolved "git+https://github.com/octref/vscode-textmate.git#e65aabe2227febda7beaad31dd0fca1228c5ddf3"
resolved "https://github.com/octref/vscode-textmate#e65aabe2227febda7beaad31dd0fca1228c5ddf3"
w3c-hr-time@^1.0.2:
version "1.0.2"

Loading…
Cancel
Save