From 66b08b374163ef9419e24ecb24fb37c58e749f17 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Wed, 1 Nov 2023 15:47:14 -0500 Subject: [PATCH] Updates to the developer CLI docs (#413) * Updates to the developer CLI docs * Removal of pages no longer needed and removal of content related to Archway CLI v1 * Update the developer cli URL --- .../1.getting-started/1.install.md | 13 +- .../2.developers/1.getting-started/3.setup.md | 2 +- .../2.developer-tools/1.introduction.md | 10 +- .../2.developer-tools/2.developer-cli.md | 47 +++ .../2.developer-cli/1.developer-cli.md | 80 ---- .../2.developer-cli/2.developer-cli-v1.md | 348 ------------------ .../2.developer-cli/3.developer-cli-v2.md | 229 ------------ .../2.developer-tools/3.daemon.md | 11 +- .../3.guides/3.my-first-dapp/1.start.md | 2 +- .../2.setting-up-environment.md | 2 +- .../5.interact-with-contract.md | 4 +- .../4.smart-contracts/11.migrate-dapp.md | 2 +- content/2.developers/7.troubleshoot.md | 4 +- .../3.community/1.wallet-setup/1.overview.md | 2 +- .../3.community/1.wallet-setup/6.dev-setup.md | 2 +- .../3.community/2.staking/5.cli-staking.md | 2 +- 16 files changed, 63 insertions(+), 697 deletions(-) create mode 100644 content/2.developers/2.developer-tools/2.developer-cli.md delete mode 100644 content/2.developers/2.developer-tools/2.developer-cli/1.developer-cli.md delete mode 100644 content/2.developers/2.developer-tools/2.developer-cli/2.developer-cli-v1.md delete mode 100644 content/2.developers/2.developer-tools/2.developer-cli/3.developer-cli-v2.md diff --git a/content/2.developers/1.getting-started/1.install.md b/content/2.developers/1.getting-started/1.install.md index b057fb89..fb54b4bb 100644 --- a/content/2.developers/1.getting-started/1.install.md +++ b/content/2.developers/1.getting-started/1.install.md @@ -100,7 +100,7 @@ npm install -g @archwayhq/cli :: ::alert{variant="info"} -Since the release of [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2), archwayd is no longer a dependency for the Developer CLI. +Since the release of [Archway CLI v2](/developers/developer-tools/developer-cli), **archwayd** is no longer a dependency for the Developer CLI. #title Info :: @@ -110,17 +110,6 @@ Info **archwayd** is an implementation of a Cosmos zone with **wasm** smart contracts enabled, and which adds new modules for developer rewards and for executing **wasm**. -**archwayd** is a dependency for deploying and managing smart contracts on Archway **only if** using the [Archway CLI v1](/developers/developer-tools/developer-cli/developer-cli-v1). - - -::alert{variant="info"} -Docker support for using archwayd in [Archway CLI v1](/developers/developer-tools/developer-cli/developer-cli-v1) has been removed wiith Archway CLI v1.6.0 -#title -Info -:: - - - To build **archwayd**, you can download the latest release, as building **archwayd** from source is not recommended. diff --git a/content/2.developers/1.getting-started/3.setup.md b/content/2.developers/1.getting-started/3.setup.md index 892b3083..909c38df 100644 --- a/content/2.developers/1.getting-started/3.setup.md +++ b/content/2.developers/1.getting-started/3.setup.md @@ -10,7 +10,7 @@ parentSectionPath: /developers A new Archway project is a Rust project that will compile to **wasm** using the **archwayd** binary, which is an implementation of a cosmos zone with **wasm** smart contracts enabled. -Let's set up a new project, using the [Developer CLI](/developers/developer-tools/developer-cli/developer-cli), +Let's set up a new project, using the [Developer CLI](/developers/developer-tools/developer-cli), ## Creating an account diff --git a/content/2.developers/2.developer-tools/1.introduction.md b/content/2.developers/2.developer-tools/1.introduction.md index 36afa8db..1c618e06 100644 --- a/content/2.developers/2.developer-tools/1.introduction.md +++ b/content/2.developers/2.developer-tools/1.introduction.md @@ -8,7 +8,7 @@ parentSectionPath: /developers ## Archway Developer CLI -[Archway's Developer CLI](/developers/developer-tools/developer-cli/developer-cli) is the recommended tool to build, deploy, configure, instantiate, query, and interact with smart contracts. You can find the Archway Developer CLI's github repository here. +[Archway's Developer CLI](/developers/developer-tools/developer-cli) is the recommended tool to build, deploy, configure, instantiate, query, and interact with smart contracts. You can find the Archway Developer CLI's github repository here. There are three core goals of the CLI: @@ -16,12 +16,6 @@ There are three core goals of the CLI: - Deploy, connect and interact with contracts on Archway - Encourage security and best practices for developers - -We recommend testing the [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2) and submit any feedback in the Github Discussion. - - -Go to the [Developer CLI page](/developers/developer-tools/developer-cli/developer-cli) to find more details regarding the different CLI versions. - ## arch3.js [arch3.js](/developers/developer-tools/arch3js/introduction) is a JavaScript library for interacting with the Archway Protocol. `arch3.js` eliminates the need for working with multiple CosmJS clients by extending their functionalities while also complementing it with Archway's unique reward system. The Github's repository of **arch3.js** can be found here. @@ -33,7 +27,7 @@ Go to the [Developer CLI page](/developers/developer-tools/developer-cli/develop The **archwayd** binary is the core implementation of the Archway protocol, and you can find its github repository here. It leverages the Cosmos SDK and CosmWasm to reward validators and creators for their contributions to the network. The command-line interface runs a full-node of Archway and provides utilities for chain genesis, account management (keys), validators, nodes, queries and transactions. ::alert{variant="info"} -Since the release of [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2), archwayd is no longer a dependency for the Developer CLI. +Since the release of [Archway CLI v2](/developers/developer-tools/developer-cli), **archwayd** is no longer a dependency for the Developer CLI. #title Info :: diff --git a/content/2.developers/2.developer-tools/2.developer-cli.md b/content/2.developers/2.developer-tools/2.developer-cli.md new file mode 100644 index 00000000..bfd866f0 --- /dev/null +++ b/content/2.developers/2.developer-tools/2.developer-cli.md @@ -0,0 +1,47 @@ +--- +objectID: developers_developer-tools_developer-cli +title: Developer CLI +description: An overview of Archway Developer CLI commands, options and usage +parentSection: Developers +parentSectionPath: /developers +--- + +# Developer CLI + +The Developer CLI is the recommended tool to build, deploy, configure, instantiate, query, and interact with smart contracts on the Archway blockchain. + +We've introduced version 2 of the CLI, which now boasts a stable release and offers numerous enhancements over its predecessor: +- We've removed **archwayd** as a dependency, facilitating a more straightforward installation and flow. This change also boosts speed and efficiency. +- Commands have been restructured, and new sub-commands have been introduced. +- We've added commands to query and withdraw rewards, ensuring a seamless experience when managing rewards. + + +## Dependencies + +Make sure you've installed and configured all dependencies. For the full +installation and setup instructions, [visit the docs](https://docs.archway.io/developers/getting-started/install). + +- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm "Install Node.js and NPM") +- [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html "Install Cargo") +- [cargo-generate](https://crates.io/crates/cargo-generate "Install Cargo Generate") +- [docker](https://docs.docker.com/get-docker "Install Docker") + +If you are on a Linux machine with a distribution different from Ubuntu, you may need to install the [GNOME Keyring](https://wiki.archlinux.org/title/GNOME/Keyring), or any other keyring compatible with the [Secret service API](https://www.gnu.org/software/emacs/manual/html_node/auth/Secret-Service-API.html). + + +## Installing CLI + +To install the Developer CLI, run the following command: + +::highlight-card + +```bash +npm i -g @archwayhq/cli +``` + +:: + +## Commands + +For a detailed overview of the various commands, refer to the README file in the [Archway CLI repo](https://github.com/archway-network/cli#commands). + diff --git a/content/2.developers/2.developer-tools/2.developer-cli/1.developer-cli.md b/content/2.developers/2.developer-tools/2.developer-cli/1.developer-cli.md deleted file mode 100644 index d50eead8..00000000 --- a/content/2.developers/2.developer-tools/2.developer-cli/1.developer-cli.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -objectID: developers_developer-tools_developer-cli -title: Developer CLI -description: An overview of Archway Developer CLI commands, options and usage -parentSection: Developers -parentSectionPath: /developers ---- - -# Developer CLI - -The Developer CLI is the recommended tool to build, deploy, configure, instantiate, query, and interact with smart contracts. - -There are currently two main releases: - - -- [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2) -- [Archway CLI v1](/developers/developer-tools/developer-cli/developer-cli-v1) - - -The CLI v2 introduces several improvements compared to v1: -- Removal of **archwayd** as a dependency. This enables a simpler installation and flow, as well as enhancing speed and efficiency. -- Commands have been re-organized and new sub-commands have been introduced. -- Commands to query and withdraw rewards have been added, providing for a seamless experience for managing rewards. - - -The Archway CLI v2 is currently in alpha testing. We recommend trying it out and submit any feedback in the Github Discussion. - -## Dependencies - -### Nodejs / Npm - -Make sure to install node node (v18.17.1 or above) and npm. - - -### Docker - - -Docker is needed as a dependency both in CLI v1 and v2, because of the rust optimizer. This is because the optimizer needs to be configured in a way that can run on multiple platforms and generate a valid WASM binary that is supported by the chain. Relying on Docker makes it way easier to control all platform and architecture dependencies required to produce a valid WASM file. - - -Docker is needed only for the rust optimizer (both on CLI v1 and v2), as the docker version of archwayd is not supported anymore from the CLI v1 since v1.6.0. - - - -## Installing CLI v2 (alpha) - -You can install the Developer CLI v2 launching: - -::highlight-card - -```bash -npm i -g @archwayhq/cli@alpha -``` - -:: - -This will install globally the alpha version of the CLI. - -## Installing CLI v1 - -You can install the Developer CLI v1 launching: - -::highlight-card - -```bash -npm install -g @archwayhq/cli -``` - -:: - - - - -::alert{variant="info"} -You can switch between the two versions of the CLI by using the above installation commands. - -#title -Info -:: - diff --git a/content/2.developers/2.developer-tools/2.developer-cli/2.developer-cli-v1.md b/content/2.developers/2.developer-tools/2.developer-cli/2.developer-cli-v1.md deleted file mode 100644 index 2fef2d5e..00000000 --- a/content/2.developers/2.developer-tools/2.developer-cli/2.developer-cli-v1.md +++ /dev/null @@ -1,348 +0,0 @@ ---- -objectID: developers_developer-tools_developer-cli_v1 -title: Developer CLI v1 -description: An overview of the Developer CLI v1 commands, options and usage -parentSection: Developers -parentSectionPath: /developers ---- - -# Developer CLI v1 - -The Developer CLI v1 is the recommended tool to build, deploy, configure, instantiate, query, and interact with smart contracts. - -Anyways, we advise to test the [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2) and provide feedback on the Github Discussion. - -## Installation - -You can take a look at the Github repository and install the Archway developer CLI using npm with: - -::highlight-card - -```bash -npm install -g @archwayhq/cli -``` - -:: - - - - -### Usage - -``` -archway [options] [command] -``` - -### Options - -``` --v, --version output the current version --h, --help display help for command -``` - -### Overview - -``` -accounts [options] List available wallets or add new wallet -build [options] Build the project -config [options] Print or create a config file -instantiate [options] Instantiate a stored contract -deploy [options] Deploy to network, or test deployability -history [options] Print deployments history for the currently selected network -metadata [options] Sets the contract metadata with rewards parameters -network [options] Show network settings or migrate between networks -new [options] [name] Create a new project for Archway network -query [options] [type] Query for data on Archway network -store [options] Stores and verify a contract on-chain -tx [options] Execute a smart contract transaction on Archway network -help [command] display help for command -``` - -## Commands - -### Accounts - -Lists available wallets in your keyring, or add new wallets to your keyring. -::highlight-card - -```bash -archway accounts [options] -``` - -:: -| Option | Example | Description | -| ------------------ | ---------------------------- | ------------------------------------------------- | -| -a, --add \ | `archway accounts -a "main"` | Add a new wallet | -| -k, --docker | `archway accounts -k` | Use the docker version of `archwayd` | -| -h, --help | `archway accounts -h` | Display help for command | - -### Build - -The default **build** command is just a wrapper around **cargo build**. Its default behavior can be modified by editing **config.json** at the root of your project. -::highlight-card - -```bash -archway build [options] -``` - -:: -To build an optimized wasm binary for storage on the blockchain, use the **--optimize** flag. -::highlight-card - -```bash -archway build --optimize -``` - -:: -| Option | Example | Description | -| ---------- | -------------------------- | -------------------------------------------------- | -| -o, --optimize | `archway build --optimize` | Builds an optimized wasm file ready for deployment | -| -h, --help | `archway build -h` | Display help for command | - -::alert{variant="info"} -**Note**: When modifying build behavior from **config.json**, don't try to export variables like `RUST_BACKTRACE=1`, they won't be instanced correctly. To export variables you can create a shell script and set your **config.json** to execute it. -For example with: -```bash -echo "RUST_BACKTRACE=1 && cargo build" > build.sh -``` - -then in **config.json** change **"build": "cargo build",** to **"build": "bash ./build.sh"** -#title -Info -:: - -### Config - -Prints or creates a **config.json** file with your environment settings. -::highlight-card - -```bash -archway config [options] -``` - -:: -| Option | Example | Description | -| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------- | -| -i, --init | `archway config -i` | Initializes a config file for the current project | -| -h, --help | `archway config -h` | Display help for command | - -::alert{variant="info"} -For detailed configuration changes, opening and modifying the **config.json** file with a text editor is preferable. -#title -Info -:: - -### Deploy - -Deploys your contracts to a target network. **archway deploy** progresses through a series of tasks, each of which could be executed as individual commands. The order of these tasks is: - -1. Make wasm: **archway build --optimize** -2. Create on-chain wasm: **archway store** -3. Verify upload integrity: **archway store** -4. Instantiate contract: **archway instantiate** -5. Store deployment log: **archway store** and **archway instatiate** - -Now, let's look at the options available for this command. -::highlight-card - -```bash -archway deploy [options] -``` - -:: - -| Option | Example | Description | -| ------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| -a, --args \ | `archway deploy -a '{}'` | JSON encoded constructor arguments for contract deployment (e.g. `--args '{ "count": 0 }'`) | -| -l, --label \ | `archway deploy -l ` "Archway dApp v1.0.1" | Label used for instantiating the contract | -| --default-label | `archway deploy --default-label` | Use the default label for instantiating the contract. Defaults to: `" "` | -| -f, --from \ | `archway deploy -f "main"` | Name or address of account used to sign transactions | -| --admin-address \ | `archway deploy --admin-address "archway1f3..."` | Address which can perform admin actions on the contract | -| --no-build | `archway deploy --no-build` | Do not build the project before deploying; it will fail if the wasm file is not built | -| --no-store | `archway deploy --no-store` | Do not upload the wasm file on-chain (uses the latest version on config.json) | -| --no-verify | `archway deploy --no-verify` | Do not verify the wasm file uploaded on-chain | -| --no-confirm | `archway deploy --no-confirm` | Skip tx broadcasting prompt confirmation | -| -k, --docker | `archway deploy -k` | Use the docker version of `archwayd` | -| -h, --help | `archway deploy -h` | Display help for deploy command | - -### History - -Convenience command to print transaction history of your project's code uploads, instantiations and metadata. Same as you get by opening **config.json** and looking at the deployments array of the developer object. -::highlight-card - -``` -archway history [options] -``` - -:: -| Option | Example | Description | -| ---------- | -------------------- | -------------------------------- | -| -a, --all | `archway history -a` | Print all deployments history | -| -h, --help | `archway history -h` | Display help for history command | - -### Instantiate - -Instantiate a stored contract. - -``` -archway instantiate [options] -``` - -| Option | Example | Description | -| ------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| -c, --code-id \ | `archway instantiate -c 101` | Code ID for the WASM stored on-chain | -| -a, --args \ | `archway instantiate --args '{}'` | JSON encoded constructor arguments for contract deployment | -| -l, --label \ | `archway instantiate -l "Archway dApp v1.0.0"` | Label to be used for this instantiation of the contract | -| --default-label | `archway instantiate --default-label` | Use the default label for instantiating the contract: "[project_name] [project_version]" | -| -f, --from \ | `archway instantiate --from "main"` | Name or address of account to sign transactions | -| --admin-address \ | `archway instantiate --admin-address "archway1f395..."` | Address which can perform admin actions on the contract (e.g. "archway1...") | -| --no-confirm | `archway instantiate --no-confirm` | Do not prompt for confirmation when broadcasting tx | -| -k, --docker | `archway instantiate -k` | Use the docker version of `archwayd` | -| -h, --help | `archway instantiate -h` | Display help for instantiate command | - -### Metadata - -Sets the contract metadata with rewards parameters. -::highlight-card - -```bash -archway metadata [options] -``` - -:: -| Option | Example | Description | -| ----------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| -c, --contract \ | `archway metadata -c archway1aacn8927t...` | Optional contract address override; defaults to last deployed | -| -f, --from \ | `archway metadata --from "main"` | Name or address of account to sign transactions | -| --owner-address \ | `archway metadata --owner-address "archway1f3..."` | Contract owner address which can change the metadata later on | -| --reward-address \ | `archway metadata --reward-address "archway1f395p0gg67mm..."` | Address that will receive the rewards | -| --no-confirm | `archway metadata --no-confirm` | Do not prompt for confirmation when broadcasting tx | -| --flags \ | `archway metadata --flags "--amount 1"` | Send additional flags to `archwayd` | -| -k, --docker | `archway metadata -k` | Use the docker version of `archwayd` | -| -h, --help | `archway metadata -h` | Display help for metadata command | - -### Network - -Print current network settings or migrate between networks -::highlight-card - -```bash -archway network [options] -``` - -:: -| Option | Example | Description | -| -------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------ | -| -m, --migrate | `archway network -m` | Migrates the project to another network | -| -e, --environment \ | `archway network -m -e "testnet"` | Environment to use for the project (choices: "local", "testnet") | -| -t, --testnet \ | `archway network -m -t "constantine"` | Testnet to use for the project (choices: "constantine", "titus") | -| -h, --help | `archway network -h` | Display help for network command | - -### New - -Create a new project for Archway network. Projects can be created as blank slates or from starter code templates. - -``` -archway new [name] [options] -``` - -| Argument | Example | Description | -| -------- | ---------------------------- | ------------ | -| [name] | `archway new "project-name"` | Project name | - -| Option | Example | Description | -| -------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| -k, --docker | `archway new -k` | Use the docker version of `archwayd` (default: false) | -| --no-docker | `archway new --no-docker` | Use the binary version of `archwayd` | -| -e, --environment \ | `archway new -e "testnet"` | Environment to use for the project (choices: "local", "testnet") | -| -t, --testnet \ | `archway new -t "constantine"` | Testnet to use for the project (choices: "constantine", "titus") | -| --template \ | `archway new --template "increment"` | Project template to use | -| --no-template | `archway new --no-template` | Do not prompt for a project template | -| --build | `archway new --build` | Build the project after setup | -| -h, --help | `archway new -h` | Display help for new command | - -### Query - -Query for data on Archway network -::highlight-card - -```bash -archway query [type] [options] -``` - -:: -| Argument | Example | Description | -| -------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | -| [module] | `archway query contract-state smart` | Query module to use. Available query modules: `code`, `contract`, `contract-history`, `contract-state`, `list-code`, `list-contract-by-code` | -| [type] | `archway query contract-state smart` | Subcommands (if required by query module); available types: `smart`, `code_id`, `all`, `raw` | - -| Option | Example | Description | -| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| \*-a, --args \ | `archway query contract-state smart --args '{"entrypoint_name": {}}'` | JSON encoded arguments for query. Calls a contract's `query` entrypoint. | -| -f, --flags \ | `archway query contract-state smart --args '{"entrypoint_name": {}}' -f '--height 361880'` | Send additional flags to `archwayd` by wrapping in a string; e.g. "`--height 492520 --limit 10`" | -| -c, --contract \ | `archway query contract-state smart --args '{"entrypoint_name": {}}' -c "archway1zh9gzc..."` | Query a specific contract address | -| --raw | `archway query contract-state smart --args '{"entrypoint_name": {}}' -c "archway1zh9gzc..." --raw` | Prints the query response as raw JSON | -| -k, --docker | `archway query contract-state smart --args '{"entrypoint_name": {}}' -k` | Use the docker version of `archwayd` | -| -h, --help | `archway query -h` | Display help for query command | - -`*` = required option - -### Store - -Store and verify a contract on chain. "**Storing**" will upload your optimized wasm binary to the blockchain. "**Verifying**" will download the wasm binary stored on chain, and verify its checksum matches your locally built file. - -``` -archway store [options] -``` - -| Option | Example | Description | -| ------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------- | -| -f, --from \ | `archway store --from "main"` | Name or address of account to sign transactions | -| --no-confirm | `archway store --no-confirm` | Do not prompt for confirmation when broadcasting tx | -| --no-verify | `archway store --no-verify` | Do not verify the wasm file uploaded on-chain | -| --no-store | `archway store --no-store` | Do not upload the wasm file on-chain (uses the latest Code ID in the deployments history of **config.json**) | -| -k, --docker | `archway store -k` | Use the docker version of `archwayd` | -| -h, --help | `archway store -h` | Display help for store command | - -### Tx - -Execute a transaction on Archway network - -``` -archway tx [options] -``` - -| Option | Example | Description | -| ------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------- | -| -c, --contract \ | `archway tx -a '{"entrypoint_name":{}}' -c 'archway1...'` | Optional contract address override; defaults to last deployed | -| -f, --from \ | `archway tx -f "main"` | Name or address of account used to sign transactions | -| -a, --args \ | `archway tx -a '{"entrypoint_name":{}}'` | JSON encoded arguments to execute in transaction; defaults to "{}" | -| --no-confirm | `archway tx --no-confrim` | Skip tx broadcasting prompt confirmation | -| -f, --flags \ | `archway tx -f "--amount 1000uarch"` | Send additional flags to `archwayd` by wrapping in a string; e.g. "--amount 1000uarch" | -| -k, --docker | `archway tx -k` | Use the docker version of `archwayd` | -| -h, --help | `archway tx -h` | Display help for tx command | | - - - - - -## Set contract premium - -You can set up contract premiums (flat fees) with: - -::highlight-card - -``` -archway premium -``` -:: - - - -| Option | Example | Description | -| ------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------- | -| -c, --contract \ | `archway premium --contract "0x1234` | Optional contract address override; defaults to last deployed | -| -f, --from \ | `archway premium -f "main"` | Name or address of account used to sign transactions | -| -a, --args \ | `archway premium --flat-fee "10" Flat fee to set for the contract premium` | Flat fee to set for the contract premium | -| --no-confirm | `archway premium --no-confrim` | Do not prompt for confirmation when broadcasting tx | -| -f, --flags \ | `archway premium --flags --amount 1` |Send additional flags to archwayd (e.g.: --flags --amount 1) diff --git a/content/2.developers/2.developer-tools/2.developer-cli/3.developer-cli-v2.md b/content/2.developers/2.developer-tools/2.developer-cli/3.developer-cli-v2.md deleted file mode 100644 index 66c28454..00000000 --- a/content/2.developers/2.developer-tools/2.developer-cli/3.developer-cli-v2.md +++ /dev/null @@ -1,229 +0,0 @@ ---- -objectID: developers_developer-tools_developer-cli_v2 -title: Developer CLI v2 -description: An overview of Developer CLI v2 commands, options and usage -parentSection: Developers -parentSectionPath: /developers ---- - -# Developer CLI v2 (alpha) - -The Developer CLI v2 introduces several improvements compared to v1: -- Removal of **archwayd** as a dependency. This enables a simpler installation and flow, as well as enhancing speed and efficiency. -- Commands have been re-organized and new sub-commands have been introduced. -- Commands to query and withdraw rewards have been added, providing for a seamless experience for managing rewards. - - -The Archway CLI v2 is currently in alpha testing. We recommend trying it out and submit any feedback in the Github Discussion. - -## Installation - -You can take a look at the Github repository and install the Archway developer CLI using npm with: - -::highlight-card - -```bash -npm i -g @archwayhq/cli@alpha -``` - -:: - -This will install globally the alpha version of the CLI. - - - -## Usage - -``` -new Initializes a new project repository -help Display help for archway. - -accounts - accounts new Adds a new wallet to the keystore - accounts get Displays details about an account - accounts list Lists all accounts in the keyring - accounts remove Removes an account from the keystore - accounts balances get Query the balance of an address or account - accounts balances send Send tokens from an address or account to another - accounts balances Manage the balances of an account. - -config - config init Initializes a config file for the current project. - config show Shows the config file for the current project. - config deployments Displays the list of deployments filtering by chain, action, and contract. - config chains use Updates the archway-cli.json config file with the chain in use information. - config chains export Exports a chain to {project-root}/.archway-cli/chains/{chain-id}.json. - config chains import Import a chain to {project-root}/.archway-cli/chains/{chain-id}.json. - config chains Chain management commands. The chain files follow the Cosmos chain registry schema. - -contracts - contracts new Scaffolds a new Smart Contract from a template - contracts build Builds the contract's optimized WASM file and its schemas - contracts store Stores a WASM file on-chain - contracts instantiate Instantiates code stored on-chain with the given arguments - contracts metadata Sets contract rewards metadata - contracts premium Sets a contract premium flat fee for a contract - contracts execute Executes a transaction in a contract - contracts migrate Runs a contract migration - contracts query balance Access the bank module to query the balance of contracts - contracts query smart Queries a single smart contract - contracts query Display help for the contracts query command. - -rewards - rewards query Queries the outstanding rewards for a specific account or address - rewards withdraw Withdraws rewards for a specific account -``` - -### New -```bash -archway new -``` -Initializes a new project repository. - -`[PROJECT-NAME]` (optional): Name of the new repository. -- `--chain`: ID of the chain. -- `--contract`: Boolean flag to choose if you want to create a contract with the project (defaults to true). -- `--contract-name`: Name of the contract. -- `--template`: Template of the contract to be created with your project. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - - - -### Accounts -```bash - archway accounts -``` - - Manages a local keystore with wallets to sign transactions. - - -```bash - archway accounts balances get - ``` -- `ACCOUNT` (required): Name of the key/account OR a valid bech32 address. -- `--keyring-backend` (default: os): Backend for the keyring (options: test, file, os). -- `--keyring-path`: File-based keyring path. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - -```bash -archway accounts balances send -``` - the transaction. -- `--fee-account`: Account used to pay fees for the transaction instead of the signer. -- `--gas-adjustment` (default: 1.3): Gas adjustment factor. -- `--keyring-backend` (default: os): Backend for the keyring (options: test, file, os). -- `--keyring-path`: File-based keyring path. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - - -### Config -```bash -archway config -``` -Manages configuration settings for your Archway project. - - - - -```bash -archway config deployments -``` -- `--action` (options: store, instantiate, metadata, premium, migrate): Deployment action to filter by. -- `--chain`: ID of the chain. -- `--contract`: Contract name to filter by. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - - -```bash -archway config init -``` -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. -- `--chain`: ID of the chain. - -```bash -archway config chains export -``` -- `CHAIN` (constantine-3, archway-1) (required): ID of the chain. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - -```bash -archway config chains import -``` - -- `[FILE]` (optional): Path to the file to be imported. -- `[STDININPUT]` (optional): Accept input from STDIN. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - - - -### Contracts -```bash -archway contracts -``` -Manages smart contracts on the Archway network. - -```bash -archway contracts premium -``` -- `CONTRACT` (required): Name of the contract. -- `--premium-fee` (required): Token amount for the premium fee. -- `-f, --from`: Signer of the transaction. -- `--no-confirm`: Asks for confirmation before broadcasting the transaction or skips the prompt completely. -- `--fee`: Extra fees to pay along with the transaction. -- `--fee-account`: Account used to pay fees for the transaction instead of the signer. -- `--gas-adjustment` (default: 1.3): Gas adjustment factor. -- `--keyring-backend` (default: os): Backend for the keyring (options: test, file, os). -- `--keyring-path`: File-based keyring path. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - -```bash -archway contracts query smart -``` -- `CONTRACT` (required): Name of the contract. -- `[STDININPUT]` (optional): Accept input from STDIN. -- `--args`: JSON string with the query to run. -- `--args-file`: Path to a JSON file with a query for the smart contract. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - -```bash -archway contracts query balance -``` -- `[CONTRACT]` (optional): Name of the contract. -- `--all`: Shows the balance of all contracts. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. - -### Rewards -```bash -archway rewards -``` - -Manages rewards on the Archway network. - - -```bash -archway rewards withdraw -``` -- `-f, --from`: Signer of the transaction. -- `--no-confirm`: Asks for confirmation before broadcasting the transaction or skips the prompt completely. -- `--fee`: Extra fees to pay along with the transaction. -- `--fee-account`: Account used to pay fees for the transaction instead - - -```bash -archway rewards query -``` -- `ACCOUNT` (required): Name of the key/account OR a valid bech32 address. -- `--keyring-backend` (default: os): Backend for the keyring (options: test, file, os). -- `--keyring-path`: File-based keyring path. -- `--json`: Format output as JSON. -- `--log-level` (options: debug, info, warn, error): Specify level for logging. \ No newline at end of file diff --git a/content/2.developers/2.developer-tools/3.daemon.md b/content/2.developers/2.developer-tools/3.daemon.md index 52b5e24d..5e1d83ec 100644 --- a/content/2.developers/2.developer-tools/3.daemon.md +++ b/content/2.developers/2.developer-tools/3.daemon.md @@ -12,18 +12,11 @@ The Archwayd CLI is a tool that empowers you to interact seamlessly with the Arc The Archwayd CLI is not strictly limited to those running their own nodes. You can engage with the network even without hosting a node personally. You can utilize the Archwayd CLI to submit transactions or probe the network's state via RPC. This opens up opportunities for a variety of users to interact with the Archway blockchain network, making it a versatile tool for a range of operations. -Please note that even if you can use the Archwayd CLI to store, instantiate and manage contracts, it is recommended to use the [Developer CLI](/developers/developer-tools/developer-cli/developer-cli) for these purposes, as it provides a smoother developer experience. +Please note that even if you can use the Archwayd CLI to store, instantiate and manage contracts, it is recommended to use the [Developer CLI](/developers/developer-tools/developer-cli) for these purposes, as it provides a smoother developer experience. ::alert{variant="info"} -Since the release of [Archway CLI v2 (alpha)](/developers/developer-tools/developer-cli/developer-cli-v2), archwayd is no longer a dependency for the Developer CLI. -#title -Info -:: - - -::alert{variant="info"} -Docker support for using archwayd in [Archway CLI v1](/developers/developer-tools/developer-cli/developer-cli-v1) has been removed wiith Archway CLI v1.6.0 +Since the release of [Archway CLI v2](/developers/developer-tools/developer-cli), **archwayd** is no longer a dependency for the Developer CLI. #title Info :: diff --git a/content/2.developers/3.guides/3.my-first-dapp/1.start.md b/content/2.developers/3.guides/3.my-first-dapp/1.start.md index 155edb7f..139fffd0 100644 --- a/content/2.developers/3.guides/3.my-first-dapp/1.start.md +++ b/content/2.developers/3.guides/3.my-first-dapp/1.start.md @@ -24,7 +24,7 @@ In the [Setup](../../1.getting-started/2.setup.md) section we learned how to cre Projects created with **archway new** can use our predefined templates or are start from a blank canvas. For this guide we will be using the Increment template. -If you haven't created a project or selected the 'Increment' starter template, please return to the [Setup](../../1.getting-started/2.setup.md) section to finish this step. Make sure you have the [Archway Developer CLI](/developers/developer-tools/developer-cli/developer-cli) installed. +If you haven't created a project or selected the 'Increment' starter template, please return to the [Setup](../../1.getting-started/2.setup.md) section to finish this step. Make sure you have the [Archway Developer CLI](/developers/developer-tools/developer-cli) installed. Let's build the boilerplate code you have first, and then add code and modify existing behavior. diff --git a/content/2.developers/4.cosmwasm-documentation/2.getting-started/2.setting-up-environment.md b/content/2.developers/4.cosmwasm-documentation/2.getting-started/2.setting-up-environment.md index a818f764..1b83113d 100644 --- a/content/2.developers/4.cosmwasm-documentation/2.getting-started/2.setting-up-environment.md +++ b/content/2.developers/4.cosmwasm-documentation/2.getting-started/2.setting-up-environment.md @@ -20,7 +20,7 @@ We have put together an [Installation](/developers/getting-started/install) guid You can access the Archway networks through the following methods: - Install **archwayd** and interact with the network via the CLI. For an overview of **archwayd**, see [Archwayd CLI](/developers/developer-tools/daemon) -- Use the [Archway Developer CLI](/developers/developer-tools/developer-cli/developer-cli) npm package, which acts as a wrapper around rustc, cargo, archwayd and cosmwasm-rust-optimizer. +- Use the [Archway Developer CLI](/developers/developer-tools/developer-cli) npm package, which acts as a wrapper around rustc, cargo, archwayd and cosmwasm-rust-optimizer. - Building a Javascript app using [arch3.js](/developers/developer-tools/arch3js/introduction) which functions as a wrapper for the CosmosJS library. ## Set up your IDE diff --git a/content/2.developers/4.cosmwasm-documentation/2.getting-started/5.interact-with-contract.md b/content/2.developers/4.cosmwasm-documentation/2.getting-started/5.interact-with-contract.md index 624b472d..2e5fb22a 100644 --- a/content/2.developers/4.cosmwasm-documentation/2.getting-started/5.interact-with-contract.md +++ b/content/2.developers/4.cosmwasm-documentation/2.getting-started/5.interact-with-contract.md @@ -8,7 +8,7 @@ parentSectionPath: /developers/cosmwasm-documentation/introduction # Deployment and interaction -You now have the wasm binary ready. It's time to deploy it to the Archway (Constantine) testnet and begin interacting with your smart contract. You can use the [archwayd CLI](/developers/developer-tools/daemon), [Archway Developer CLI](/developers/developer-tools/developer-cli/developer-cli), or the [arch3.js](/developers/developer-tools/arch3js/introduction), depending on your preference. +You now have the wasm binary ready. It's time to deploy it to the Archway (Constantine) testnet and begin interacting with your smart contract. You can use the [archwayd CLI](/developers/developer-tools/daemon), [Archway Developer CLI](/developers/developer-tools/developer-cli), or the [arch3.js](/developers/developer-tools/arch3js/introduction), depending on your preference. ## Deploy contract @@ -166,7 +166,7 @@ If your contract was created using the **archway new** command, you can deploy t archway store ``` -For details on how to create a CosmWasm project with the [Archway Developer CLI](/developers/developer-tools/developer-cli/developer-cli), see [Creating a project](/developers/getting-started/setup#creating-a-project). +For details on how to create a CosmWasm project with the [Archway Developer CLI](/developers/developer-tools/developer-cli), see [Creating a project](/developers/getting-started/setup#creating-a-project). ## Instantiating the contract You can now create an instance of the wasm contract. After instantiation, you can make queries and execute transactions. diff --git a/content/2.developers/4.cosmwasm-documentation/4.smart-contracts/11.migrate-dapp.md b/content/2.developers/4.cosmwasm-documentation/4.smart-contracts/11.migrate-dapp.md index 22c2109a..b862b3fc 100644 --- a/content/2.developers/4.cosmwasm-documentation/4.smart-contracts/11.migrate-dapp.md +++ b/content/2.developers/4.cosmwasm-documentation/4.smart-contracts/11.migrate-dapp.md @@ -36,7 +36,7 @@ You may need to make adjustments in the smart contracts' code to interact with n ## Update the tool you are using to the correct version First, ensure that the tool you are using is updated to the latest version. This will ensure you have the latest functionalities, including any necessary features for migration. -For example, if you are using the [developer cli](/developers/developer-tools/developer-cli/developer-cli), you can open the terminal shell within the correspondent folder, and launch: +For example, if you are using the [developer cli](/developers/developer-tools/developer-cli), you can open the terminal shell within the correspondent folder, and launch: ::highlight-card ```bash diff --git a/content/2.developers/7.troubleshoot.md b/content/2.developers/7.troubleshoot.md index 614d7733..adc36cae 100644 --- a/content/2.developers/7.troubleshoot.md +++ b/content/2.developers/7.troubleshoot.md @@ -410,7 +410,7 @@ source ~/.profile" Also, you can clean up your environment, so that you know exactly where archwayd is located and avoid complications. -If using the Developer CLI v1, you can try using the [Developer CLI v2](/developers/developer-tools/developer-cli/developer-cli) instead,does not have any dependency on *archwayd*. Also, the CLI v2 provides additional features with a smoother development cycle. +If using the Developer CLI v1, you can try using the [Developer CLI v2](/developers/developer-tools/developer-cli) instead,does not have any dependency on *archwayd*. Also, the CLI v2 provides additional features with a smoother development cycle. @@ -522,7 +522,7 @@ let message = SubMsg::new(WasmMsg::Execute { ### How can i create a CW-20 token on Archway? -You can use the [Developer CLI](/developers/developer-tools/developer-cli/developer-cli), choose the *CW20* template and set the following parameters in the +You can use the [Developer CLI](/developers/developer-tools/developer-cli), choose the *CW20* template and set the following parameters in the Instantiate transaction: ::highlight-card ```rust diff --git a/content/3.community/1.wallet-setup/1.overview.md b/content/3.community/1.wallet-setup/1.overview.md index ae3677e2..1d993dc4 100644 --- a/content/3.community/1.wallet-setup/1.overview.md +++ b/content/3.community/1.wallet-setup/1.overview.md @@ -76,7 +76,7 @@ You can set up your wallet and create an archway address in different ways, incl ### Using developer tools - [archwayd](/developers/getting-started/install#install-archwayd-using-docker) (archway core daemon) -- [Developer CLI](/developers/developer-tools/developer-cli/developer-cli) +- [Developer CLI](/developers/developer-tools/developer-cli) ::alert{variant="info"} Please note that third-party tools are not supported or maintained directly by Archway diff --git a/content/3.community/1.wallet-setup/6.dev-setup.md b/content/3.community/1.wallet-setup/6.dev-setup.md index bfc97ec9..b134609a 100644 --- a/content/3.community/1.wallet-setup/6.dev-setup.md +++ b/content/3.community/1.wallet-setup/6.dev-setup.md @@ -68,7 +68,7 @@ Creating an account with the developer CLI is similar to using the daemon (**arc -1. [install the archway CLI](/developers/developer-tools/developer-cli/developer-cli) +1. [install the archway CLI](/developers/developer-tools/developer-cli) diff --git a/content/3.community/2.staking/5.cli-staking.md b/content/3.community/2.staking/5.cli-staking.md index 210b6fc6..aa8f0b39 100644 --- a/content/3.community/2.staking/5.cli-staking.md +++ b/content/3.community/2.staking/5.cli-staking.md @@ -14,7 +14,7 @@ You can delegate either by using the [archwayd](/developers/developer-tools/daem ### **Requirements** -Install the [developer CLI](/developers/developer-tools/developer-cli/developer-cli) and [create a wallet](/community/wallet-setup/dev-setup) +Install the [developer CLI](/developers/developer-tools/developer-cli) and [create a wallet](/community/wallet-setup/dev-setup) ### **Connecting to the network**