Skip to main content
Back

Developer weekly update June 5, 2024

June 5 2024

Hello developers, and welcome to this week's developer weekly update! In this week's update, we have a new version of dfx, a new example of Chain Fusion technology at work, and a new exciting feature from the community project, CycleOps. Let's get started!

dfx v0.20.1 has been released!

A new version of dfx has been released! This release includes new features such as:

  • Reformatted error output. dfx now uses the 'Caused by:' prefix for errors, reporting the error with its cause rather than embedding the cause within the error's text. For example, before v0.20.1, error messages looked like this:
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed to build all canisters.
Failed while trying to build all canisters.
The build step failed for canister 'bw4dl-smaaa-aaaaa-qaacq-cai' (wasminst_backend) with an embedded error: Failed to build Motoko canister 'wasminst_backend'.: Failed to compile Motoko.: Failed to run 'moc'.: The command '"/Users/ericswanson/.cache/dfinity/versions/0.19.0/moc" ... params ... failed with exit status 'exit status: 1'.
Stdout:

Stderr:
/Users/ericswanson/w/wasminst/src/wasminst_backend/main2.mo: No such file or directory

Now, error messages will look like this:

Error: Failed while trying to deploy canisters.
Caused by: Failed to build all canisters.
Caused by: Failed while trying to build all canisters.
Caused by: The build step failed for canister 'bw4dl-smaaa-aaaaa-qaacq-cai' (wasminst_backend)
Caused by: Failed to build Motoko canister 'wasminst_backend'.
Caused by: Failed to compile Motoko.
Caused by: Failed to run 'moc'.
Caused by: The command '"/Users/ericswanson/.cache/dfinity/versions/0.20.0/moc" ... params ... failed with exit status 'exit status: 1'.
Stdout:

Stderr:
/Users/ericswanson/w/wasminst/src/wasminst_backend/main2.mo: No such file or directory
  • New support for the wasm_memory_limit canister setting, which allows developers to limit a canister's heap memory for most calls. This setting does not affect queries, and can be set in the dfx canister create or dfx canister update-settings commands using the --wasm-memory-limit flag.

  • Support for a new field in dfx.json, init_arg_file, which enables a new workflow for specifying a canister's initialization arguments.

You can read the full release notes or report any bugs on the developer forum.

Generate a Sui address for a canister

ICP's Chain Fusion technology allows for canisters deployed on ICP to communicate with any chain with a direct ICP integration, or any chain that supports ECDSA signatures. Currently, the EVM RPC canister can be used to communicate with Ethereum and EVM-compatible chains, but what about a non-EVM chain that supports ECDSA?

DFINITY's developer relations engineer Jennifer Tran recently participated in the Consensus 2024 Hackathon where she showcased the power of Chain Fusion for non-EVM chains. In her project, she showcased how an ICP canister can generate an address for the Sui network, then sign a Sui transaction.

Want to learn more? Check out the canister example to start developing with Sui on ICP!

Community spotlight: CycleOps now supports SNS visibility!

The community project CycleOps has an exciting new feature! CycleOps is a tool that can be used to maintain a canister's cycles by setting rules such as automatically topping up a canister whenever its cycles fall below a certain limit.

CyclesOps now features an SNS CyclesOps dashboard, which aggregates the amount of cycles burned by each SNS. For example, here is the dashboard for the SNS OpenChat:

OpenChat CyclesOps

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

-DFINITY