#traits #module #balance #account-balance #supply #issuance #stp258

no-std dev stp258-serp

Fungible SERP stablecoins module that implements SettCurrency, SerpMarket,and SerpTes` traits

1 unstable release

0.5.3 Mar 28, 2021

#6 in #supply


Used in 4 crates

Apache-2.0 and GPL-3.0-or-later…

105KB
2.5K SLoC

Setheum Tokenization Protocol 258 - SERP

Multi-Currency Stablecoin SERP Module

Overview

The stp258 module provides fungible multiple stable currencies functionality that implements SettCurrency traits, the SerpTes trait and the SerpMarket trait that enables the Serping up and down of the currencies supply through Setheum's serping technology for currency supply elasticity.

The stp258 module provides functions for:

  • Querying and setting the balance of a given account.
  • Getting and managing total issuance.
  • Balance transfer between accounts.
  • Depositing and withdrawing balance.
  • Slashing an account balance.
  • Minting and Burning currencies.
  • Expanding and Contracting Supply of Currencies by Serping

Acknowledgement & Reference

This Pallet is inspired by the ORML Tokens Pallet developed by Open Web3 Stack, for reference check The ORML Repo.

Test & Build

Run cargo build to build. Run cargo test to test.

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install toolchain
  uses: actions-rs/toolchain@v1
  with:
    profile: minimal
    toolchain: nightly-2021-02-17
    target: wasm32-unknown-unknown
    default: true
- name: Install Wasm toolchain
  run: rustup target add wasm32-unknown-unknown
- name: Install clippy
  run: rustup component add clippy
- name: Build
  run: cargo build --verbose
- name: Run tests
  run: cargo test --verbose

Dependencies

~77MB
~1.5M SLoC