Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Latest commit

 

History

History
187 lines (114 loc) · 7 KB

FEATURES.md

File metadata and controls

187 lines (114 loc) · 7 KB

Plugin features

In this file, you will find the main features of the Substrate plugin.

Features

This extension provides the following features to enhance your experience in developing with substrate:

  1. Manage nodes and connections
    1. Add node
    2. Start local node
    3. Stop local node
    4. Clear chain data
    5. Edit types
    6. Connect to node
    7. Edit node
    8. Remove node
    9. Configure devcontainer
    10. Reopen in container
    11. Disconnect from node
  2. Manage accounts
    1. Add account
    2. Create account
    3. Import account
    4. Change name of account
    5. Copy address of account
    6. Export account
    7. Remove account
  3. Execute extrinsics
    1. Execute extrinsic
    2. Show webview with extrinsics
  4. Subscribe to storage
    1. Subscribe to chain data
  5. Smart contracts
    1. Upload wasm
    2. Deploy contract
    3. Add existing code
    4. Add existing contract
    5. Forget code hash
    6. Forget contract
    7. Copy hash
    8. Call contract method

After installation of this extension, you will get language support for Rust to Visual Studio Code (with RLS). Supports:

  • code completion
  • jump to definition, peek definition, find all references, symbol search
  • types and documentation on hover
  • code formatting
  • refactoring (rename, deglob)
  • error squiggles and apply suggestions from errors
  • snippets
  • build tasks

How to use

Click on the icon of Substrate in the sidebar menu. If there no icon - RMB click on the sidebar and select show plugin.

Commands

List of all available commands of the plugin:

That command will add node to the plugin storage, after that you will be able to connect to it and execute extrinsics and subscribe for data.

That command will run script in VSCode terminal (in local directory) to start local node in development mode.

That command will stop local node and close the VSCode terminal. If no running terminal with node - it will ignore the execution of the command.

That command will run the purge-chain script in VSCode terminal. If no running terminal - it will ignore the execution of the command.

That command will open for editing the file with global @polkadot/api types. For now, it's the single available opportunity to connect to nodes with custom types.

Connect to node #panel-item

That command will connect to the node with provided url and show all available extrinsics and storage states.

Edit node #panel-item

That command will edit the node's name and url.

Remove node #panel-item

That command will remove the node from plugin storage.

Configure devcontainer #panel-navigation

That command will create .devcontainer directory in the root of the workspace and add devcontainer.json with Dockerfile files for the container development.

Reopen in container #panel-navigation

That command will call Reopen in Container command from Remote-Containers extension.

Disconnect from node #panel-navigation

That command will disconnect from the node.

Add account #panel-navigation

That command will add a new account with key and seed provided by user.

Create account #panel-navigation

That command will create a new account. It will automatically generate raw seed or mnemonic seed (depending on user choice) and ask password to encrypt account keyring.

Import account #panel-navigation

That command will import an account from .json file.

Change name of account #panel-item

That command will change the name of the account in plugin storage. Name is stored in metadata of keyring.

Copy address of account #panel-item

That command will copy the address of the account to clipboard.

Export account #panel-item

That command will export the account to a file according to the path entered by the user.

Remove account #panel-item

That command will remove the account from plugin storage.

Execute extrinsic #panel-item

That command will execute and sign the extrinsic with provided arguments and account key.

Show webview with extrinsics #panel-navigation

That command will show the webview in new document with all available extrinsics of active node.

Subscribe to chain data #panel-item

That command will show the webview in new document with automatically updated data from the substrate storage.

Upload wasm #panel-navigation

That command will upload wasm code to substrate node.

Deploy contract #panel-navigation

That command will deploy contract to substrate node.

Add existing code #panel-navigation

That command will add code without execution of extrinsic to put code.

Add existing contract #panel-navigation

That command will add contract without execution of extrinsic to deploy contract.

Forget code hash #panel-item

That command will remove the code hash from plugin storage.

Forget contract #panel-item

That command will remove the contract from plugin storage.

Copy hash #panel-item

That command will copy the hash of contract or code.

Call contract method #panel-item

That command will will show contract available methods and after select will execute extrinsic.

Tags

Here is a list of tags with their descriptions/meanings:

#directory-with-substrate-project - you need to be in a directory with substrate project to execute the command.

#panel-navigation - you can find the command on the panel's navigation.

#panel-item - to run the command you have to right mouse click at the item on the corresponding panel.