Skip to content
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

feat: add cycles balance command #3416

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Conversation

ericswanson-dfinity
Copy link
Member

Description

Adds the dfx cycles balance subcommand, hidden for the time being.

Fixes https://dfinity.atlassian.net/browse/SDK-1160

How Has This Been Tested?

Added an e2e test and updated another to use dfx cycles balance rather than dfx canister call.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@ericswanson-dfinity ericswanson-dfinity changed the title feat: SDK-1160 dfx cycles balance feat: add cycles balance command Oct 9, 2023
89000000000000 cycles.
```

You can use the `dfx cycles balance` command to check the balance of another principal:
Copy link
Contributor

Choose a reason for hiding this comment

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

This functionality is actually not part of the design but it's a nice addition.

Copy link
Member Author

Choose a reason for hiding this comment

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

dfx cycles balance: The function prints out the balance associated with the user’s principal ID by calling the icrc1_balance_of endpoint of the cycles ledger.

You are right, and I hadn't noticed that. I was looking at the arguments of icrc1_balance_of, which has an owner field, but the design doc doesn't require that dfx cycles balance passes anything other than the user's principal.

@mergify mergify bot merged commit 5ba48e3 into master Oct 11, 2023
171 checks passed
@mergify mergify bot deleted the ens/sdk-1160-cycles-balance branch October 11, 2023 15:42
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