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: CMC get default subnets #733

Merged
merged 7 commits into from
Oct 15, 2024
Merged

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Oct 13, 2024

Motivation

Particularly those days when the subnets are overloaded, it can be interesting for devs to be able to programmatically get a list of subnets. Therefore, this PR exposes the function get_default_subnets of the CMC canister.

Changes

  • Implement get_default_subnets in CMCCanister.

Copy link
Contributor

github-actions bot commented Oct 13, 2024

size-limit report 📦

Path Size
@dfinity/ckbtc 7.99 KB (0%)
@dfinity/cketh 3.53 KB (0%)
@dfinity/cmc 1.4 KB (+2.44% 🔺)
@dfinity/ledger-icrc 4.17 KB (0%)
@dfinity/ledger-icp 15.43 KB (0%)
@dfinity/nns 36.23 KB (0%)
@dfinity/nns-proto 140.98 KB (0%)
@dfinity/sns 15.87 KB (0%)
@dfinity/utils 4.5 KB (0%)
@dfinity/ic-management 3.01 KB (0%)

peterpeterparker added a commit that referenced this pull request Oct 14, 2024
# Motivation

In PR #733 I would like to implement a function for the CMC canister
that can be called as `query` or `update` call. The `CMCCanister` does
not yet support the service binding for query and it's `create`
implementation differs from the standards.

That's why this PR update the create function to use the standard
utility `createServices`.

# Changes

- Update `CMCCanister.create` to use the standardized function.
- Deprecate the use of `string` as creation option for consistency
reasons.

# Tests

The tests were already using a `canisterId` set as `Principal`.

---------

Signed-off-by: David Dal Busco <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
@peterpeterparker peterpeterparker marked this pull request as ready for review October 14, 2024 19:04
@peterpeterparker peterpeterparker requested review from a team as code owners October 14, 2024 19:04
@peterpeterparker peterpeterparker merged commit ae6c752 into main Oct 15, 2024
11 checks passed
@peterpeterparker peterpeterparker deleted the feat/cmc-get-default-subnets branch October 15, 2024 15:26
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