Skip to content

Commit

Permalink
Merge pull request #2836 from dfinity/jessiemongeon1-patch-1
Browse files Browse the repository at this point in the history
fix: typos, workflows, and cycles faucet workflow
  • Loading branch information
jessiemongeon1 authored Apr 29, 2024
2 parents 95b384f + a3cc71d commit 8a24f79
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
14 changes: 8 additions & 6 deletions docs/developer-docs/getting-started/cycles/cycles-faucet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,19 @@ dfx identity use MyNewIdentity

## Step 10: Now, claim your cycles.

You will need to claim your free cycles by running this command:
This workflow utilizes the **cycles ledger** feature. If you'd like to use the **cycles wallet** instead, [view the cycles wallet documentation](/docs/current/developer-docs/getting-started/cycles/cycles-wallet).

To use the cycles ledger, you will need [`dfx` version 0.19.0](/docs/current/developer-docs/getting-started/install/), and you will need to set the following environmental variable:

```
dfx cycles --network ic redeem-faucet-coupon <your-coupon-code>
DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1
```

:::info
This workflow utilizes the **cycles ledger** feature. If you'd like to use the **cycles wallet** instead, [view the cycles wallet documentation](/docs/current/developer-docs/getting-started/cycles/cycles-wallet).
You will need to claim your free cycles by running this command:

Please note that the cycles wallet will be removed from dfx in a future release.
:::
```
dfx cycles --network ic redeem-faucet-coupon <your-coupon-code>
```

![Claim Cycles](_attachments/faucet_step_5.png)

Expand Down
4 changes: 2 additions & 2 deletions docs/developer-docs/smart-contracts/call/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

## Introduction

To interact with a <Tooltip text="A smart contract on ICP."<Tooltip> >canister's</Tooltip> methods, there are two primary types of calls that can be used: update calls and query calls.
To interact with a <GlossaryTooltip>canister</GlossaryTooltip>'s methods, there are two primary types of calls that can be used: update calls and query calls.

Canisters implement methods that can be called via update or query calls. A query method can be called as both an update and a query, whereas update methods can be called only as an update.

Expand Down Expand Up @@ -83,7 +83,7 @@ def set_message(new_message: str) -> void:

Query calls, also referred to as non-replicated queries, are executed on a single node and return a synchronous response. Since they execute on a single node, they do not go through consensus and can be much faster than update calls.

:::warning
:::caution
The downside of query calls is that the response is not trusted since it's coming from a single node. An update call or a certified query (see below) should be used for security-critical calls.
:::

Expand Down
8 changes: 8 additions & 0 deletions docs/tutorials/developer-journey/level-1/1.4-using-cycles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ dfx start --clean --background
dfx identity use DevJourney
```

This workflow utilizes the **cycles ledger** feature. If you'd like to use the **cycles wallet** instead, [view the cycles wallet documentation](/docs/current/developer-docs/getting-started/cycles/cycles-wallet).

To use the cycles ledger, you will need [`dfx` version 0.19.0](/docs/current/developer-docs/getting-started/install/), and you will need to set the following environmental variable:

```
DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1
```

Then, redeem your coupon with the command:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A certificate for each piece of certified data consists of:

To certify data, a canister uses the following workflow:

- First, a canister must construct a hash tree that maps the paths of HTTPS resources to SHA0256 hashes. An example of this tree is:
- First, a canister must construct a hash tree that maps the paths of HTTPS resources to SHA-256 hashes. An example of this tree is:

```bash
*root*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ npm install

### Generating Candid declarations

For this example, you'll use an example project that takes a variable size input and generates a random maze using that size. For example, if `6` is entered, a 6x6 maze will be generated. Recall that Motoko projects have the ability to autogenerate the project's Candid files. Let's start with generating those Candid files with the command:
For this example, you'll use an example project that takes a variable size input and generates a random maze using that size. For example, if `6` is entered, a 6x6 maze will be generated. Recall that Motoko projects have the ability to autogenerate the project's Candid files. Let's start with generating those Candid files with the command:

```bash
dfx generate
Expand Down Expand Up @@ -128,9 +128,9 @@ service : {
}
```

Recall that this Candid interface specification defines a service interface with a single method. The single method, `generate` accepts a single argument of type `Nat` and returns type `Text`. This is because you will enter a number (`Nat`) to generate the maze, which will then be displayed using emoji characters displayed using type `Text`. Recall that unless a call is defined as a query, all calls are treated as an update call by default.
Recall that this Candid interface specification defines a service interface with a single method. The single method, `generate` accepts a single argument of type `Nat` and returns type `Text`. This is because you will enter a number (`Nat`) to generate the maze, which will then be displayed using emoji characters of type `Text`. Recall that unless a call is defined as a query, all calls are treated as an update call by default.

In JavaScript, type `Text` maps to type `String`. You can see a full mapping list of Candid types and their JavaScript equivalents in the [Candid types reference.](/docs/current/references/candid-ref).
In JavaScript, type `Text` maps to type `String`. You can see a full mapping list of Candid types and their JavaScript equivalents in the [Candid types reference](/docs/current/references/candid-ref).

Next, let's look at the `src/declarations/random_maze/random_maze.did.d.ts`:

Expand Down Expand Up @@ -272,4 +272,4 @@ Did you get stuck somewhere in this tutorial, or feel like you need additional h

Next, let's take a look at identities and authentication.

- [3.5 Identities and authentication](/docs/current/tutorials/developer-journey/level-3/3.5-identities-and-auth).
- [3.5 Identities and authentication](/docs/current/tutorials/developer-journey/level-3/3.5-identities-and-auth).

0 comments on commit 8a24f79

Please sign in to comment.