Coder Social home page Coder Social logo

orml-workshop's Introduction

Open Runtime Module Library (ORML) Workshop

Sub0 Workshop Link: https://www.crowdcast.io/e/axvfinsv/19

This is a workshop project for learning about blockchain runtime development with Substrate, FRAME and the Open Runtime Module Library. This project implements a simple exchange protocol that is built on top of the ORML Currencies and Tokens pallets. After completing this workshop, participants should have a better understanding of how to design and implement a FRAME pallet.

It is recommanded to read commit by commit to understand each individual steps.

Add ORML Pallets

Find the implementations for the Currencies and Tokens pallets in the runtime. Notice that the Tokens pallet is configured with a CurrencyId set that specifies a native token; the Currencies pallet is configured to depend on the Tokens pallet.

Define an Exchange Protocol

The Exchange pallet defines a simple interface that depends on the ORML pallets that were configured in the previous step:

  • submit_order(from_id, from_amt, to_id, to_amt)
  • take_order(order_id)
  • cancel_order(order_id)

Build & Run

If you need to, set up your Substrate development environment. Then, build and run a development chain:

$ cargo run -- --dev --tmp

Once the node is running, use this link to open the Polkadot JS Apps UI and connect to the Substrate node: https://polkadot.js.org/apps/#/settings/developer?rpc=ws://127.0.0.1:9944. Use the Settings > Developer app and the contents of the types.json file to add the necessary types to the UI.

Upstream

This project was forked from the Substrate Developer Hub Node Template.

orml-workshop's People

Contributors

xlc avatar danforbes avatar baidang201 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.