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(dfx-orbit): Introduce `upload_and_propose` function to `ic-assets` #3853

Closed Sawchord closed 3 weeks ago

Sawchord commented 1 month ago

Description

This PR adds a upload_and_propose function to the ic-assets lib. This functionality would be needed by the dfx-orbit tool to work correctly.

The function works similar to upload, however it calls propose_commit_batch instead of commit_batch and returns the batch ID.

How Has This Been Tested?

Unit tests still pass.

Open issues:

The dfx-orbit tool needs some functions that previously have been private. Right now, I simply set the corresponding modules pub. It could also make sense to re-export the necessary functionality to some module to have it all in one place.

Checklist: