Giter Site home page Giter Site logo

lsaul / substrate-package Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shawntabrizi/substrate-package

0.0 1.0 0.0 52.53 MB

Known working releases of the Substrate Node Template, Substrate Module Template, and Substrate UI.

License: The Unlicense

HTML 2.21% JavaScript 44.28% Rust 53.19% Shell 0.31%

substrate-package's Introduction

Substrate Package

A stable, known working version of the Substrate Node Template, Substrate Module Template, and Substrate Front End Template.

What is this?

  • The fastest way to get started building on Substrate.
  • Compatible with the latest documentation available for Substrate runtime module development.
  • Using Substrate commit: d1cd01c74e8d5550396cb654f9a3f1b641efdf4c
  • Using Polkadot-JS API version: ^0.95.0-beta.21

How to use it:

  • Run git clone https://github.com/substrate-developer-hub/substrate-package.git.

  • Run cd substrate-package.

  • Run curl https://getsubstrate.io -sSf | bash -s -- --fast

    • This installs external dependencies needed for substrate. Take a look at the script.
    • The --fast command allows us to skip the cargo install steps for substrate and subkey, which is not needed for runtime development.
    • Windows users need to follow instructions here instead
  • Go into the substrate-node-template folder and run:

    ./scripts/init.sh
    cargo build --release
    ./target/release/node-template --dev

    The above process may take 30 minuites or so, depending on your hardware. This should start your node, and you should see blocks being created.

  • Go into the substrate-front-end-template folder and run:

    yarn install
    yarn start

    This should start a web server on localhost:3000 where you can interact with your node.

  • Go into the substrate-module-template folder:

    • Read HOWTO.md
    • Edit /src/lib.rs to create a custom Substrate runtime module
    • Add dependencies to Cargo.toml with the appropriate rev
  • Interact with your node and hack away!

What is the Substrate Module Template?

The substrate-module-template is a template where you can start building your own runtime module as it's own independent crate.

This is an alternative from writing your module in substrate-node-template/runtime/src/template.rs, where you would not be able to easily share your runtime module after your are done. We recommend development in the substrate-module-template if you want to allow others to include your runtime module into their Substrate node.

Instructions for using the substrate-module-template are included with the project.

We have added the Substrate module template as a dependency to the substrate-node-template, but if you want to remove it, you will need to:

  1. Remove references from the runtime Cargo.toml file.
  2. Remove references from the runtime lib.rs file.

How was it made?

This project simply clones the individual templates in a single place where they are tested to be compatible with one another.

git clone https://github.com/substrate-developer-hub/substrate-node-template
git clone https://github.com/substrate-developer-hub/substrate-module-template
git clone https://github.com/substrate-developer-hub/substrate-front-end-template

Why do I need substrate-package?

Substrate is a rapidly evolving platform, which means that breaking changes may occur on a day to day basis. Most of the times, these breaking changes do not radically change how substrate works, but may affect how Substrate is organized, the name of functions, the name of modules, etc...

The substrate-package repository tries to help solve these problems by taking a snapshot of substrate when it is known to be working and compatible with these different resources:

  • Documentation
  • Tutorials
  • Samples
  • User Interfaces
  • etc...

substrate-package's People

Contributors

bddap avatar jamesray1 avatar jimmychu0807 avatar joshorndorff avatar ltfschoen avatar nikvolf avatar shawntabrizi avatar

Watchers

 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.