Skip to content

Initialize a dapp using scripts: the deploy and mint commands fail as written #2972

Closed

Description

@oceans404

Page: https://developers.stellar.org/docs/build/guides/dapps/initialization
File: docs/build/guides/dapps/initialization.mdx:73-76, :91-95, :162-165, :176-182

What's wrong:

  • Manual deploy (line 76): there's no \ after --network-passphrase '...', so the shell runs the deploy without the constructor arguments, then runs -- \ --admin alice ... as a separate command.
  • Mint (line 95): same missing \, so invoke runs without a function and -- mint ... runs on its own. The text says this mints "100 tokens", but with the 10 decimals set at deploy, 1000000000 is 0.1.
  • Script deploy (lines 176-179): ARGS ends with -- --admin ... --symbol $5, and --wasm comes after it, so the CLI reads --wasm as a constructor argument instead of the file to deploy. With CLI 28.1.0, outside a Cargo project, it exits with --wasm or --wasm-hash is required when not in a Cargo workspace.
  • Secret written to disk (lines 162-165): the script prints the admin's secret with keys show (renamed keys secret, still accepted as a hidden alias) and writes it to .soroban-example-dapp/token_admin_secret. Nothing in the script reads it back.
  • Out of date: the "Example Payment Dapp" link (line 10) points to stellar/soroban-react-payment, which no longer exists. The summary (lines 189-190) describes standalone, futurenet and the soroban-preview container.

The deploy and mint breaks came in with the fix for #1881 (PR #1992, December 2025).

Outcome we're after:
The commands and the script on this page run as written with the current CLI, and the page doesn't teach writing the admin's secret to a file. How to get there is up to whoever picks this up.

Reference:

How to check the fix:

  • In soroban-examples/token, with CLI 28.x on testnet: the manual deploy creates the contract with the constructor values, and the mint succeeds and mints the amount the text says.
  • The script deploys the contract on testnet, and running it a second time doesn't fail.
  • No secret key is written to disk.
  • The dapp link resolves; pnpm validate passes.

Why it matters: This is the one page on the site with a full deploy script. In the HackMeridian 2026 hackathon (147 public repos), deploy scripts had the same shape: contract IDs captured from stdout into files, and secrets exported from the keystore with keys secret or keys show (22 repos).

Related: #1881 and #1862 (closed; the fix introduced the breaks above), #814 (scripting deployments), #1930 (how docs show secret keys).

Activity

  1. stellar-doxie commented on Nov 1, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    I saw this issue. Nobody has called me in yet, so I take no action on it.

    How to reach me:

    • Anyone with write permission can call me in. Comment /triage, add the bot:take label, or assign @kaankacar, @ElliotFriend or @wmendes.
    • The issue author can send me away with /triage stop.
    • People with write permission can also add the bot:hands-off label.
  2. added
    bot:take
    on Nov 1, 2026
  3. oceans404 commented on Nov 1, 2026

    @oceans404
    ContributorAuthor

    /triage

  4. stellar-doxie commented on Nov 1, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Working this because @oceans404 added bot:take.

    I am checking each point against CLI 28.1.0 and the page. I will report back with a PR or a question.

  5. stellar-doxie commented on Nov 1, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from the Stellar Triage Bot.

    Working this because @oceans404 added bot:take.

    Opened #2989. Every point checked out against CLI 28.1.0.

    • Manual deploy and mint get the missing \. The token now has 7 decimals, so the mint is 100 tokens.
    • The script puts --wasm before -- and uses the CLI's built-in networks.
    • The script no longer reads or writes the admin secret. A second run reuses the identity.
    • The dead dapp link and the standalone summary are gone.

    The checks job passed. I did not run the commands on testnet, so a reviewer should do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot:take

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions