Skip to content

Latest commit

 

History

History
112 lines (78 loc) · 2.74 KB

lnpbp-0030.md

File metadata and controls

112 lines (78 loc) · 2.74 KB
LNPBP: 0030
Aliases: RGB30
Vertical: Smart contracts
Title: Interface for fungible RGB assets with decentralized issue (RGB-30)
Authors: Dr Maxim Orlovsky <orlovsky@lnp-bp.org>
Comments-URI: <https://github.com/LNP-BP/LNPBPs/discussions/140>
Status: Proposal
Type: Standards Track
Created: 2021-06-23
Updated: 2023-07-24
Finalized: ~
Copyright: (0) public domain
License: CC0-1.0

Abstract

Background

Motivation

Design

Specification

Interface specification is the following Contractum code:

-- Defined by LNPBP-31 standard in `RGBContract.sty` file
import urn:ubideco:stl:6vbr9ZrtsD9aBjo5qRQ36QEZPVucqvRRjKCPqE8yPeJr#choice-little-boxer as RGBContract

interface RGB30
    -- Asset specification containing ticker, name, precision etc.
    global spec :: RGBContract.DivisibleAssetSpec

    global data :: RGBContract.ContractData
    global created :: RGBContract.Timestamp

    -- Ownership right over assets
    owned assetOwner* :: RGBContract.Amount

    -- Point for applying state extensions
    valency issueRight

    genesis       -> spec, terms, issueRight

    op Transfer    :: previous assetOwner+
                   -> beneficiary assetOwner+
                   !! nonEqualAmounts

    op PegIn       :: issueRight
                    , reserves RGBContract.ProofOfReserves
                   -> beneficiary assetOwner+, issuedSupply
                   !! supplyMismatch
                    | insufficientReserves
                    | invalidProof(RGBContract.ProofOfReserves)

Compatibility

Rationale

Include from

Reference implementation

https://github.com/RGB-WG/rgb-wallet/blob/master/std/src/interface/rgb20.rs

Acknowledgements

References

Copyright

This document is licensed under the Creative Commons CC0 1.0 Universal license.

CC0
To the extent possible under law, LNP/BP Standards Association has waived all copyright and related or neighboring rights to this work.