Skip to content

Update cli.md #24

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions docs/build/swanky/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ In the last step, you'll be provided a list of files to be copied over and you'l
<Figure caption="Confirming the file list" src={require('../img/swanky/init-convert-confirm.png').default} width="65%" />

:::note
Swanky will look for a common ink! configuration, and will do it's best to copy everything to equivalent paths, but it is likely that you'll have to adjust some configs and import paths manually after conversion.
Swanky will look for a common ink! configuration, and will do its best to copy everything to equivalent paths, but it is likely that you'll have to adjust some configs and import paths manually after conversion.
:::

_Resources:_
Expand Down Expand Up @@ -232,7 +232,7 @@ You can get more information on ink! E2E test framework in the [ink! documentati
A contract template will provide you with a simple test as well, which you can use as a starting point.

The tests utilize [@polkadot/api](https://polkadot.js.org/docs/api/) library, and contract types generated by [typechain-polkadot](https://github.com/727-Ventures/typechain-polkadot).
The types are generated during the compile step and copied to `typedContract/contract_nae` directory, and in the `tests/*/artifacts/` directory. If you need only the types generated
The types are generated during the compile step and copied to `typedContract/contract_name` directory, and in the `tests/*/artifacts/` directory. If you need only the types generated
(if you for example deleted or edited them), you can do that without going through the whole compilation step by using `swanky contract typegen` command.

Running `swanky contract test CONTRACT_NAME` will detect all `*.test.ts` files in the `tests/contract_name/` directory, and run them sequentially, or in all directories inside `tests/` if you pass the `-a`/`--all` flag.
Expand Down Expand Up @@ -292,7 +292,7 @@ If the message you're calling requires arguments to be passed, you can do that u

<Figure caption="Calling a transaction on a contract" src={require('../img/swanky/contract-tx.png').default} width="65%"/>

Result of a `query` is straight forward, `OK` followed by what ever the response is.
Result of a `query` is straightforward, `OK` followed by whatever the response is.

The transaction (`tx`) is a bit more raw though. Important to note are the `dispatchError` and `internalError` fields, plus the `status` field.
If the errors are `undefined`, and the status `finalized`, your transaction has been successful.
Expand Down Expand Up @@ -352,7 +352,7 @@ _Resources:_

## Using plugins

Swanky CLI's functionality can be extended by the use of plugins, and it's a way to add new, case specific commands without modifying the core codebase.
Swanky CLI's functionality can be extended by the use of plugins, and its a way to add new, case specific commands without modifying the core codebase.

One WIP example is the [Phala plugin](https://github.com/inkdevhub/swanky-plugin-phala)

Expand Down