fix(cli): correct help text for faucet command#1830
fix(cli): correct help text for faucet command#1830Wutche wants to merge 3 commits intostx-labs:mainfrom
Conversation
|
Hi 👋🏻 Thanks for your contribution — this repository now requires signed commits. Feel free to rewrite the commit after setting up signing and force-push to update the branch (recommended, quicker). Otherwise we may fork the changes to another PR and sign your commit for you. |
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #1817 where the stacks faucet command was incorrectly displaying help text from the encrypt_keychain command. The help text has been updated to correctly describe requesting free testnet STX tokens and includes an appropriate example command with expected output.
Changes:
- Updated help text description for the faucet command to clearly explain it requests free Stacks tokens from the testnet faucet
- Replaced the example command from demonstrating key encryption to showing the actual faucet command usage
- Updated the example output to show the expected transaction ID and explorer link format
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| " txid: '0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3',\n" + | ||
| " transaction: 'https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet'\n" + |
There was a problem hiding this comment.
The example JSON output in the help text is not valid JSON. In JSON format, object keys must be enclosed in double quotes (e.g., "txid" instead of txid), and string values must also use double quotes (e.g., "0xd33..." instead of '0xd33...'). The current format appears to be JavaScript object notation rather than valid JSON.
| " txid: '0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3',\n" + | |
| " transaction: 'https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet'\n" + | |
| ' "txid": "0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3",\n' + | |
| ' "transaction": "https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet"\n' + |
Alright thanks |
The faucet command was incorrectly showing encrypt_keychain documentation. Updated to properly describe requesting testnet STX tokens. Closes stx-labs#1817
b2b5c49 to
60082f5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@jannik-stacks you can check it out now |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'Request free Stacks tokens (STX) from the testnet faucet for the specified address. ' + | ||
| 'This command only works on testnet and is useful for testing and development purposes.\n' + | ||
| '\n' + | ||
| 'Example:\n' + | ||
| '\n' + | ||
| '```console\n' + |
There was a problem hiding this comment.
The help text is long and built via many string concatenations, which is harder to scan and edit (especially the example block). Consider switching this help value to a single template literal (maintaining the same output) to reduce concatenation noise and make future edits less error-prone.
| "txid": "0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3", | ||
| "transaction": "https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet" |
There was a problem hiding this comment.
The README example output was changed to strict JSON-style quoting. Please ensure this matches the actual CLI output formatting (e.g., if the CLI prints JSON.stringify(...)). If the CLI prints a Node-style object (unquoted keys / single quotes), the README should mirror that to avoid confusing users.
The faucet command was incorrectly showing encrypt_keychain documentation. Updated to properly describe requesting testnet STX tokens. Closes #1817
@janniks @zone117x
Description
The
stacks faucetcommand help text was copy-pasted fromencrypt_keychainand showed incorrect documentation about encrypting backup phrases instead of describing the faucet functionality.Fixed by updating the help text to correctly describe requesting free testnet STX tokens.
Breaking change?
None
Example
Before (incorrect):
$ stx help faucet
Command: faucet
Encrypt a 12-word backup phrase, which can be decrypted later with the
decrypt_backup_phrasecommand...After (correct):
$ stx help faucet
Command: faucet
Request free Stacks tokens (STX) from the testnet faucet for the specified address.
This command only works on testnet and is useful for testing and development purposes.
Checklist