dfinity / dfinity/sdk

Feature: Download canister .did and .most

Open
#3,709 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Rust
Stars
204
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Please add a command to download canister's .did and .most.

Currently I do my code hacky:

%.install: %.wasm FORCE
	dfx canister create $(*F)
	dfx canister install --network=$(NETWORK) -m install --wasm=$< $(*F)

%.upgrade: %.wasm %.most FORCE
	mkdir -p $(DFXDIR)/.dfx/local/canisters/$(*F)
	cp -f $*.most $(DFXDIR)/.dfx/local/canisters/$(*F)/ # hack!
	cp -f $*.did $(DFXDIR)/.dfx/local/canisters/$(*F)/constructor.did # hack!
	dfx canister install --network=$(NETWORK) -m upgrade --wasm=$< $(*F)

I want to use moc --stable-compatible explicitly to avoid hacks, what is possible only when I get direct access to such canister data.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no SDK file or test; begin by locating the existing dfx canister command entry point and reviewing the Makefile workaround shown here. Done means a supported command can download a canister's .did and .most data, allowing explicit use of moc --stable-compatible without copying files manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.