FEATURES.md
September 30, 2019 ยท View on GitHub
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:
- Manage nodes and connections
- Manage accounts
- Execute extrinsics
- Subscribe to storage
- Smart contracts
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:
Add node #panel-navigation
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.
Start local node #directory-with-substrate-project
That command will run script in VSCode terminal (in local directory) to start local node in development mode.
Stop local node #directory-with-substrate-project
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.
Clear chain data #directory-with-substrate-project
That command will run the purge-chain script in VSCode terminal. If no running terminal - it will ignore the execution of the command.
Edit types #panel-navigation
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.