fix(get-started): repair the programmatic path end to end — install, snippets, storage seeding - #352
Conversation
…en new, repair install
|
cc @BrianSeong99 for visibility. This also closes the docs side of 0xMiden/project-template#54 , the template doesn't need a `miden-protocol` dependency, the Get Started examples just had the wrong import path. |
|
@WiktorStarczewski I am tagging you for visibility |
0xrouss-miden
left a comment
There was a problem hiding this comment.
Thanks for working through this. I tested the Rust and TypeScript flows against toolchain 0.15.0. The dependency/import updates, component metadata, note namespace, callback flag, and counter storage initialization fixes look correct.
I left inline comments for the remaining issues: stale naming, TypeScript runtime and output mismatches, examples that are not self-contained, and the counter fixture.
I don’t think this PR should change miden build to cargo miden build yet, since the expected behaviour is still being resolved in midenup#233.
The Installation card 404 reported in #343 also remains unresolved and should be included in this fix.
|
@0xrouss-miden Hi! I pushed the review fixes:
I would skip the 404 for now. docs.miden.xyz/builder/get-started serves versioned_docs/version-0.15/, so editing docs/ only shows up on /next and the live page stays broken until 0.16. Absolute paths don't help either, on /next they'd send readers back into 0.15. I think it's better to resolve it in a separate pr |
0xrouss-miden
left a comment
There was a problem hiding this comment.
Reviewed the latest changes. The inline feedback has been addressed. I’m okay with tracking the cards 404 separately.
FYI there is an open PR that would be useful for fixing the paths: #262 |
Closes #343. The programmatic (Rust/TypeScript) path through Get Started had drifted away from what
miden newactually generates and from the v0.15 SDK, so anyone following it top to bottom ran into errors. This resyncs the path and folds in review feedback.What changed
Installation
cargo install midenupis the primary install command again.--versionis documented in a follow-up sentence for anyone who needs to pin a release.Your First Smart Contract (create / test / deploy)
miden buildbecomescargo miden build. The old one proxies tomidencand dies withexpected input file.miden-project.tomlmatches whatmiden newgenerates now: the note's package-derived namespace (miden-increment-note) andsupported-types = ["RegularAccountImmutableCode"].midenprelude.assert_eqthere is a prelude function rather than Rust's macro, so the hand-written import list didn't compile.InitStorageDataplusinsert_map_entry, instead of buildingStorageSlots by hand.NoteBuilder(miden_standards::testing::note).AccountComponent::from_package(),add_account_from_builder(.., AccountState::Exists)andmock_chain.committed_account(). The manualapply_deltastep is gone.counter_account::counter_contract::count_map).Notes (transfer policies)
AssetCallbackFlag::Enabledso the faucet's send/receive transfer policies actually run.miden_protocol::assettomiden_client::asset.Read Storage Values
integration/src/helpers.rsinstead of being repeated as literals.:::noteand into the code comments, right next to the placeholder it explains.Prose cleanups from review
Wordlayout explanations. The "[value, 0, 0, 0]layout" framing was wrong (aWordis four field elements, and what they mean is up to the contract), and Create Your Contract already introducesWord.