dfinity / sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
https://internetcomputer.org/developers
Apache License 2.0
171 stars 83 forks source link

feat: embedding well known canisters at build time #3872

Open NikolaMilosa opened 1 month ago

NikolaMilosa commented 1 month ago

Description

DRE team would highly benefit if we could have a feature like this for well known canisters. Probably others as well. This PR adds a build.rs for dfx-core which creates a file at build time for well known canisters.

Fixes # (issue)

How Has This Been Tested?

This was mostly tested during development with:

./target/debug/dfx --identity default canister --ic call governance list_proposals

# Both following are the same:
./target/debug/dfx canister sign --query rwlgt-iiaaa-aaaaa-aaaaa-cai read --network ic
./target/debug/dfx canister sign --query registry read --network ic

Added two tests to canister sign and canister call scripts

Checklist:

NikolaMilosa commented 1 week ago

Not sure how I would go about migrations docs for this. Do you have some proposals?