Skip to content
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

fix: update descriptions #232

Merged
merged 5 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,35 @@ $ archway help

new Initializes a new project repository

accounts new [options] Adds a new wallet to the keystore
accounts new [options] Adds a new wallet to the keyring
accounts get [options] Displays details about an account
accounts list [options] Lists all accounts in the keyring
accounts remove [options] Removes an account from the keystore
accounts remove [options] Removes an account from the keyring
accounts balances get [options] Query the balance of an address or account
accounts balances send [options] Send tokens from an address or account to another
accounts balances [options] Manage the balances of an account.

config init [options] Initializes a config file for the current project.
config show [options] Shows the config file for the current project.
config deployments [options] Displays the list of deployments, allows filtering by chain, action and contract.
config chains use [options] Switches the current chain in use and updates the archway-cli.json config file with his information.
config chains export [options] Exports a built-in chain registry file to {project-root}/.archway-cli/chains/{chain-id}.json.
config chains import [options] Import a chain registry file and save it to {project-root}/.archway-cli/chains/{chain-id}.json.
config chains [options] Chain management commands. The chain files follow the Cosmos chain registry schema.

contracts new [options] Scaffolds a new Smart Contract from a template
contracts build [options] Builds the contract's optimized WASM file, and its schemas
contracts store [options] Stores a WASM file on-chain
accounts balances [options] Manage the token balance of an account

config init [options] Initializes a config file for the current project
config show [options] Displays the config values for the current project
config deployments [options] Displays the list of deployments, allows filtering by chain, action and contract
config chains use [options] Switches the current chain in use and updates the config file appropriately
config chains import [options] Import a chain registry file and save it to the global configuration
config chain-id [options] Query or update the 'chain-id' in the config file (local or global)
config contracts-path [options] Query or update the 'contracts-path' in the config file (local or global)
config default-account [options] Query or update the 'default-account' in the config file (local or global)
config keyring-backend [options] Query or update the 'keyring-backend' in the config file (local or global)
config keyring-path [options] Query or update the 'keyring-path' in the config file (local or global)

contracts new [options] Scaffolds a new Wasm smart contract from a template
contracts build [options] Builds the smart contracts optimized Wasm file along with its schemas
contracts store [options] Stores a Wasm file on-chain
contracts instantiate [options] Instantiates code stored on-chain with the given arguments
contracts metadata [options] Sets a contract rewards metadata
contracts premium [options] Sets a contract premium flat fee for a contract
contracts execute [options] Executes a transaction in a contract
contracts migrate [options] Runs a contract migration
contracts query balance [options] Access the bank module to query the balance of contracts
contracts metadata [options] Sets a smart contracts rewards metadata
contracts premium [options] Sets the smart contract premium flat fee
contracts execute [options] Executes a transaction in a smart contract
contracts migrate [options] Runs a smart contract migration
contracts query balance [options] Access the bank module to query the balance of smart contracts
contracts query smart [options] Queries a single smart contract
contracts query [options] Display help for the contracts query command.

rewards query [options] Queries the outstanding rewards for a specific account or address
rewards withdraw [options] Withdraws rewards for a specific account
Expand Down
2 changes: 1 addition & 1 deletion src/commands/accounts/balances/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Help from '@/plugins/help-plugin/help';
* Displays the help info for the 'accounts balances' command
*/
export default class AccountsBalances extends Command {
static summary = 'Manage the balances of an account.';
static summary = 'Manage the token balance of an account';

public async run(): Promise<void> {
const help = new Help(this.config, { all: true });
Expand Down
2 changes: 1 addition & 1 deletion src/commands/accounts/balances/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Account, AccountBase, Amount } from '@/types';
* This command will use the bank module to send coins from one account to another.
*/
export default class AccountsBalancesSend extends BaseCommand<typeof AccountsBalancesSend> {
static summary = 'Send tokens from an address or account to another';
static summary = 'Send tokens from one address or account to another';
static args = {
amount: AmountRequiredArg,
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Help from '@/plugins/help-plugin/help';
* Displays the help info for the 'accounts' command
*/
export default class Accounts extends Command {
static summary = 'Manages a local keystore with wallets to sign transactions.';
static summary = 'Manages a local keyring with wallets to sign transactions';

public async run(): Promise<void> {
const help = new Help(this.config, { all: true });
Expand Down
4 changes: 2 additions & 2 deletions src/commands/accounts/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { Account, AccountType } from '@/types';

/**
* Command 'accounts new'
* Adds a new wallet to the keystore. It requires a name and will generate a new mnemonic (if not provided) to create the wallet's private keys.
* Adds a new wallet to the keyring. It requires a name and will generate a new mnemonic (if not provided) to create the wallet's private keys
*/
export default class AccountsNew extends BaseCommand<typeof AccountsNew> {
static summary = 'Adds a new wallet to the keystore';
static summary = 'Adds a new wallet to the keyring';
static args = {
'account-name': Args.string({ ...ParamsAccountOptionalArg, ignoreStdin: true }),
stdinInput: StdinInputArg,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/accounts/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { AccountBase } from '@/types';

/**
* Command 'accounts remove'
* Removes an account from the keystore
* Removes an account from the keyring
*/
export default class AccountsRemove extends BaseCommand<typeof AccountsRemove> {
static summary = 'Removes an account from the keystore';
static summary = 'Removes an account from the keyring';
static args = {
account: AccountRequiredArg,
};
Expand Down
8 changes: 4 additions & 4 deletions src/commands/config/chain-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { Args } from '@oclif/core';
import { BaseCommand } from '@/lib/base';
import { bold, greenBright, reset } from '@/utils';
import { ChainRegistry, Config, DEFAULT_CONFIG_DATA } from '@/domain';
import { GlobalFlag, ParamsChainOptionalFlag } from '@/parameters/flags';
import { GlobalFlag } from '@/parameters/flags';

/**
* Command 'config chain-id'
* Updates the chain-id config in the config file (local or global)
* Query or update the chain-id in the config file (local or global)
*/
export default class ConfigChainId extends BaseCommand<typeof ConfigChainId> {
static summary = 'Updates the chain-id config in the config file (local or global)';
static summary = "Query or update the 'chain-id' in the config file (local or global)";
static args = {
'chain-id': Args.string(ParamsChainOptionalFlag),
'chain-id': Args.string({description: 'New value for the ID of the chain'}),
};

static flags = {
Expand Down
7 changes: 2 additions & 5 deletions src/commands/config/chains/import.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import path from 'node:path';
import { Args } from '@oclif/core';
import fs from 'node:fs/promises';

import { BaseCommand } from '@/lib/base';
import { bold, greenBright, redBright } from '@/utils';
import { ChainRegistry, GLOBAL_CHAINS_PATH } from '@/domain';
import { ChainRegistry } from '@/domain';
import { ErrorCodes } from '@/exceptions';
import { StdinInputArg } from '@/parameters/arguments';

Expand All @@ -15,9 +14,7 @@ import { ConsoleError, CosmosChain } from '@/types';
* Imports from an external chain registry file or from pipe input, and saves it into a file
*/
export default class ConfigChainsImport extends BaseCommand<typeof ConfigChainsImport> {
static summary = `Import a chain registry file and save it to ${bold(
path.join(GLOBAL_CHAINS_PATH, './{chain-id}.json')
)}.`;
static summary = 'Import a chain registry file and save it to the global configuration';

static args = {
file: Args.string({ name: 'file', required: false, ignoreStdin: true, description: 'Path to file to be imported' }),
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { blueBright } from '@/utils';
* Displays the help info for the 'config chains' command
*/
export default class ConfigChains extends Command {
static summary = `Chain management commands. The chain files follow the ${terminalLink(
static summary = `Chain management commands, the chain files follow the ${terminalLink(
blueBright('Cosmos chain registry schema'),
'https://raw.githubusercontent.com/cosmos/chain-registry/master/chain.schema.json',
{
fallback: () => `${blueBright('https://raw.githubusercontent.com/cosmos/chain-registry/master/chain.schema.json')} schema`,
}
)}.`;
)}`;

/**
* Runs the command.
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/chains/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { GlobalFlag } from '@/parameters/flags';

/**
* Command 'config chains use'
* Switches the current chain in use and updates the config file
* Switches the current chain in use and updates the config file appropriately
*/
export default class ConfigChainsUse extends BaseCommand<typeof ConfigChainsUse> {
static summary = 'Switches the current chain in use and updates the config file.';
static summary = 'Switches the current chain in use and updates the config file appropriately';
static args = {
chain: ChainRequiredArg,
};
Expand Down
6 changes: 3 additions & 3 deletions src/commands/config/contracts-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { GlobalFlag } from '@/parameters/flags';

/**
* Command 'config contracts-path'
* Updates the contracts-path config in the config file (local or global)
* Query or update the contracts-path in the config file (local or global)
*/
export default class ConfigContractsPath extends BaseCommand<typeof ConfigContractsPath> {
static summary = 'Gets the contracts-path config in the config file (local or global). If an additional argument is passed, it sets a new value';
static summary = "Query or update the 'contracts-path' in the config file (local or global)";
static args = {
'contracts-path': Args.string({description: 'Relative Path where the contracts are found in a project'}),
'contracts-path': Args.string({description: 'New value for the relative Path where the contracts are found in a project'}),
};

static flags = {
Expand Down
9 changes: 5 additions & 4 deletions src/commands/config/default-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import { GlobalFlag } from '@/parameters/flags';

/**
* Command 'config default-account'
* Updates the default-account config in the config file (local or global)
* Query or update the default-account in the config file (local or global)
*/
export default class ConfigDefaultAccount extends BaseCommand<typeof ConfigDefaultAccount> {
static summary =
'Gets the default-account config in the config file (local or global). If an additional argument is passed, it sets a new value';
static summary = "Query or update the 'default-account' in the config file (local or global)";

static args = {
'default-account': Args.string({ description: 'Account that will be used by default if no --from flag is passed to other commands' }),
'default-account': Args.string({
description: 'New value for the account that will be used by default if no --from flag is passed to other commands',
}),
};

static flags = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { DeploymentAction } from '@/types';
* Displays the list of deployments, allows filtering by chain, action and contract
*/
export default class ConfigDeployments extends BaseCommand<typeof ConfigDeployments> {
static summary = 'Displays the list of deployments, allows filtering by chain, action and contract.';
static summary = 'Displays the list of deployments, allows filtering by chain, action and contract';
static flags = {
chain: ChainOptionalFlag,
action: Flags.string({ options: Object.values(DeploymentAction), description: 'Deployment action to filter by' }),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Help from '@/plugins/help-plugin/help';
* Displays the help info for the 'config' command
*/
export default class Config extends Command {
static summary = 'Display help for the config command.';
static summary = 'Display help for the config command';

/**
* Runs the command.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { bold, green } from '@/utils';
* Initializes a config file for the current project
*/
export default class ConfigInit extends BaseCommand<typeof ConfigInit> {
static summary = 'Initializes a config file for the current project.';
static summary = 'Initializes a config file for the current project';
static flags = {
chain: ChainOptionalFlag,
};
Expand Down
9 changes: 4 additions & 5 deletions src/commands/config/keyring-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ import { KeystoreBackendType } from '@/types';

/**
* Command 'config keyring-backend'
* Updates the keyring-backend config in the config file (local or global)
* Query or update the keyring-backend in the config file (local or global)
*/
export default class ConfigKeyringBackend extends BaseCommand<typeof ConfigKeyringBackend> {
static summary =
'Gets the keyring-backend config in the config file (local or global). If an additional argument is passed, it sets a new value';
static summary = "Query or update the 'keyring-backend' in the config file (local or global)";

static args = {
'keyring-backend': Args.custom({
description: 'Keyring backend for account management (os/file/test)',
parse: async (val?: string): Promise<KeystoreBackendType | undefined> => val ? val as KeystoreBackendType : undefined,
description: 'New value for the keyring backend for account management (os/file/test)',
parse: async (val?: string): Promise<KeystoreBackendType | undefined> => (val ? (val as KeystoreBackendType) : undefined),
options: Object.values(KeystoreBackendType),
})(),
};
Expand Down
9 changes: 4 additions & 5 deletions src/commands/config/keyring-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ import { KeystoreBackendType } from '@/types';

/**
* Command 'config keyring-path'
* Updates the keyring-path config in the config file (local or global)
* Query or update the keyring-path in the config file (local or global)
*/
export default class ConfigKeyringPath extends BaseCommand<typeof ConfigKeyringPath> {
static summary =
'Gets the keyring-path config in the config file (local or global). If an additional argument is passed, it sets a new value';
static summary = "Query or update the 'keyring-path' in the config file (local or global)";

static args = {
'keyring-path': Args.custom({
description: "Keyring path where accounts will be stored when 'keyring-backend' is set to 'file'",
parse: async (val?: string): Promise<KeystoreBackendType | undefined> => val ? val as KeystoreBackendType : undefined,
description: "New value for the keyring path where accounts will be stored when 'keyring-backend' is set to 'file'",
parse: async (val?: string): Promise<KeystoreBackendType | undefined> => (val ? (val as KeystoreBackendType) : undefined),
options: Object.values(KeystoreBackendType),
})(),
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Config } from '@/domain';

/**
* Command 'config show'
* Shows the config file for the current project.
* Displays the config values for the current project
*/
export default class ConfigShow extends BaseCommand<typeof ConfigShow> {
static summary = 'Shows the config file for the current project.';
static summary = 'Displays the config values for the current project';

/**
* Runs the command.
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ enum SuccessMessageType {

/**
* Command 'contracts build'
* Builds the contract's optimized WASM file, and its schemas
* Builds the smart contracts optimized Wasm file along with its schemas
*/
export default class ContractsBuild extends BaseCommand<typeof ContractsBuild> {
static summary = "Builds the contract's optimized WASM file, and its schemas";
static summary = 'Builds the smart contracts optimized Wasm file along with its schemas';
static args = {
contract: ContractNameRequiredArg,
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { Account, Amount, Contract } from '@/types';

/**
* Command 'contracts execute'
* Executes a transaction in a contract.
* Executes a transaction in a smart contract.
*/
export default class ContractsExecute extends BaseCommand<typeof ContractsExecute> {
static summary = 'Executes a transaction in a contract';
static summary = 'Executes a transaction in a smart contract';
static args = {
contract: Args.string({ ...ParamsContractNameRequiredArg, ignoreStdin: true }),
stdinInput: StdinInputArg,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Command } from '@oclif/core';
import Help from '@/plugins/help-plugin/help';

export default class Contracts extends Command {
static summary = 'Display help for the contracts command.';
static summary = 'Display help for the contracts command';

public async run(): Promise<void> {
const help = new Help(this.config, { all: true });
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import { Account, Contract, DeploymentAction, InstantiateDeployment, MetadataDep

/**
* Command 'contracts metadata'
* Sets a contract rewards metadata
* Sets a smart contracts rewards metadata
*/
export default class ContractsMetadata extends BaseCommand<typeof ContractsMetadata> {
static summary = 'Sets a contract rewards metadata';
static summary = 'Sets a smart contracts rewards metadata';
static args = {
contract: ContractNameRequiredArg,
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { Account, Contract, DeploymentAction, InstantiateDeployment, MigrateDepl

/**
* Command 'contracts migrate'
* Runs a contract migration
* Runs a smart contract migration
*/
export default class ContractsMigrate extends BaseCommand<typeof ContractsMigrate> {
static summary = 'Runs a contract migration';
static summary = 'Runs a smart contract migration';
static args = {
contract: Args.string({ ...ParamsContractNameRequiredArg, ignoreStdin: true }),
stdinInput: StdinInputArg,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/contracts/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Prompts } from '@/services';
* Initializes a new smart contract from a template
*/
export default class ContractsNew extends BaseCommand<typeof ContractsNew> {
static summary = 'Scaffolds a new Smart Contract from a template';
static summary = 'Scaffolds a new Wasm smart contract from a template';
static args = {
'contract-name': ContractNameOptionalArg,
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/premium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { Account, Contract, DeploymentAction, InstantiateDeployment, PremiumDepl

/**
* Command 'contracts premium'
* Sets a contract premium flat fee for a contract
* Sets the smart contract premium flat fee
*/
export default class ContractsPremium extends BaseCommand<typeof ContractsPremium> {
static summary = 'Sets a contract premium flat fee for a contract';
static summary = 'Sets the smart contract premium flat fee';
static args = {
contract: ContractNameRequiredArg,
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/contracts/query/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { AccountBalancesJSON, InstantiateDeployment } from '@/types';

/**
* Command 'contracts query balance'
* Access the bank module to query the balance of contracts
* Access the bank module to query the balance of smart contracts
*/
export default class ContractsQuerySmart extends BaseCommand<typeof ContractsQuerySmart> {
static summary = 'Access the bank module to query the balance of contracts';
static summary = 'Access the bank module to query the balance of smart contracts';
static args = {
contract: ContractNameOptionalArg,
};
Expand Down
Loading