Skip to content

Fix the deploy, mint and init script on the dapp initialization guide - #2989

Merged
ElliotFriend merged 2 commits into
mainfrom
docs-agent/2972-dapp-init-script
Nov 3, 2026
Merged

ElliotFriend merged 2 commits into
mainfrom
docs-agent/2972-dapp-init-script

Conversation

@stellar-doxie

@stellar-doxie stellar-doxie Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Closes #2972

Working this because @oceans404 added bot:take. I checked each point against stellar-cli v28.1.0 source and FULL_HELP_DOCS.md.

Changes on docs/build/guides/dapps/initialization.mdx:

  • Manual deploy and mint: add the missing \ before --. The constructor arguments and mint now reach the CLI.
  • Decimals: deploy with 7 decimals, so --amount 1000000000 is the 100 tokens the text says.
  • Deploy saves the ID with --alias token. Mint uses --id token, so it runs as written.
  • Script: --wasm now comes before --. Arguments are quoted, so a name with spaces works.
  • Script: uses the CLI's built-in testnet, futurenet and local networks. keys generate --fund replaces the hand-rolled Friendbot call.
  • Script: no longer reads the admin secret or writes it to disk. It also no longer writes into a .soroban-example-dapp/ folder that it never creates.
  • A second run reuses token-admin, deploys a new contract and moves the alias. --alias overwrites without asking.
  • Removed the dead stellar/soroban-react-payment link (404) and the standalone and soroban-preview summary.

Checks: pnpm and prettier are not available in this environment, so pnpm format:mdx, pnpm check and pnpm check:links did not run locally. The checks job on this PR runs them. Bash fences are not formatted by the repo's prettier config.

I did not run the commands on testnet. A reviewer can check them with CLI 28.x in soroban-examples/token.

Add the missing line continuations before `--` so the constructor
arguments and the mint call reach the CLI. Use 7 decimals so the
mint amount matches the text, and save the contract under an alias.

Rewrite initialize.sh for the current CLI: use the built-in networks,
generate and fund the admin with keys generate --fund, put --wasm
before `--`, and stop reading or writing the admin secret.

Drop the dead soroban-react-payment link.
@stellar-doxie
stellar-doxie Bot requested a review from ElliotFriend November 1, 2026 23:52
@mintlify

mintlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 3, 2026, 9:23 AM

@stellar-doxie

stellar-doxie Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Reviewing because this is my own PR for #2972.

Verified against stellar-cli v28.1.0 and soroban-examples/token: --alias, --id, keys address, keys generate --fund and the built-in network names all exist. The preview renders and all checks pass. A testnet run of the commands is still a human step. Ready to merge.

@stellar-doxie stellar-doxie Bot added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Nov 2, 2026

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against CLI 28.1.0 and soroban-examples/token. The deploy, mint, and script logic is right, thanks. Three small changes before merge:

  1. The page uses the alice and bob identities but never creates them. Please add a stellar keys generate --fund step (or link to where setup happens).
  2. The manual commands still pass --rpc-url and --network-passphrase, while the script uses --network testnet. Please use --network testnet in the manual commands too, so they match the script and the rest of the docs.
  3. The script creates token-admin but passes $ADMIN as the token's admin, so token-admin only pays for the deploy. Please rename it (e.g. deployer), or default the admin to it.

@ElliotFriend

Copy link
Copy Markdown
Contributor

/triage

@stellar-doxie

stellar-doxie Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend requested changes and asked with /triage.

Done in ece26c6:

  1. Added a stellar keys generate alice|bob --network testnet --fund step before the deploy.
  2. The manual deploy and mint now use --network testnet.
  3. Renamed token-admin to deployer. The text now says it only pays for the deploy, and <admin> sets the token admin.

Checks pass and the preview shows the new text. Your change request is still open, so please re-review. Ready to merge.

@ElliotFriend
ElliotFriend merged commit aaf2879 into main Nov 3, 2026
8 checks passed
@ElliotFriend
ElliotFriend deleted the docs-agent/2972-dapp-init-script branch November 3, 2026 16:19

This branch was successfully deployed

1 active deployment
staging — ece26c68 Deployed Nov 3, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant