Highlights of what’s new in 0.7.0
The 0.7.0 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 are updates to the following:
New features and capabilities
DFX
Addition of ledger subcommands
dfxnow supports a dedicateddfx ledgersubcommand. This allows you to interact with the ledger canister installed on the Internet Computer. Example commands includedfx ledger account-idwhich prints the Account Identifier associated with your selected identity,dfx ledger transferwhich allows you to transfer ICP from your ledger account to another, anddfx ledger create-canisterwhich allows you to create a canister from ICP. For more information ondfx ledgersubcommands, see dfx ledger.Addition of wallet subcommands
dfxnow supports a dedicateddfx walletsubcommand. This allows you to interact with the cycles wallet associated with your selected identity.The following are just some of the available commands:
dfx wallet balancereturns the selected identity’s cycles wallet balance.dfx wallet list-addressesdisplays the assigned controllers & custodians of the cycles wallet.You can use
dfx wallet send <destination> <amount>to send cycles to another wallet.For more information on
dfx walletsee dfx wallet.
Add an output type to the
request-statussubcommand.This change allows you to specify the format for the return result for
dfx canister request-status. Formatting options includeidl,raw, andpp.The default network for projects is now
ic.The default network is now the mainnet
icunless otherwise specified. Additionally,--network icnow points to the Internet Computer mainnet (Sodium has been deprecated.)Automatic creation of a candid UI canister
A dedicated candid UI canister is installed on a local network when using
dfx canister installordfx deploy.Compress some content types
You can now store
gzipcontent encodings of assets with media types if the encoding is smaller than the source contents. Supported file types aretext/*,*/javascript, and*/html.Add the encoding size when listing assets
Now when assets are listed, a new
lengthfield returns the size of encodings.Add new command
dfx canister infoThis allows you to retrieve certified canister information. Access to this information is limited to the controller of the canister and the SHA256 hash of its WASM module. If there is no WASM module installed, the hash will be
None.New method deletes asset canister assets that no longer exist in a project—breaking change
The
keys()method is no longer supported. Use thelist()method to delete missing project assets. For example:assert_command dfx canister call --query e2e_project_assets get '(record{key="/will-delete-this.txt";accept_encodings=vec{"identity"}})'
assert_command dfx canister call --query e2e_project_assets list '(record{})'
assert_match '"/will-delete-this.txt"'Run an emulator instead of the replica
To run a IC SDK project using an emulator instead of the replica, you can now run
dfx start --emulator.Rely on npmjs.org to get the version of agent-js to install
This decouples the version of
dfxfrom the release version of ICP JavaScript agent. Additionally, it allows for debug builds to install properly (asdfxhas a non-release version).You can now install the IC SDK SDK on for M1 Macs running Darwin.
Allow upload of assets of any size to the asset canister.
The following asset canister call methods are added: create_batch() create_chunk() commit_batch() get() ** get_chunk()
+ Reworks the asset installer in
dfxto use these methods. It can therefore upload assets that exceed the message ingress size.Add
--no-walletflag and--walletoption--no-walletallows users to bypass specifying a wallet ID.--walletallows users to specify a particular wallet to use for calls.Implement the HTTP request proposal in
dfxbootstrap webserverAdds support for http requests in the base storage canister (with a default to
/index.html).
This does not support encodings other than identity, and doesn’t return any headers.
This also upgrades tokio and reqwest in order to work correctly. There are some performance issues to note (this is slower than the ICx-http-server).
Motoko
Reformat to style guidelines.
Add type bindings
Add
Nat.Nat,Nat8.Nat8, etc. to libraries for primitive types.
Issues fixed in this release
This section covers any reported issues that have been fixed in this release.
DFX
Deleting a canister on a network removes entries for other networks
This change fixes a bug where deleting a canister on a network removed all other entries for the canister in the
canister_ids.jsonfile.Error message: already in use (os error 48) when issuing dfx start.
This fixes an error which occurred when starting a replica soon after stopping it.
The
dfx newcommand should not requirenodeThis fixes the inability to use the
dfx newcommand to create projects on machines that do not havenode.jsinstalled.Missing webpack.config plugin
This adds the missing ProvidePlugin to webpack.config for new projects.
Allow new projects assets to contain non-utf8 files
Previously assets were forced to be valid UTF-8 strings. After this change if a string cannot be converted, in-place variable replacements are ignored.
Motoko
No longer confused by distinct, but eponymous, type definitions.
Numbers of eponymous types and specializations from 1 (not 2)
Avoids long chains of type equalities by normalizing before translation