Skip to content

Commit

Permalink
chore: release v0.11.0-beta.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Mar 29, 2024
1 parent 5d5d37a commit b0ea08b
Show file tree
Hide file tree
Showing 18 changed files with 3,250 additions and 664 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ default-members = [
resolver = "2"

[workspace.package]
version = "0.11.0-beta.4"
version = "0.11.0-beta.5"
authors = ["Dr Maxim Orlovsky <orlovsky@lnp-bp.org>"]
homepage = "https://github.com/RGB-WG"
repository = "https://github.com/RGB-WG/rgb-std"
Expand Down Expand Up @@ -60,7 +60,7 @@ strict_types = { workspace = true }
commit_verify = { workspace = true }
bp-core = { workspace = true }
rgb-core = { workspace = true }
rgb-invoice = { version = "0.11.0-beta.4", path = "invoice" }
rgb-invoice = { version = "0.11.0-beta.5", path = "invoice" }
baid58 = { workspace = true }
base85 = "=2.0.0"
chrono = "0.4.31"
Expand Down
75 changes: 75 additions & 0 deletions RGB20.con
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
@version(v1)
interface RGB20
global burnedSupply(*): RGBContract.Amount
global issuedSupply(+): RGBContract.Amount
global replacedSupply(*): RGBContract.Amount
global spec: RGBContract.AssetSpec
global terms: RGBContract.AssetTerms

owned assetOwner(*): Zk64
public burnEpoch(?): Rights
public burnRight(*): Rights
public inflationAllowance(*): Zk64
public updateRight(?): Rights

error supplyMismatch: 1
"supply specified as a global parameter doesn't match the issued supply allocated to the asset owners"
error nonEqualAmounts: 2
"the sum of spent assets doesn't equal to the sum of assets in outputs"
error invalidProof: 3
"the provided proof is invalid"
error insufficientReserves: 4
"reserve is insufficient to cover the issued assets"
error insufficientCoverage: 5
"the claimed amount of burned assets is not covered by the assets in the operation inputs"
error issueExceedsAllowance: 6
"you try to issue more assets than allowed by the contract terms"

genesis: final
errors: supplyMismatch, invalidProof, insufficientReserves
meta: RGBContract.IssueMeta
globals: issuedSupply, spec, terms
assigns: assetOwner(*), burnEpoch(?), inflationAllowance(*), updateRight(?)

transition burn: final
errors: supplyMismatch, invalidProof, insufficientCoverage
meta: RGBContract.BurnMeta
globals: burnedSupply
assigns: burnRight(?)
inputs: burnRight

transition issue: final
errors: supplyMismatch, invalidProof, insufficientReserves, issueExceedsAllowance
meta: RGBContract.IssueMeta
globals: issuedSupply
assigns: assetOwner(*), inflationAllowance(*)
default: assetOwner
inputs: inflationAllowance(+)

transition openEpoch: final
errors:
assigns: burnEpoch(?), burnRight
default: burnRight
inputs: burnEpoch

transition rename: final
errors:
globals: spec
assigns: updateRight(?)
default: updateRight
inputs: updateRight

transition replace: final
errors: supplyMismatch, nonEqualAmounts, invalidProof, insufficientCoverage
meta: RGBContract.BurnMeta
globals: replacedSupply
assigns: assetOwner(*), burnRight(?)
default: assetOwner
inputs: burnRight

transition transfer: required, default, final
errors: nonEqualAmounts
assigns: assetOwner(+)
default: assetOwner
inputs: assetOwner(+)

63 changes: 63 additions & 0 deletions RGB21.con
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@version(v1)
interface RGB21
global attachmentTypes(*): RGB21.AttachmentType
global engravings(*): RGB21.EngravingData
global spec: RGBContract.AssetSpec
global terms: RGBContract.AssetTerms
global tokens(*): RGB21.TokenData

owned assetOwner(*): RGB21.Allocation
public inflationAllowance(*): RGB21.ItemsCount
public updateRight(?): Rights

error fractionOverflow: 1
"the amount of fractional token in outputs exceeds 1"
error nonEqualValues: 2
"the sum of spent token fractions doesn't equal to the sum of token fractions in outputs"
error invalidProof: 3
"the provided proof is invalid"
error insufficientReserves: 4
"reserve is insufficient to cover the issued assets"
error issueExceedsAllowance: 6
"you try to issue more assets than allowed by the contract terms"
error nonFractionalToken: 7
"attempt to transfer a fraction of non-fractionable token"
error nonEngravableToken: 8
"attempt to engrave on a token which prohibit engraving"
error invalidAttachmentType: 9
"attachment has a type which is not allowed for the token"

genesis: final
errors: fractionOverflow, invalidProof, insufficientReserves, invalidAttachmentType
meta: RGBContract.IssueMeta
globals: attachmentTypes(*), spec, terms, tokens(*)
assigns: assetOwner(*), inflationAllowance(*), updateRight(?)

transition engrave: final
errors: fractionOverflow, nonEqualValues, nonFractionalToken, nonEngravableToken
globals: engravings
assigns: assetOwner(+)
default: assetOwner
inputs: assetOwner(+)

transition issue: final
errors: fractionOverflow, invalidProof, insufficientReserves, issueExceedsAllowance, invalidAttachmentType
meta: RGBContract.IssueMeta
globals: attachmentTypes(*), tokens(*)
assigns: assetOwner(*), inflationAllowance(*)
default: assetOwner
inputs: inflationAllowance(+)

transition rename: final
errors:
globals: spec
assigns: updateRight
default: updateRight
inputs: updateRight

transition transfer: required, default, final
errors: fractionOverflow, nonEqualValues, nonFractionalToken
assigns: assetOwner(+)
default: assetOwner
inputs: assetOwner(+)

48 changes: 48 additions & 0 deletions RGB21@0.1.0.sta
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
-----BEGIN STRICT TYPE LIB-----
Id: urn:ubideco:stl:9GETUAH3q2Aw4JSiCzGy4Z8bTuagKQvPa4hH4mDxcX9d#type-economy-shannon
Name: RGB21
Dependency: pvPyTM1N1rG9HEAvvEgqKonnMdakHreYrvGWfFff8q6#atlanta-adrian-sonata
Dependency: DzTvt9gGhPUKD8Dkkjk9PDBhkJ4gtWxXWQjxnmUYLNrs#voyage-kimono-disco
Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy
Checksum-SHA256: facfa1880a6adbd9e1ab28c4f22b8eb03d28f763aa6263b930737ff60497ba0b

1yV;sGBE=TMyyqiM?p8!jNDm;%M^9TR7RT9MDn!3%{^){AA<1<Qb$5VZ*FvQVPkZ
`1k6TWEM#tEO?YD!yU6acy5+5>Uo2?YlHei-0Jn$(Q*>nYY!hN5_Bp3Y36tDMM#=
e#tGI($UA5U3KNx<*C>ja}LTPkkZ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OfmAZf|a700001
1aog~WdH>M0t`m1RgOnNH`9#VS%u3Kb;ndjn$tw`w870iYB3*z@ea}&I~j%e^<Nt
Q$0i+BA8V^i@&?VsNd3!~x5P*Z%?ea+Yh`XpZe(S61pxp61O

-----END STRICT TYPE LIB-----

Binary file added RGB21@0.1.0.stl
Binary file not shown.
68 changes: 68 additions & 0 deletions RGB21@0.1.0.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{-
Id: urn:ubideco:stl:9GETUAH3q2Aw4JSiCzGy4Z8bTuagKQvPa4hH4mDxcX9d#type-economy-shannon
Name: RGB21
Version: 0.1.0
Description: Types for RGB21 interface
Author: Dr Maxim Orlovsky <orlovsky@lnp-bp.org>
Copyright (C) 2023-2024-2024 LNP/BP Standards Association. All rights reserved.
License: Apache-2.0
-}

@context
typelib RGB21

import RGBContract#pvPyTM1N1rG9HEAvvEgqKonnMdakHreYrvGWfFff8q6#atlanta-adrian-sonata
use ProofOfReserves#liquid-owner-london
use MimeChar#golf-antonio-courage
use Details#network-kayak-adam
use Name#crystal-visitor-tribune
use MediaType#pixel-venice-grille
use Ticker#mike-atlas-store
use MediaRegName#sulfur-chant-vampire
use Attachment#giraffe-carol-carrot

import Std#DzTvt9gGhPUKD8Dkkjk9PDBhkJ4gtWxXWQjxnmUYLNrs#voyage-kimono-disco
use AsciiPrintable#diet-oxford-window
use AlphaCapsNum#magnet-section-latin

import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy
use Vout#chrome-robin-gallop
use Txid#cowboy-diego-betty
use Outpoint#dinner-yoga-danube


@mnemonic(break-tunnel-gray)
data Allocation : TokenIndex, OwnedFraction

@mnemonic(source-change-period)
data AttachmentName : [Std.AsciiPrintable#diet-oxford-window ^ 1..0x14]

@mnemonic(boston-cake-susan)
data AttachmentType : id U8, name AttachmentName

@mnemonic(castle-dynamic-lemon)
data EmbeddedMedia : type RGBContract.MediaType#pixel-venice-grille, data [Byte]

@mnemonic(royal-career-axiom)
data EngravingData : appliedTo TokenIndex, content EmbeddedMedia

@mnemonic(capital-conduct-aspect)
data ItemsCount : U32

@mnemonic(vital-edgar-quota)
data OwnedFraction : U64

@mnemonic(cinema-gordon-judo)
data TokenData : index TokenIndex
, ticker RGBContract.Ticker#mike-atlas-store?
, name RGBContract.Name#crystal-visitor-tribune?
, details RGBContract.Details#network-kayak-adam?
, preview EmbeddedMedia?
, media RGBContract.Attachment#giraffe-carol-carrot?
, attachments {U8 -> ^ ..0x14 RGBContract.Attachment#giraffe-carol-carrot}
, reserves RGBContract.ProofOfReserves#liquid-owner-london?

@mnemonic(connect-farmer-havana)
data TokenIndex : U32


42 changes: 42 additions & 0 deletions RGB25.con
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@version(v1)
interface RGB25
global burnedSupply(*): RGBContract.Amount
global details(?): RGBContract.Details
global issuedSupply: RGBContract.Amount
global name: RGBContract.Name
global precision: RGBContract.Precision
global terms: RGBContract.AssetTerms

owned assetOwner(+): Zk64
public burnRight(*): Rights

error supplyMismatch: 1
"supply specified as a global parameter doesn't match the issued supply allocated to the asset owners"
error nonEqualAmounts: 2
"the sum of spent assets doesn't equal to the sum of assets in outputs"
error invalidProof: 3
"the provided proof is invalid"
error insufficientReserves: 4
"reserve is insufficient to cover the issued assets"
error insufficientCoverage: 5
"the claimed amount of burned assets is not covered by the assets in the operation inputs"

genesis: final
errors: supplyMismatch, invalidProof, insufficientReserves
meta: RGBContract.IssueMeta
globals: details(?), issuedSupply, name, precision, terms
assigns: assetOwner(+)

transition burn: final
errors: supplyMismatch, invalidProof, insufficientCoverage
meta: RGBContract.BurnMeta
globals: burnedSupply
assigns: burnRight(?)
inputs: burnRight

transition transfer: required, default, final
errors: nonEqualAmounts
assigns: assetOwner(+)
default: assetOwner
inputs: assetOwner(+)

47 changes: 47 additions & 0 deletions RGBContract@0.1.0.sta
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-----BEGIN STRICT TYPE LIB-----
Id: urn:ubideco:stl:pvPyTM1N1rG9HEAvvEgqKonnMdakHreYrvGWfFff8q6#atlanta-adrian-sonata
Name: RGBContract
Dependency: DzTvt9gGhPUKD8Dkkjk9PDBhkJ4gtWxXWQjxnmUYLNrs#voyage-kimono-disco
Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy
Checksum-SHA256: aad0db48245417d4de015cb78c633d1d049021daddc5bf02d7f67d9acaabba04

3sOfyLvL<$a$#e10>K2#MqVsrZe&e(V->r|?y|b&t*2isXxNhAA_oAshyzn}Wc6$
lVk7oBr%DNv+($;q`HHK!gIHa)*%m(-e#9sm3I{@IbYpL6ZUP5FX>?<6X>J1mA>%
$n#j0HLDJN5-IKgM_J7b(p+0MPGk2Gl)y2(Rz1Xgc#bfbbo^UK%K(4i9Ajp1M~R@
C@!4#dQE#lUD;OiKi1Rs>XdX=LbXK+Rkw`Mu(V|7oQWGN(Z+AyvH&RuaL#<Ajx9#
RdpZb#!oVX>N1_Q*>kk01IqT4U{HCV*7Ex=yZ4kc9pbbVOY8BQJvP*estVa^A16C
V`*tna%paKVPb4$U=_gU2V|-Aisv2FNXqmBTmS3ZV(<42$azAB_>m7m3_)ygXkkN
PaC1&|Z4UqjL2Yk!Zgd3!000OHL349ubW?C;V+I5UbZKL2WpV+4SFQ*2dy+cL#Wo
+$K-npR=t1{a-C411d)vtBzL}*2ZeeX@0Z<eWUkpGd$`Y%tH+|x7jy#}XjniyMKG
zRN8C=se)CXi`bYW?1a{vSa00eGtZe;)f009JZZ*64&1pxs+D{{BQuNq?vw$uLzi
?1~hlkP@ao_$9uVE}^UN!R2FaB^j1X>)0BZUJ2b#21aJj($Hn^F!mAeRLol5%ecA
&%UCtOO8MBUm^-Yb8}^MRAq8)a|QwgbY*yS0T|1aZxWNw7!I9y+{RnQn@2DI{;m7
<jj@=_gDCb(0R?SkWNBdl1OfmAZf|a7000011aog~WdH>M0k$9KS5Dx9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*bgX>4q11PWtiZggo)X>4q11qE$sV{&f>3
1nqsX-#Qka&HF;V`Xl1X-#Qka&HI(Zeeb32?%6mV`)xdZf^<+V`Xl1X-;8oZwmx)
X=85;2xMhrX;5inZw(1!Wo~q7P-$at4h3dqZFFxB31nqsX+~vjbZ-y}V`Xl1X+~v
jbZ-#^VRUqF5)V*vZ*OK#W>RHyWpZ|9a|Qwgb#!=d0`+VYVk7oBr%DNv+($;q`HH
K!gIHa)*%m(-e#9sm3g~J;&0Hn<z2b!bX{8Y|r$H+rRlN>Y62ZUYgq2{$1_f|(Z*
OJ*2mk;;0000000000|Nj60000005mISmVRB??VQxcjZgg^CV{`=p00;m9000000
0000|Nj600000022^QdYh`i;0RRXB!34}kUMys8WKDQu6}!mpvbyE1r(Y~+*plEP
2LQK-U=_gU2V|-Aisv2FNXqmBTmS3ZV(<42$azAB_>m7m0RR91000002mk;80000
0

-----END STRICT TYPE LIB-----

Binary file added RGBContract@0.1.0.stl
Binary file not shown.
Loading

0 comments on commit b0ea08b

Please sign in to comment.