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
+15-66Lines changed: 15 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,69 +16,18 @@ 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.
20
-
21
-
## Prerequisites
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`
26
-
27
-
Begin by opening a terminal window.
28
-
29
-
## Step 1: Setup the project environment
30
-
31
-
Navigate into the folder containing the project's files and start a local instance of the Internet Computer with the commands:
32
-
33
-
34
-
```bash
35
-
cd examples/motoko/classes
36
-
dfx start --background
37
-
```
38
-
39
-
## Step 2: Deploy the canisters `Map` and `Test`
40
-
41
-
```bash
42
-
dfx deploy Map --no-wallet
43
-
dfx deploy Test --no-wallet
44
-
```
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
-
()
80
-
```
81
-
82
-
## Security considerations and best practices
83
-
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.
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.
### 1. [Download and install the IC SDK.](https://internetcomputer.org/docs/building-apps/getting-started/install)
28
+
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/)
30
+
31
+
### 3. Navigate into the project's directory.
32
+
33
+
### 4. Run `dfx start --background --clean && dfx deploy` to deploy the project to your local environment.
0 commit comments