Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

A Parity Substrate runtime implementation of a simple Token Curated Registry (TCR)

License

Notifications You must be signed in to change notification settings

gautamdhameja/substrate-tcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substrate - Token Curated Registries

An updated version of the Substrate TCR runtime sample is available at - https://github.com/substrate-developer-hub/tcr-substrate. In favor of that, this repository has been archived.

An implementation of (a subset of) Token Curated Registries (TCR) as a Parity Substrate runtime. Built using substrate-node-template codebase. The full tutorial for this sample can be found here.

The TCR runtime is implemented as a multi-module runtime with following two modules.

  1. tcr.rs - The main module with all curation and initialization functions. The module implements a simple-TCR as described and implemented here. The full TCR functionality in not implemented but only basic curation functions are.
  2. token.rs - Implementation of the modified ERC20 interface to serve as the native token for the TCR module. There are some additional functions implemented for locking and unlocking of tokens.

Usage

Step 0

If you are new to Substrate, please go through the getting started tutorial first. It will give you a sense of how the code is structured in a substrate-node-template and how to get it up and running.

This will also ensure that you have Rust and Substrate installed on your system.

Step 1

Clone this repository. Inside the directory where you have cloned, run the following commands,

  • To build the rust code and the node:
cargo build --release
  • To start the node:
./target/release/substrate-tcr --dev

A local Substrate node with the TCR runtime should be up and running at localhost:9944.

Step 2 (UI)

You can either use the Substrate-TCR-UI to connect with this runtime or you can try it out using the Polkadot Apps UI.

To try it with the Polkadot Apps UI, follow the following steps,

  • Once the local node is running, open the following in your browser,
https://polkadot.js.org/apps/
  • Go to the settings page and select Local Node in the remote node/endpoint to connect to input. Click Save & Reload.

For further instructions on using the runtime with the Polkadot Apps UI, please see this wiki page in this repository.

Disclaimer

This code is just a sample for learning purposes. It is not audited and reviewed for production use cases. You can expect bugs and security vulnerabilities. Do not use it in production or value bearing applications.

About

A Parity Substrate runtime implementation of a simple Token Curated Registry (TCR)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published