#currency #native #module #standard #traits #serp #stp258

no-std stp258-standard

Provide Stp258Standard implementation using pallet-balances and stp258-serp

4 releases

0.5.3 Mar 28, 2021
0.5.2 Mar 28, 2021
0.5.1 Mar 28, 2021

#81 in #currency


Used in 2 crates

Apache-2.0

43KB
1K SLoC

Setheum Tokenization Protocol 258 Standard

Multi-Currency Stablecoin SERP Module built on top of Stp258Serp and SerpTraits.

Overview

The STP258 Standard module provides a mixed stablecoin system, by configuring a native currency which implements Stp258AssetExtended, and a multi-currency which implements Stp258Currency.

This module is built on the STP-258 Serp implementing the SERP Traits.

Implementations

The stp258 module provides implementations for following traits.

  • Stp258Currency - Abstraction over a fungible multi-currency stablecoin system.
  • Stp258CurrencyExtended - Extended Stp258Currency with additional helper types and methods, like updating balance by a given signed integer amount.

Interface

Dispatchable Functions

  • transfer - Transfer some balance to another account, in a given currency.
  • transfer_native_currency - Transfer some balance to another account, in native currency set in Config::Stp258Native.
  • update_balance - Update balance by signed integer amount, in a given currency, root origin required.

Acknowledgement & Reference

This Pallet is built on STP258 Serp pallet.

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

Dependencies

~10–20MB
~284K SLoC