CLI: add a command to print the currently-deployed contract's wasm hash
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- blockchain, cli
Research direction
Start by reading the existing stellar contract upload command and the RPC getLedgerEntries path mentioned in the issue. Add the proposed stellar contract wasm-hash --id <CONTRACT_ID> command to read the contract's executable instance entry and print its hash. Done means the output can be compared with a local sha256sum and supports audit or CI checks.
Written by the indexing model from the issue text.
Description
When upgrading or auditing a Soroban contract, there is no CLI command to see
the wasm hash the contract is currently running.
stellar contract upload prints the sha256 of a wasm you upload, but there is
no counterpart that reads the hash of the executable currently installed at a
contract address.
- What problem does your feature solve?
After deploying or upgrading a Soroban contract there is no simple way to
answer: "what wasm is this contract actually running right now?"
stellar contract upload prints the sha256 of a wasm you upload, but there is
no command that reads the hash of the executable currently installed at a
deployed contract address. As a result developers cannot:
- confirm the deployed code matches the artifact they built (compare with
sha256sumof the local .wasm) - detect that a contract they depend on was upgraded to a hash they never
approved
-
What would you like to see?
A command that returns the currently-installed wasm hash for a contract, e.g.:stellar contract wasm-hash --id <CONTRACT_ID>
reading the executable entry from the contract's instance data.
With it you can:
- compare the live hash against
sha256sumof your local build to prove the
deployed bytecode matches your source before releasing funds - keep an upgrade audit trail by combining the uploaded hash, the
executable_updateevent, and the live hash - wire the check into CI so a deploy or a rogue upgrade can't go unnoticed
- What alternatives are there?
- Fetch the contract's
executableinstance entry via the RPC
(getLedgerEntries) and decode the hash manually — possible, but every
developer ends up re-implementing it. - Third-party verification tools read the same entry; having it in the
official CLI makes the check trivial and CI-friendly. - Leave the CLI as-is — the gap stays: no convenient way to verify what is
actually deployed.
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
-
stellar/stellar-cli#2701 · 1 assignee ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100