-
Notifications
You must be signed in to change notification settings - Fork 1
Fixes/initial fixes #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
## [UNRELEASED] | ||
|
||
### Fixed | ||
- Wallet path handling in `config wallets set` and `config wallets add` commands | ||
- Added path normalization to store absolute paths instead of relative paths | ||
- Added validation to check if wallet file exists before setting it | ||
- Fixed issue where changing directories would cause "missing wallet file" errors | ||
- Improved error messages for better user feedback | ||
|
||
### Changed | ||
- Updated wallet path storage to use absolute paths consistently | ||
- Enhanced error handling in wallet configuration commands | ||
- Improved command index pages with better descriptions and examples | ||
- Added detailed descriptions for core commands (asset, collection, plugins) | ||
- Enhanced examples with more use cases and options | ||
- Improved help text formatting and organization | ||
- Added subcommand descriptions and available options | ||
|
||
## [0.0.6] | ||
|
||
- Initial public beta release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
import { Command } from '@oclif/core' | ||
import { Command, Flags } from '@oclif/core' | ||
|
||
export default class CoreAsset extends Command { | ||
static override description = 'MPL Core Asset Module' | ||
static override description = `MPL Core Asset Management - Create, update, burn, and fetch digital assets | ||
|
||
The asset commands provide functionality for managing individual digital assets on the Solana blockchain using the Metaplex Core protocol. | ||
|
||
Available subcommands: | ||
create - Create new assets (with wizard, direct input, or file upload) | ||
update - Update asset metadata (name, URI, image) | ||
burn - Burn assets (single or batch) | ||
fetch - Fetch asset data and metadata` | ||
|
||
static override examples = [ | ||
'<%= config.bin %> <%= command.id %>', | ||
'$ mplx core asset create --wizard', | ||
'$ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json"', | ||
'$ mplx core asset create --files --image "./my-nft.png" --json "./metadata.json"', | ||
'$ mplx core asset update <assetId> --name "Updated Name" --uri "https://example.com/new-metadata.json"', | ||
'$ mplx core asset burn <assetId>', | ||
'$ mplx core asset fetch <assetId> --download', | ||
] | ||
|
||
static override flags = { | ||
|
||
help: Flags.help({char: 'h'}), | ||
} | ||
|
||
public async run(): Promise<void> { | ||
const {args, flags} = await this.parse(CoreAsset) | ||
|
||
|
||
// Show help by default | ||
this.log(CoreAsset.description) | ||
this.log('\nExamples:') | ||
CoreAsset.examples.forEach(example => { | ||
this.log(` ${example}`) | ||
}) | ||
} | ||
tonyboylehub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,18 +1,35 @@ | ||||||
import {Args, Command, Flags} from '@oclif/core' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Drop unused -import {Args, Command, Flags} from '@oclif/core'
+import {Command, Flags} from '@oclif/core' 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
export default class CoreCollection extends Command { | ||||||
static override description = 'MPL Core Collection Module' | ||||||
static override description = `MPL Core Collection Management - Create and manage collections of digital assets | ||||||
|
||||||
The collection commands provide functionality for managing groups of digital assets on the Solana blockchain using the Metaplex Core protocol. | ||||||
|
||||||
Available subcommands: | ||||||
create - Create new collections (with wizard, direct input, or file upload) | ||||||
fetch - Fetch collection data and metadata | ||||||
template - Generate template files for collection metadata and image` | ||||||
|
||||||
static override examples = [ | ||||||
'<%= config.bin %> <%= command.id %>', | ||||||
'$ mplx core collection create --wizard', | ||||||
'$ mplx core collection create --name "My Collection" --uri "https://example.com/metadata.json"', | ||||||
'$ mplx core collection create --files --image "./my-collection.png" --json "./metadata.json"', | ||||||
'$ mplx core collection fetch <collectionId>', | ||||||
'$ mplx core collection template', | ||||||
] | ||||||
|
||||||
static override flags = { | ||||||
|
||||||
help: Flags.help({char: 'h'}), | ||||||
} | ||||||
|
||||||
public async run(): Promise<void> { | ||||||
const {args, flags} = await this.parse(CoreCollection) | ||||||
|
||||||
|
||||||
// Show help by default | ||||||
this.log(CoreCollection.description) | ||||||
this.log('\nExamples:') | ||||||
CoreCollection.examples.forEach(example => { | ||||||
this.log(` ${example}`) | ||||||
}) | ||||||
tonyboylehub marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,18 +1,33 @@ | ||||||
import {Args, Command, Flags} from '@oclif/core' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Remove unused -import {Args, Command, Flags} from '@oclif/core'
+import {Command, Flags} from '@oclif/core' 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
export default class Core extends Command { | ||||||
static override description = 'MPL Core Program' | ||||||
static override description = `MPL Core Program - Manage digital assets, collections, and plugins on Solana | ||||||
|
||||||
The core commands provide functionality for managing Metaplex Core assets, collections, and plugins. These commands allow you to create, modify, and manage digital assets on the Solana blockchain using the Metaplex Core protocol. | ||||||
|
||||||
Available subcommands: | ||||||
asset - Manage individual digital assets (create, update, burn, fetch) | ||||||
collection - Manage collections of assets (create, fetch) | ||||||
plugins - Manage asset and collection plugins (add, remove, generate)` | ||||||
|
||||||
static override examples = [ | ||||||
'<%= config.bin %> <%= command.id %>', | ||||||
'$ mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json"', | ||||||
'$ mplx core collection create --name "My Collection" --uri "https://example.com/collection.json"', | ||||||
'$ mplx core plugins add <assetId> --wizard', | ||||||
] | ||||||
|
||||||
static override flags = { | ||||||
|
||||||
help: Flags.help({char: 'h'}), | ||||||
} | ||||||
|
||||||
public async run(): Promise<void> { | ||||||
const {args, flags} = await this.parse(Core) | ||||||
|
||||||
|
||||||
// Show help by default | ||||||
this.log(Core.description) | ||||||
this.log('\nExamples:') | ||||||
Core.examples.forEach(example => { | ||||||
this.log(` ${example}`) | ||||||
}) | ||||||
tonyboylehub marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,19 +1,58 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { Command } from '@oclif/core' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { Command, Flags } from '@oclif/core' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { BaseCommand } from '../../../BaseCommand.js' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export default class CorePlugins extends BaseCommand<typeof CorePlugins> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static override description = 'MPL Core Plugins Module' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static override description = `MPL Core Plugin Management - Add and manage plugins for assets and collections | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The plugin commands provide functionality for managing plugins that extend the capabilities of assets and collections on the Solana blockchain. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Available subcommands: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
add - Add plugins to assets or collections (with wizard or JSON config) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
remove - Remove plugins from assets or collections | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
generate - Generate reusable plugin configuration files for scripting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Available Plugin Types: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Common Plugins (Asset & Collection): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Attributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Royalties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Update Delegate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Permanent Freeze | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Permanent Transfer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Permanent Burn | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Add Blocker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Immutable Metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Autograph | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Verified Creators | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collection-specific Plugins: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Master Edition | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Asset-specific Plugins: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Edition | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Freeze Delegate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Burn Delegate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Transfer Delegate` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+5
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Trim leading indentation in the multi-line The template literal captures all the leading spaces that appear in the source file, so the CLI prints each line indented by two spaces. This makes the help text look slightly “shifted” compared with oclif’s built-in help for other commands. A low-impact tweak is to strip the indentation at build time so the output is perfectly left-aligned: - static override description = `MPL Core Plugin Management - Add and manage plugins for assets and collections
- ...
- - Transfer Delegate`
+ static override description = [
+ 'MPL Core Plugin Management - Add and manage plugins for assets and collections',
+ '',
+ 'The plugin commands provide functionality for managing plugins that extend the capabilities of assets and collections on the Solana blockchain.',
+ '',
+ 'Available subcommands:',
+ ' add - Add plugins to assets or collections (with wizard or JSON config)',
+ ' remove - Remove plugins from assets or collections',
+ ' generate - Generate reusable plugin configuration files for scripting',
+ '',
+ 'Available Plugin Types:',
+ ' Common Plugins (Asset & Collection):',
+ ' - Attributes',
+ ' - Royalties',
+ ' - Update Delegate',
+ ' - Permanent Freeze',
+ ' - Permanent Transfer',
+ ' - Permanent Burn',
+ ' - Add Blocker',
+ ' - Immutable Metadata',
+ ' - Autograph',
+ ' - Verified Creators',
+ '',
+ ' Collection-specific Plugins:',
+ ' - Master Edition',
+ '',
+ ' Asset-specific Plugins:',
+ ' - Edition',
+ ' - Freeze Delegate',
+ ' - Burn Delegate',
+ ' - Transfer Delegate',
+ ].join('\n') Any string-dedent helper (e.g. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static override examples = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'<%= config.bin %> <%= command.id %>', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'$ mplx core plugins add <assetId> --wizard', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'$ mplx core plugins add <assetId> ./plugin.json', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'$ mplx core plugins generate --asset', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'$ mplx core plugins generate --collection', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
static override flags = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
help: Flags.help({char: 'h'}), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tonyboylehub marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
public async run(): Promise<void> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const {args, flags} = await this.parse(CorePlugins) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Show help by default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
this.log(CorePlugins.description) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
this.log('\nExamples:') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CorePlugins.examples.forEach(example => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
this.log(` ${example}`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
49
to
57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Drop unused destructuring from The command neither reads - const {args, flags} = await this.parse(CorePlugins)
+ await this.parse(CorePlugins) // validate CLI input Optional: you can replace the custom logging with 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,10 +1,34 @@ | ||||||||||||||||||||||||||||||
import {Args, Command, Flags} from '@oclif/core' | ||||||||||||||||||||||||||||||
tonyboylehub marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
export default class Core extends Command { | ||||||||||||||||||||||||||||||
export default class Toolbox extends Command { | ||||||||||||||||||||||||||||||
static override description = `Solana Ecosystem Tools - Utility commands for common Solana operations | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
static override description = 'Various tools for the Solana ecosystem' | ||||||||||||||||||||||||||||||
The toolbox commands provide utility functions for common Solana blockchain operations, including SOL management and token operations. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
public async run(): Promise<void> { | ||||||||||||||||||||||||||||||
Available subcommands: | ||||||||||||||||||||||||||||||
sol - SOL management tools (balance, transfer, airdrop) | ||||||||||||||||||||||||||||||
token - Token management tools (create, update, transfer) | ||||||||||||||||||||||||||||||
rent - Calculate rent costs for on-chain data storage` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
static override examples = [ | ||||||||||||||||||||||||||||||
'$ mplx toolbox sol balance', | ||||||||||||||||||||||||||||||
'$ mplx toolbox sol transfer 1 <recipient_address>', | ||||||||||||||||||||||||||||||
'$ mplx toolbox token create --wizard', | ||||||||||||||||||||||||||||||
'$ mplx toolbox rent 1000', | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
static override flags = { | ||||||||||||||||||||||||||||||
help: Flags.help({char: 'h'}), | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
public async run(): Promise<void> { | ||||||||||||||||||||||||||||||
const {args, flags} = await this.parse(Toolbox) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
// Show help by default | ||||||||||||||||||||||||||||||
this.log(Toolbox.description) | ||||||||||||||||||||||||||||||
this.log('\nExamples:') | ||||||||||||||||||||||||||||||
Toolbox.examples.forEach(example => { | ||||||||||||||||||||||||||||||
this.log(` ${example}`) | ||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
Comment on lines
+24
to
33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Delegate to oclif’s built-in help instead of hand-rolling output.
- public async run(): Promise<void> {
- const {args, flags} = await this.parse(Toolbox)
-
- // Show help by default
- this.log(Toolbox.description)
- this.log('\nExamples:')
- Toolbox.examples.forEach(example => {
- this.log(` ${example}`)
- })
- }
+ public async run(): Promise<void> {
+ await this.parse(Toolbox) // still ensures validation
+ return this._help()
+ } 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this._help() doesn't exist There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tonyboylehub thanks for the heads-up. Let me double-check what helper methods are actually exposed by the version of I’ll grep the local |
||||||||||||||||||||||||||||||
} |
Uh oh!
There was an error while loading. Please reload this page.