GithubHelp home page GithubHelp logo

zeel991 / substrate-node-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from substrate-developer-hub/substrate-node-template

0.0 0.0 0.0 70.58 MB

A new FRAME-based Substrate node, ready for hacking.

License: MIT No Attribution

Shell 0.41% Rust 83.38% Nix 2.39% Dockerfile 1.29% JavaScript 8.74% TypeScript 3.79%

substrate-node-template's Introduction

# Project Name

## Description
This project implements a ticket-based system using the Substrate framework. Each ticket issued is registered on the blockchain, and only authorized accounts can change the ticket state. Once a ticket is used, the authorized account can change the ticket state to "consumed". The logic for this functionality is implemented in a Substrate pallet named "useonce".

## Features
- Ticket registration on the blockchain.
- Authorization mechanism to control ticket state changes.
- State transition from "registered" to "consumed" upon ticket usage.

## Installation
To install and run this project, follow these steps:
  1. Clone the repository:

    git clone https://github.com/zeel991/substrate-node-template.git
  2. Navigate to the project directory:

    cd substrate-node-template
  3. Install dependencies:

    npm install
  4. Build the Pallet:

    cargo build --release
  5. Start the local node:

    ./target/release/node-template --dev
  6. In a second terminal, navigate to the substrate-demo directory:

    cd substrate-demo
  7. Build Yarn:

    yarn build
  8. Run the demo script:

    yarn demo

Usage

To interact with and demonstrate the functionality of the "useonce" pallet, follow these steps:

  1. Import the necessary modules and functions.
  2. Initialize the Substrate client.
  3. Connect to the Substrate node.
  4. Use the provided TypeScript code to perform ticket-related tasks, such as issuing tickets, changing ticket states, and querying ticket information.
  5. Run the TypeScript code to execute the tasks and observe the results.

substrate-node-template's People

Contributors

alfellati avatar alvicsam avatar anderssorby avatar brunopgalvao avatar c410-f3r avatar cab404 avatar chenzongxiong avatar danforbes avatar dependabot[bot] avatar gui1117 avatar h4n0 avatar hamidra avatar jamesbayly avatar jeluard avatar jingnanzhou avatar joshorndorff avatar kaichaosun avatar ltfschoen avatar mordamax avatar nuke-web3 avatar paritytech-ci avatar riusricardo avatar sacha-l avatar sameerdhoot avatar shawntabrizi avatar srslafazan avatar tripleight avatar vyorkin avatar xlc avatar zeel991 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.