Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into make-integration2
Browse files Browse the repository at this point in the history
  • Loading branch information
vporton committed Feb 21, 2025
2 parents 38b909a + fd3fc0c commit 62ff007
Show file tree
Hide file tree
Showing 15 changed files with 204 additions and 194 deletions.
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

### feat: streamlined output during asset synchronization

### chore: hide `dfx wallet redeem-faucet-coupon`

## Dependencies

### Motoko
Expand All @@ -27,8 +29,26 @@ Updated Motoko to [0.14.1](https://github.com/dfinity/motoko/releases/tag/0.14.1
- Module hash: 865eb25df5a6d857147e078bb33c727797957247f7af2635846d65c5397b36a6
- https://github.com/dfinity/sdk/pull/4095

### Replica

Updated replica to elected commit 7147f471c7ac27f518e6c0eeb2015952b5e93e1b.
This incorporates the following executed proposals:
- [135421](https://dashboard.internetcomputer.org/proposal/135421)
- [135302](https://dashboard.internetcomputer.org/proposal/135302)
- [135301](https://dashboard.internetcomputer.org/proposal/135301)
- [135204](https://dashboard.internetcomputer.org/proposal/135204)
- [135203](https://dashboard.internetcomputer.org/proposal/135203)
- [135052](https://dashboard.internetcomputer.org/proposal/135052)
- [135051](https://dashboard.internetcomputer.org/proposal/135051)

# 0.25.0

### fix: `dfx canister install` and `dfx deploy` with `--no-asset-upgrade` no longer hang indefinitely when wasm is not up to date

### fix: `dfx` downloads `.did` files for remote canisters

### feat: streamlined output during asset synchronization

### fix: correctly detects hyphenated Rust bin crates

### fix: removes unnecessary tsc step in sveltekit build script
Expand Down Expand Up @@ -204,12 +224,13 @@ Log visibility: controllers
The asset canister now estimates the size of the data to be serialized to stable memory,
and reserves that much space for the ValueSerializer's buffer.

- Module hash: bba3181888f3c59b4a5f608aedef05be6fa37276fb7dc394cbadf9cf6e10359b
- Module hash: 865eb25df5a6d857147e078bb33c727797957247f7af2635846d65c5397b36a6
- https://github.com/dfinity/sdk/pull/4095
- https://github.com/dfinity/sdk/pull/4036

### Motoko

Updated Motoko to [0.13.6](https://github.com/dfinity/motoko/releases/tag/0.13.6)
Updated Motoko to [0.13.7](https://github.com/dfinity/motoko/releases/tag/0.13.7)

### Replica

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/cli-reference/dfx-canister.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ You can use the following options with the `dfx canister call` command.
| `--candid <file.did>` | Provide the .did file with which to decode the response. Overrides value from dfx.json for project canisters. |
| `--impersonate <principal>` | Specifies a principal on behalf of which requests to a local PocketIC instance are sent. |
| `--output <output>` | Specifies the output format to use when displaying a method’s return result. The valid values are `idl`, 'json', `pp` and `raw`. The `pp` option is equivalent to `idl`, but is pretty-printed. |
| `--query` | Sends a query request instead of an update request. For information about the difference between query and update calls, see [Canisters include both program and state](/docs/current/concepts/canisters-code#canister-state). |
| `--query` | Sends a query request instead of an update request. For information about the difference between query and update calls, see [Canisters include both program and state](https://internetcomputer.org/docs/current/concepts/canisters-code). |
| `--random <random>` | Specifies the config for generating random arguments. |
| `--type <type>` | Specifies the data format for the argument when making the call using an argument. The valid values are `idl` and `raw`. |
| `--update` | Sends an update request to a canister. This is the default if the method is not a query method. |
Expand Down
59 changes: 51 additions & 8 deletions docs/cli-reference/dfx-cycles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ dfx cycles [subcommand] [options]

The following subcommands are available:

| Command | Description |
|---------------------------------------|--------------------------------------------------------------------------------------|
| [`approve`](#dfx-cycles-approve) | Approves a principal to spend cycles on your behalf. |
| [`balance`](#dfx-cycles-balance) | Prints the account balance of the user. |
| [`convert`](#dfx-cycles-convert) | Convert some of the user's ICP balance into cycles. |
| [`top-up`](#dfx-cycles-top-up) | Deposit cycles into a canister. |
| [`transfer`](#dfx-cycles-transfer) | Send cycles to another account. |
| `help` | Displays usage information message for a specified subcommand. |
| Command | Description |
|-------------------------------------------------|--------------------------------------------------------------------------------------|
| [`approve`](#dfx-cycles-approve) | Approves a principal to spend cycles on your behalf. |
| [`balance`](#dfx-cycles-balance) | Prints the account balance of the user. |
| [`convert`](#dfx-cycles-convert) | Convert some of the user's ICP balance into cycles. |
| [`redeem-faucet-coupon`](#redeem-faucet-coupon) | Redeem a code at the cycles faucet. |
| [`top-up`](#dfx-cycles-top-up) | Deposit cycles into a canister. |
| [`transfer`](#dfx-cycles-transfer) | Send cycles to another account. |
| `help` | Displays usage information message for a specified subcommand. |

To view usage information for a specific subcommand, specify the subcommand and the `--help` flag. For example, to see usage information for `dfx cycles balance`, you can run the following command:

Expand Down Expand Up @@ -200,6 +201,48 @@ Transfer from a subaccount:
dfx cycles transfer raxcz-bidhr-evrzj-qyivt-nht5a-eltcc-24qfc-o6cvi-hfw7j-dcecz-kae 1000000000 --from-subaccount 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f --network ic
```

## dfx cycles redeem-faucet-coupon

Use the `dfx cycles redeem-faucet-coupon` command to redeem a cycles faucet coupon.
This will redeem a coupon and deposit the cycles to your cycles ledger account.

### Basic usage
```
dfx cycles redeem-faucet-coupon <your faucet coupon>
```

### Arguments

Use the following necessary argument with the `dfx cycles redeem-faucet-coupon` command.


|Argument |Description
----------|--------------
|`<your faucet coupon>` | The coupon code to redeem at the faucet.|


### Flags

You can use the following optional flags with the `dfx cycles redeem-faucet-coupon` command.


|Flag |Description|
|-----|-----------|
|`--faucet`|Alternative faucet address. If not set, this uses the DFINITY faucet.|
|`--yes`|Skips yes/no checks by answering 'yes'. Not recommended outside of CI.|

### Example

If you have a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx cycles redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon ABCDE-ABCDE-ABCDE to the cycles ledger for 10 TC (trillion cycles). New balance: 10 TC.
```

## dfx cycles top-up

Use the `dfx cycles top-up` command to send cycles from your account to a canister.
Expand Down
55 changes: 0 additions & 55 deletions docs/cli-reference/dfx-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ For reference information and examples that illustrate using `dfx wallet` comman
|[`deauthorize`](#dfx-wallet-deauthorize) | Deauthorize a cycles wallet custodian using the custodian's principal.
|`help`|Displays a usage message and the help of the given subcommand(s).
|[`name`](#dfx-wallet-name) |Returns the name of the cycles wallet if you've used the `dfx wallet set-name` command.
|[`redeem-faucet-coupon`](#redeem-faucet-coupon) | Redeem a code at the cycles faucet. |
|[`remove-controller`](#dfx-wallet-remove-controller) |Removes a specified controller from the selected identity's cycles wallet.
|[`send`](#dfx-wallet-send) |Sends a specified amount of cycles from the selected identity's cycles wallet to another canister.
|[`set-name`](#dfx-wallet-set-name) |Specify a name for your cycles wallet.
Expand Down Expand Up @@ -320,60 +319,6 @@ If you have named your cycles wallet "Terrances_wallet", then the command would
Terrances_wallet
```

## dfx wallet redeem-faucet-coupon

Use the `dfx wallet redeem-faucet-coupon` command to redeem a cycles faucet coupon.
If you have no wallet set, this will create a wallet for you.
If you have a wallet set already, this will add the coupon's cycles to your existing wallet.

### Basic usage
```
dfx wallet redeem-faucet-coupon <your faucet coupon>
```

### Arguments

Use the following necessary argument with the `dfx wallet redeem-faucet-coupon` command.


|Argument |Description
----------|--------------
|`<your faucet coupon>` | The coupon code to redeem at the faucet.|


### Flags

You can use the following optional flags with the `dfx wallet redeem-faucet-coupon` command.


|Flag |Description|
|-----|-----------|
|`--faucet`|Alternative faucet address. If not set, this uses the DFINITY faucet.|
|`--yes`|Skips yes/no checks by answering 'yes'. Not recommended outside of CI.|

### Example

If you have no wallet yet and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon ABCDE-ABCDE-ABCDE for a new wallet: rdmx6-jaaaa-aaaaa-aaadq-cai
New wallet set.
```

If you have a wallet already and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon code ABCDE-ABCDE-ABCDE for 20.000 TC (trillion cycles).
```

## dfx wallet remove-controller

Use the `dfx wallet remove-controller` command to remove a controller of your selected identity's cycles wallet.
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests-dfx/identity.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ teardown() {
# shellcheck disable=SC2154
assert_not_match '(default.*identity|identity.*default)' "$stderr"
# shellcheck disable=SC2154
assert_match "ic_api_version" "$stdout"
assert_match "root_key" "$stdout"
}

@test "dfx canister: creates the default identity on first run" {
Expand Down
14 changes: 7 additions & 7 deletions e2e/tests-dfx/ping.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ teardown() {
dfx_start
assert_command dfx ping

assert_match "\"ic_api_version\""
assert_match "\"root_key\""
}

@test "dfx ping succeeds by specific host:post" {
dfx_start
webserver_port=$(get_webserver_port)
assert_command dfx ping http://127.0.0.1:"$webserver_port"

assert_match "\"ic_api_version\""
assert_match "\"root_key\""
}

@test "dfx ping does not require dfx.json" {
Expand All @@ -43,15 +43,15 @@ teardown() {
cd "$E2E_TEMP_DIR/not-a-project"

assert_command dfx ping http://127.0.0.1:"$webserver_port"
assert_match "\"ic_api_version\""
assert_match "\"root_key\""
)
}

@test "dfx ping succeeds by network name" {
dfx_start
assert_command dfx ping local

assert_match "\"ic_api_version\""
assert_match "\"root_key\""
}

@test "dfx ping succeeds by network name if network bind address is host:port format" {
Expand All @@ -60,7 +60,7 @@ teardown() {
jq '.networks.nnn.bind="127.0.0.1:'"$webserver_port"'"' dfx.json | sponge dfx.json
assert_command dfx ping nnn

assert_match "\"ic_api_version\""
assert_match "\"root_key\""
}

@test "dfx ping succeeds by arbitrary network name to a nonstandard port" {
Expand All @@ -72,7 +72,7 @@ teardown() {
jq '.networks.arbitrary.providers=["http://127.0.0.1:12345"]' dfx.json | sponge dfx.json

assert_command dfx ping arbitrary
assert_match "\"ic_api_version\""
assert_match "\"root_key\""

assert_command_fail dfx ping
# this port won't match the ephemeral port that the replica picked
Expand All @@ -84,5 +84,5 @@ teardown() {
dfx_start
webserver_port=$(get_webserver_port)
assert_command dfx ping "http://127.0.0.1:$webserver_port"
assert_match "\"ic_api_version\""
assert_match "\"root_key\""
}
Loading

0 comments on commit 62ff007

Please sign in to comment.