substrate-knowledge-map

Lab 7 - Using Polkadot JS API

Overview

In this lab, you will put your Polkadot JS API knowledge to practice by completing a series of excerices using the CLI to interact with the Polkadot JS API and a Substrate node.

Read through the task and submit your lab results as per the instructions under Submission Instructions.

Task

Open 07-js-component/index.js. There are six places marked with TODO with null assignment. Update the assignment to use Polkadot-JS API to retrieve the proper value.

Most return values from Polkadot-JS API are Promises, so use await to get the resolved values.

Start the Substrate Node Template locally before running this script. If all assignments have been updated properly, you will be able to run the script with no error message by:

yarn install
yarn start

Submission Instructions

Put the answer (updated script) in /your-lab-ans/07. Commit the code and push to the remote repository. Please submit:

  1. The link to your repository at the branch and directory level for this lab.

  2. Screenshots of showing the result of running the script. The output maybe longer than one screen. Please capture all of them and name them as 01.png, 02.png, etc.