The 0.6.24 release primarily consists of changes to support new features that are not yet complete, including fixes and updates to DFX commands, Motoko, the Motoko base library, and Candid.
New features and capabilities
The most significant new features and capabilities include updates in the following functional areas:
With this release, you must have a wallet canister with cycles to deploy or manage applications on the IC.
For local development,
+dfx+automatically creates a wallet for you when you run
+dfx canister create+or
+dfx deploy+commands within each project.
Wallets are also created automatically if you deploy to the IC using the
+ic+network alias before the network is upgraded to require a cycle balance.
To deploy applications on the IC network:
Download and install the SDK.
dfx identity get-principalcommand to create your default identity and principal:
dfx identity get-principal
Running the command displays output similar to the following:
Creating the "default" identity.
- generating new key at /Users/pubs/.config/dfx/identity/default/identity.pem
Created the "default" identity.
+dfx identity set-wallet+command to associate your wallet canister identifier with your default identity.
dfx identity set-wallet <wallet-canister-identifier>
Open the wallet application in a web browser by navigating to the canister with a URL similar to the following:
A new command-line option enables you to specify the number of initial cycles to transfer to a newly-created canister.
+dfx canister create+and
+dfx deploy+commands now support a new
+--with-cycles <number-of-cycles>+option. This option allows you to specify the initial cycle balance of a canister created by your wallet.
You can use this option when running the IC network locally or connected to the current
+ic+network (Sodium) for testing purposes. However, because wallets and cycle balances are not currently used for canisters you create while connected to the current
+ic+network (Sodium), the
+--with-cycles+option does not affect any canister operations.
For example, you might run the following
+dfx canister create+command to initialize
+8000000000+cycles for all of the canisters in a project:
dfx canister create --with-cycles 8000000000 --all
+dfx deploy+, you might run the following command to initialize
+8000000000+cycles for the
+backend+canister in a project:
dfx deploy --with-cycles 8000000000 backend
You must have a wallet canister with a cycles balance on the network where you want to create or deploy additional canisters.
You can now use the new
+dfx toolchain+command to manage the version of the
+dfx+command-line interface you are using for your projects.
+dfx toolchain+command enables you to install, uninstall, and set the default version of
dfxthat you want to use. You can specify the version by the complete version number, the major and minor version number, or a tag name. For example:
dfx toolchain install 0.6.24 # complete version
dfx toolchain install 0.6 # major minor version
dfx toolchain install latest # tag name
+deploy-wallet+subcommand enables you to specify the canister identifier for your cycles wallet WebAssembly module (WASM).
For example, if you have an account with a third party exchange provider and receive a wallet canister identifier, you can run a command similar to the following to deploy the wallet and uses its cycles for development:
dfx identity deploy-wallet <canister-identifier>
+deploy-wallet+feature is intended for a future use case. The command is only applicable if you received the wallet canister identifier as part of a transfer operation that converted ICP tokens to cycles. In addition, the
+deploy-wallet+subcommand is not intended for use with the current version of IC running locally or on the remote network.
Candid now supports additional native Rust types and Typescript.
For additional information, see the Candid changelog.
The Motoko compiler (
+moc+) now accepts the
+-Werror+flag to turn warnings into errors.
The language server now returns documentation comments alongside completions and hover notifications.
Motoko supports wrapping arithmetic and bit-wise operations on
The conventional arithmetic operators on
IntNtrap on overflow. If wrap-around semantics is desired, the operators
**%can be used. The corresponding assignment operators (
+%=etc.) are also available.
Likewise, the bit fiddling operators (
<>>etc.) are now also available on
IntN. The right shift operator (
>>) is an unsigned right shift on
NatNand a signed right shift on
+>>operator is not available on these types.
The motivation for this change is to eventually deprecate and remove the
WordNtypes. Therefore, the wrapping arithmetic operations on
WordNare deprecated and their use will print a warning. For information about replacing Word types, see Word types.
Blob, an iterator over the elements of the blob
x.vals()is introduced. It works like
x.bytes(), but returns the elements as type
The base library documentation tool
+mo-doc+now generates cross-references for types in signatures. With this enhancement, when you view a signature like
fromIter : I.Iter<Nat> -> List.List<Nat>, you can click
List.Listto navigate to the appropriate definition.
Improvements to the type checker and compiler provide better handling for object literals.
Issues fixed in this release
This section covers any reported issues that have been fixed in this release.
Known issues and limitations
This section covers any known issues or limitations that might affect how you work with the SDK in specific environments or scenarios.