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

SECFIND-244: Extract getCanisterCreationCmcAccountIdentifierHex from createCanister #6112

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

dskloetd
Copy link
Contributor

@dskloetd dskloetd commented Jan 7, 2025

Motivation

When creating a canister using the CMC, ICP are first transferred to a specific account of the CMC.
We want to find such transaction to recover from interrupt canister creation.
See this doc for details.

In this PR we just extract a utility function to calculate the CMC account identifier.

Changes

  1. Extract getCanisterCreationCmcAccountIdentifierHex from createCanister.
  2. Use getCanisterCreationCmcAccountIdentifierHex in createCanister.

Tests

Unit test added.

Todos

  • Add entry to changelog (if necessary).
    not yet

@dskloetd dskloetd marked this pull request as ready for review January 7, 2025 12:48
@dskloetd dskloetd requested a review from a team as a code owner January 7, 2025 12:49
frontend/src/lib/utils/canisters.utils.ts Outdated Show resolved Hide resolved
@dskloetd dskloetd enabled auto-merge January 7, 2025 13:34
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

Thanks!

@dskloetd dskloetd added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 43a1a9e Jan 7, 2025
31 checks passed
@dskloetd dskloetd deleted the kloet/cmc-account-id branch January 7, 2025 14:47
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.

4 participants