Skip to content

feat: subaccount can be derived from principal in dfx ledger account-id - #3755

Merged
7 commits merged into
masterfrom
mraszyk/ledger-id-subaccount
May 15, 2024
Merged

feat: subaccount can be derived from principal in dfx ledger account-id#3755
7 commits merged into
masterfrom
mraszyk/ledger-id-subaccount

Conversation

@mraszyk

@mraszyk mraszyk commented May 14, 2024

Copy link
Copy Markdown
Contributor

Description

This PR makes it possible to derive the subaccount from a principal in the dfx ledger account-id command.
This is useful for NNS voters to validate NNS subnet rental request proposals by deriving the ledger account (controlled by the subnet rental canister's principal and using the proposer's principal as the subaccount) to which the proposer should have transfered the deposit.

How Has This Been Tested?

A new e2e test has been added comparing the account ID returned by DFX against the account ID computed by the SRC for the caller.

@mraszyk
mraszyk requested review from a team and chenyan-dfinity as code owners May 14, 2024 05:52
Comment thread src/dfx/src/commands/ledger/account_id.rs Outdated

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@mraszyk
mraszyk requested a review from a user May 15, 2024 10:38
@ghost
ghost enabled auto-merge (squash) May 15, 2024 17:11
@ghost
ghost merged commit fdd6ace into master May 15, 2024
@ghost
ghost deleted the mraszyk/ledger-id-subaccount branch May 15, 2024 17:47
This pull request was closed.
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.

2 participants