https://github.com/stephanfward/rust-pegged-cryptocurrency
A simple pegged cryptocurrency using Rust and the Substrate blockchain framework
https://github.com/stephanfward/rust-pegged-cryptocurrency
Last synced: 11 months ago
JSON representation
A simple pegged cryptocurrency using Rust and the Substrate blockchain framework
- Host: GitHub
- URL: https://github.com/stephanfward/rust-pegged-cryptocurrency
- Owner: StephanFWard
- License: gpl-3.0
- Created: 2023-12-18T15:20:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T16:38:39.000Z (over 2 years ago)
- Last Synced: 2023-12-18T18:56:33.042Z (over 2 years ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-pegged-cryptocurrency
A simple pegged cryptocurrency using Rust and the Substrate blockchain framework
# Pegged Cryptocurrency Example with Substrate and Rust
This example demonstrates the implementation of a pegged cryptocurrency using the Substrate blockchain framework and Rust programming language.
## Overview
The pegged cryptocurrency allows users to mint new tokens by depositing an equivalent amount in the reserve and burn tokens to withdraw the corresponding amount from the reserve. The example is a basic demonstration and should be extended for a production environment.
## Getting Started
### Prerequisites
- Rust: [Install Rust](https://www.rust-lang.org/tools/install)
- Substrate: [Install Substrate](https://substrate.dev/docs/en/knowledgebase/getting-started/)
### Building and Running
1. **Clone the repository:**
```
git clone https://github.com/StephanFWard/rust-pegged-cryptocurrency.git
cd rust-pegged-cryptocurrency
2. **Build the project:**
```
cargo build --release
3. **Run the substrate node:**
```
./target/release/rust-pegged-cryptocurrency --dev
4. **Interact with the node using the Substrate UI or Polkadot JS Apps.**
Mint new tokens:
```
./target/release/rust-pegged-cryptocurrency mint
5. **Burn tokens:**
```
./target/release/rust-pegged-cryptocurrency burn
6. **Run tests using:**
```
cargo test
License
This project is licensed under general public use.