Substrate - Token Curated Registries
The TCR runtime is implemented as a multi-module runtime with following two modules.
- 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.
- 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.
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.
Clone this repository. Inside the directory where you have cloned, run the following commands,
- To build the
WASMruntime for the node (run this first),
- To build the rust code and the node (run this after
cargo build --release
- To start the node
A local Substrate node with the TCR runtime should be up and running at
Step 2 (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,
- Go to the settings page and select
Local Nodein the
remote node/endpoint to connect toinput. Click
Save & Reload.
For further instructions on using the runtime with the Polkadot Apps UI, please see this wiki page in this repository.
The Substrate framework, related libraries and APIs are rapidly evolving. In case this module does not work with the latest Substrate build, please submit an issue in this repo.
You can also try porting the runtime module into a freshly cloned
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 as-is in real applications.