You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: motoko/composite_query/README.md
+9-61Lines changed: 9 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -27,76 +27,24 @@ Each new `Bucket` must be provisioned with enough cycles to pay for its installa
27
27
28
28
`Map`'s `test` method simply `put`s 16 consecutive entries into `Map`. These entries are distributed evenly amongst the buckets making up the key-value store. Adding the first entry to a bucket takes longer than adding a subsequent one, since the bucket needs to be installed on first use.
29
29
30
-
## Prerequisites
30
+
## Deploying from ICP Ninja
31
31
32
-
-[x] Install the [IC
33
-
SDK](https://internetcomputer.org/docs/current/developer-docs/getting-started/install). For local testing, `dfx >= 0.22.0` is required.
34
-
-[x] Clone the example dapp project: `git clone https://github.com/dfinity/examples`
### 1. [Download and install the IC SDK.](https://internetcomputer.org/docs/building-apps/getting-started/install)
39
37
40
-
Navigate into the folder containing the project's files and start a local instance of the Internet Computer with the commands:
38
+
### 2. Download your project from ICP Ninja using the 'Download files' button on the upper left corner, or [clone the GitHub examples repository.](https://github.com/dfinity/examples/)
41
39
40
+
### 3. Navigate into the project's directory.
42
41
43
-
```bash
44
-
cd examples/motoko/composite_query
45
-
dfx start --background
46
-
```
47
-
48
-
## Step 2: Deploy the `Map` canister
49
-
50
-
```bash
51
-
dfx deploy Map --no-wallet
52
-
```
53
-
54
-
## Step 3: Invoke the `test` method of canister `Map` to add some entries
55
-
56
-
```bash
57
-
dfx canister call Map test'()'
58
-
```
42
+
### 4. Deploy the project to your local environment:
59
43
60
-
## Step 4: Observe the following result
61
-
62
-
```bash
63
-
debug.print: putting: (0, "0")
64
-
debug.print: putting: (1, "1")
65
-
debug.print: putting: (2, "2")
66
-
debug.print: putting: (3, "3")
67
-
debug.print: putting: (4, "4")
68
-
debug.print: putting: (5, "5")
69
-
debug.print: putting: (6, "6")
70
-
debug.print: putting: (7, "7")
71
-
debug.print: putting: (8, "8")
72
-
debug.print: putting: (9, "9")
73
-
debug.print: putting: (10, "10")
74
-
debug.print: putting: (11, "11")
75
-
debug.print: putting: (12, "12")
76
-
debug.print: putting: (13, "13")
77
-
debug.print: putting: (14, "14")
78
-
debug.print: putting: (15, "15")
79
-
()
80
44
```
81
-
82
-
## Step 5: Invoke the `get` composite query method of canister `Main`
If you base your application on this example, we recommend you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/current/references/security/) for developing on ICP. This example may not implement all the best practices.
50
+
If you base your application on this example, it is recommended that you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/building-apps/security/overview) for developing on ICP. This example may not implement all the best practices.
0 commit comments