Highlights of what’s new in 0.6.24
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.
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 Internet Computer.
For local development,
dfxautomatically creates a wallet for you when you run
dfx canister createor
dfx deploycommands within each project.
Wallets are also created automatically if you deploy to the Internet Computer using the
icnetwork alias before the network is upgraded to require a cycle balance.
To deploy and manage applications on the main Internet Computer network, you must provide the DFINITY Foundation with a principal associated with your user identity and receive a wallet canister identifier in return.
To deploy applications on the Internet Computer network:
Download and install the DFINITY Canister 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. wre5u-xietp-k5jz4-sdaaz-g3x4l-zjzxa-lxnly-fp2mk-j3j77-25qat-pqe
dfx identity set-walletcommand 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 createand
dfx deploycommands 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 Internet Computer network locally or connected to the current
icnetwork (Sodium) for testing purposes. However, because wallets and cycle balances are not currently used for canisters you create while connected to the current
icnetwork (Sodium), the
--with-cyclesoption does not affect any canister operations.
For example, you might run the following
dfx canister createcommand to initialize
8000000000cycles 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
8000000000cycles for the
backendcanister 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 toolchaincommand to manage the version of the
dfxcommand-line interface you are using for your projects.
dfx toolchaincommand 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-walletsubcommand 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-walletfeature 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-walletsubcommand is not intended for use with the current version of Internet Computer running locally or on the remote network.
The Motoko compiler (
moc) now accepts the
-Werrorflag 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-docnow 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.
This section covers any reported issues that have been fixed in this release.