Skip to content

Commit

Permalink
Merge branch 'master' into jack/crp-2588
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk authored Jan 10, 2025
2 parents fd7b502 + 54b9830 commit 7e5d2aa
Show file tree
Hide file tree
Showing 22 changed files with 284 additions and 961 deletions.
53 changes: 53 additions & 0 deletions blog/news-and-updates/2025-01-08-update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Developer weekly update January 8, 2025
description: To kick off the year, we have some exiting updates regarding the Motoko base library and ICP Ninja, plus a community conversation regarding ICRC-99 and ckNFTs.
tags: [Devs]
image: /img/blog/dev-update-blog-jan-9.jpg
---

# Developer weekly update January 8, 2025

![January 8, 2025](../../static/img/blog/dev-update-blog-jan-8.jpg)

Hello developers, and happy New Year! To kick off the year, we have some exciting updates regarding the Motoko base library and ICP Ninja, plus a community conversation regarding ICRC-99 and ckNFTs. Let's get started!

## Motoko base library changes

The Motoko base library is undergoing some major changes to improve the readability of Motoko code and improve consistency. The first draft of the new API is available for the community to review and provide their input on, and it is highly recommended that you weigh in on the conversation now.

Check out the [new Motoko base library repo](https://github.com/dfinity/new-motoko-base) and view the [discussion tab](https://github.com/dfinity/new-motoko-base/discussions) to comment on proposals or submit your own improvements to the library.

## ICP Ninja updates

[ICP Ninja](https://icp.ninja/) has some exciting new features to enhance the web-based IDE. Some of these updates include:

- Ask AI: Chat with the ICP AI assistant directly in ICP Ninja to get info about ICP concepts, ask questions about your code, or provide the AI code to debug. Select from a variety of follow-up questions to continue the learning experience and continue to develop your skills!

- New IDE design that includes support for multiple tabs, a preview of the project's frontend, and a preview of the interfaces exposed by the backend canister.

- Syntax error highlighting for Motoko.

- Package loading with linting.

- Updates to the Hello, world! example to include orthogonal persistence.

You can learn more about these updates [on the forum](https://forum.dfinity.org/t/icp-ninja-christmas-market-release/39118) or try ICP Ninja out for yourself at [https://icp.ninja](https://icp.ninja)

## Community discussion: ICRC-99 and ckNFTs

A community conversation has been initiated on the forum regarding ckNFTs and the ICRC-99 standard. ckNFTs are a type of NFT that has been ported from an EVM chain onto ICP. In the code's current state, each source smart contract from the EVM chain would receive its own ckNFT canister that uses the ICRC-7, ICRC-37, and ICRC-3 standards. Once the NFT is on ICP, it can be cast to another EVM chain via the ICRC-99 standard, which sets parameters for casting to other networks.

One example of how this might be used is:

- An NFT is minted on Ethereum.
- The NFT is ported to ICP and is held in its ckNFT canister.
- The owner sells it on an ICRC-7 marketplace on ICP.
- The buyer ports the NFT to Base, and then they can list it on another marketplace such as OpenSea.

The developers working on this concept, ICDevs.org, have opened up the conversation to ask for community ideas, feedback, and creative solutions to some of the issues they're currently experiencing.

[Join the discussion](https://forum.dfinity.org/t/discussion-icrc-99-and-cknfts/39480).

That'll wrap up this week. Tune back in next week for more developer updates!

-DFINITY
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ meaningless when the neuron is dissolving and has age zero. The canonical value

* `visibility : opt int32;`: The visibility defines how much information about this neuron is publicly accessible, i.e., visible to those who are neither the controller nor
have hot-key privileges to this neuron. Visibility can be public, private, or undefined.
For public neurons, the full neuron is accessible to everyone, for private neurons only a part of the `NeuronInfo` (see below) is visible, excluding the recent_ballots`
For public neurons, the full neuron is accessible to everyone, for private neurons only a part of the `NeuronInfo` (see below) is visible, excluding the `recent_ballots`
and `joined_community_fund_timestamp_seconds`.

* `known_neuron_data : opt KnownNeuronData; message KnownNeuronData { string name = 1; optional string description = 2; }`: A neuron can be registered as a **known neuron** via proposal so that it can be followed by others.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Tutorial"]} />



By default, all canisters on the Internet Computer are accessible through the
domain `icp0.io` and their canister ID. In addition to that default domain, one
can also make a canister accessible under a custom domain using one of the
Expand Down Expand Up @@ -119,7 +117,7 @@ by some instructions on [troubleshooting](#troubleshooting).
Configure the `.well-known` directory to be included by writing the following
configuration into the `.ic-assets.json`-file:

```
```json
[
{
"match": ".well-known",
Expand All @@ -134,11 +132,11 @@ by some instructions on [troubleshooting](#troubleshooting).

```sh
curl -sL -X POST \
    -H 'Content-Type: application/json' \
    https://icp0.io/registrations \
    --data @- <<EOF
-H 'Content-Type: application/json' \
https://icp0.io/registrations \
--data @- <<EOF
{
    "name": "CUSTOM_DOMAIN"
"name": "CUSTOM_DOMAIN"
}
EOF
```
Expand Down Expand Up @@ -180,7 +178,7 @@ by some instructions on [troubleshooting](#troubleshooting).
```sh
curl -sL -X GET \
    https://icp0.io/registrations/REQUEST_ID
https://icp0.io/registrations/REQUEST_ID
```
The status will be one of the following:
Expand Down Expand Up @@ -246,11 +244,11 @@ For example:
```sh
curl -sL -X POST \
    -H 'Content-Type: application/json' \
    https://icp0.io/registrations \
    --data @- <<EOF
-H 'Content-Type: application/json' \
https://icp0.io/registrations \
--data @- <<EOF
{
    "name": "foo.bar.com"
"name": "foo.bar.com"
}
EOF
```
Expand Down Expand Up @@ -303,7 +301,7 @@ first need to update the DNS record of your domain, then notify a boundary node:
```sh
curl -sL -X PUT \
    https://icp0.io/registrations/REQUEST_ID
https://icp0.io/registrations/REQUEST_ID
```
:::info
Expand All @@ -324,7 +322,7 @@ and notify a boundary node:
```sh
curl -sL -X DELETE \
    https://icp0.io/registrations/REQUEST_ID
https://icp0.io/registrations/REQUEST_ID
```
:::info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
? Select a frontend framework: ›
Expand All @@ -117,7 +117,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
Vue
Vanilla JS
No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
? Select a frontend framework: ›
Expand All @@ -65,7 +65,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
Vue
Vanilla JS
No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down Expand Up @@ -152,14 +152,7 @@ Next, you'll set the `init` arguments for the dependency canisters using the `df
dfx deps init
```

This will show that our II canister requires an `init` argument:

```bash
WARN: The following canister(s) require an init argument. Please run `dfx deps init <NAME/PRINCIPAL>` to set them individually:
rdmx6-jaaaa-aaaaa-aaadq-cai (internet_identity)
```

This output shows you that the Internet Identity canister requires an `init` argument, but it doesn't give you any additional information. For more information, run the command `dfx deps init rdmx6-jaaaa-aaaaa-aaadq-cai`, which will provide an error message that shows you more details:
The Internet Identity canister requires an `init` argument. For more information, run the command `dfx deps init rdmx6-jaaaa-aaaaa-aaadq-cai`, which will provide an error message:

```bash
Error: Canister rdmx6-jaaaa-aaaaa-aaadq-cai (internet_identity) requires an init argument. The following info might be helpful:
Expand Down
12 changes: 9 additions & 3 deletions docs/tutorials/developer-journey/level-2/2.4-intro-candid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
? Select a frontend framework: ›
Expand All @@ -243,7 +243,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
Vue
Vanilla JS
No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down Expand Up @@ -278,7 +278,13 @@ Save this file. Then, compile and deploy the project with the command:
dfx deploy
```

Recall that the Motoko compiler will automatically generate the Candid service description file based off of this code. This Candid file can be found at `src/declarations/candid_example_backend/candid_example_backend.did` and will contain the following:
To generate the Candid service description file based off of this code, run the command:

```
dfx generate
```

The generated Candid file can be found at `src/declarations/candid_example_backend/candid_example_backend.did` and will contain the following:

```candid title="src/declarations/candid_example_backend/candid_example_backend.did"
service : {
Expand Down
8 changes: 2 additions & 6 deletions docs/tutorials/developer-journey/level-2/2.5-unit-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
? Select a frontend framework: ›
Expand All @@ -185,7 +185,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
Vue
Vanilla JS
No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down Expand Up @@ -366,10 +366,6 @@ test("Should contain a candid interface", async () => {
});
```
:::info
Need the full `src/tests/e2e_tests_backend.test.ts` file? [Check out the repo containing the full project for this tutorial](https://github.com/krpeacock/sample-canister-e2e).
:::
This test simply checks that our canister's metadata contains a Candid interface.
Then, run the test again with the `npm test` command. This time, the output should reflect 2 successful tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
? Select a frontend framework: ›
Expand All @@ -90,7 +90,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
Vue
Vanilla JS
No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down
Loading

0 comments on commit 7e5d2aa

Please sign in to comment.