Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Files

Latest commit

316f786 · Nov 25, 2020

History

History

dashboard

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 1, 2020
Jul 23, 2020
Nov 25, 2020
Sep 17, 2019
Sep 1, 2020
Jul 7, 2020
Aug 24, 2020
Mar 6, 2020
Apr 16, 2020
Sep 1, 2020
Oct 5, 2020
Sep 18, 2020
Oct 5, 2020
Oct 19, 2020
Sep 17, 2019
Jul 27, 2020
Feb 19, 2020
Jun 8, 2020
Oct 19, 2020

dashboard

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Dev hints

In order to execute some transaction you can use exec located in src/utils/transactionExecutor.ts Usage:

import exec from '@/utils/transactionExecutor';

// arguments: from which account, password for account, which action, array of parameters
this.tx = await exec(this.account, this.password, api.tx.democracy.vote, [referendumId, { aye, conviction }]);

Using reactive properties

Some of the properies on the component needs to be automatically updated (currentBlock)

Usage:

<template>
  <div>{{ currentBlock  }}</div>
</template>

<script lang="ts">
// Skipping imports
export default class Summary extends Vue {
  private currentBlock: any = {};
  private subs: any[] = [];
  
  public async mounted() {
    this.subs.push(await api.derive.chain.bestNumber(value => this.currentBlock = value));
  }

  // Unsubscribe before destroying component
  public beforeDestroy() {
    this.subs.forEach((sub) => sub());
  }
}

</script>

Customize configuration

See Configuration Reference.