Skip to content

feat: make dfx ledger work with local ledger installations #1987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 8, 2022

Conversation

roman-kashitsyn
Copy link
Contributor

This change enables dfx to work with local ledger installations.

dfx ledger balance and dfx ledger transfer now support
--ledger-canister-id parameter.

Examples:

$ dfx ledger \
  --network local \
  balance \
  --ledger-canister-id  rrkah-fqaaa-aaaaa-aaaaq-cai
1000.00000000 ICP

$ dfx ledger \
  --network local \
  transfer --amount 0.1 --memo 0 \
  --ledger-canister-id  rrkah-fqaaa-aaaaa-aaaaq-cai 8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8
Transfer sent at block height: 1

This change also improves error messages in dfx ledger transfer.
The messages provide more context now.

This change enables dfx to work with local ledger installations.

`dfx ledger balance` and `dfx ledger transfer` now support
`--ledger-canister-id` parameter.

Examples:

```sh
$ dfx ledger \
  --network local \
  balance \
  --ledger-canister-id  rrkah-fqaaa-aaaaa-aaaaq-cai
1000.00000000 ICP

$ dfx ledger \
  --network local \
  transfer --amount 0.1 --memo 0 \
  --ledger-canister-id  rrkah-fqaaa-aaaaa-aaaaq-cai 8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8
Transfer sent at block height: 1
```

This change also improves error messages in `dfx ledger transfer`.
The messages provide more context now.
@roman-kashitsyn roman-kashitsyn requested a review from a team as a code owner January 17, 2022 16:32
Copy link
Contributor

@ericswanson-dfinity ericswanson-dfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please add a note to the changelog about this new parameter, along with something about where to find the ledger canister / how to install it?

@mergify mergify bot merged commit 05e603b into master Feb 8, 2022
@mergify mergify bot deleted the roman-local-ledger-transfer branch February 8, 2022 20:03
@mergify mergify bot removed the automerge-squash label Feb 8, 2022
@roman-kashitsyn
Copy link
Contributor Author

Oh, sorry, missed that conversation (don't get notifications from this repo).
Thanks for resolving the conflicts and updating the changelog!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants