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/classes/README.md
+11-53Lines changed: 11 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -16,69 +16,27 @@ Each new Bucket must be provisioned with enough cycles to pay for its installati
16
16
17
17
The `Test.mo` actor imports the (installed) `Map` canister, using `Maps` Candid interface to determine its Motoko type. `Test`'s run method simply puts 24 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 take longer than adding a subsequent one, since the bucket needs to be installed on first use.
18
18
19
-
This is a Motoko example that does not currently have a Rust variant.
19
+
This application's logic is written in [Motoko](https://internetcomputer.org/docs/motoko/home), a programming language designed specifically for developing canisters on ICP.
20
20
21
-
## Prerequisites
21
+
## Deploying from ICP Ninja
22
22
23
-
-[x] Install the [IC
24
-
SDK](https://internetcomputer.org/docs/current/developer-docs/getting-started/install). For local testing, `dfx >= 0.22.0` is required.
25
-
-[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)
30
28
31
-
Navigate into the folder containing the project's files and start a local instance of the Internet Computer with the commands:
29
+
### 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/)
32
30
31
+
### 3. Navigate into the project's directory.
33
32
34
-
```bash
35
-
cd examples/motoko/classes
36
-
dfx start --background
37
-
```
38
-
39
-
## Step 2: Deploy the canisters `Map` and `Test`
33
+
### 4. Deploy the project to your local environment:
40
34
41
-
```bash
42
-
dfx deploy Map --no-wallet
43
-
dfx deploy Test --no-wallet
44
35
```
45
-
46
-
## Step 3: Invoke the run method of canister `Test`
47
-
48
-
```bash
49
-
dfx canister call Test run '()'
50
-
```
51
-
52
-
The output should resemble the following:
53
-
54
-
```bash
55
-
debug.print: putting: (0, "0")
56
-
debug.print: putting: (1, "1")
57
-
debug.print: putting: (2, "2")
58
-
debug.print: putting: (3, "3")
59
-
debug.print: putting: (4, "4")
60
-
debug.print: putting: (5, "5")
61
-
debug.print: putting: (6, "6")
62
-
debug.print: putting: (7, "7")
63
-
debug.print: putting: (8, "8")
64
-
debug.print: putting: (9, "9")
65
-
debug.print: putting: (10, "10")
66
-
debug.print: putting: (11, "11")
67
-
debug.print: putting: (12, "12")
68
-
debug.print: putting: (13, "13")
69
-
debug.print: putting: (14, "14")
70
-
debug.print: putting: (15, "15")
71
-
debug.print: putting: (16, "16")
72
-
debug.print: putting: (17, "17")
73
-
debug.print: putting: (18, "18")
74
-
debug.print: putting: (19, "19")
75
-
debug.print: putting: (20, "20")
76
-
debug.print: putting: (21, "21")
77
-
debug.print: putting: (22, "22")
78
-
debug.print: putting: (23, "23")
79
-
()
36
+
dfx start --background --clean && dfx deploy
80
37
```
81
38
82
39
## Security considerations and best practices
83
40
84
-
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 the Internet Computer. This example may not implement all the best practices.
41
+
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