Skip to content

Commit

Permalink
release v0.11.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Dec 30, 2023
1 parent e7236b0 commit d0565ee
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 56 deletions.
47 changes: 24 additions & 23 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rgb-schemata"
version = "0.11.0-beta.3"
version = "0.11.0-beta.4"
description = "Collection of the official RGB smart contract schemata"
keywords = ["bitcoin", "lightning", "rgb", "smart-contracts", "lnp-bp"]
categories = ["cryptography::cryptocurrencies"]
Expand All @@ -14,10 +14,10 @@ readme = "README.md"

[dependencies]
amplify = "4.5.0"
strict_encoding = "2.6.1"
strict_encoding = "2.6.2"
strict_types = "1.6.3"
aluvm = "0.11.0-beta.2"
bp-core = "0.11.0-beta.2"
bp-core = "0.11.0-beta.3"
rgb-std = { version = "0.11.0-beta.3", features = ["serde", "fs"] }
serde = "1.0"
serde_json = "1.0"
Expand Down
19 changes: 9 additions & 10 deletions examples/rgb20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ use std::convert::Infallible;
use std::fs;

use amplify::hex::FromHex;
use bp::{Outpoint, Tx, Txid};
use bp::Txid;
use rgb_schemata::{nia_rgb20, nia_schema};
use rgbstd::containers::BindleContent;
use rgbstd::interface::{rgb20, ContractBuilder, FilterIncludeAll, FungibleAllocation, Rgb20};
use rgbstd::invoice::{Amount, Precision};
use rgbstd::persistence::{Inventory, Stock};
use rgbstd::resolvers::ResolveHeight;
use rgbstd::stl::{ContractData, DivisibleAssetSpec, RicardianContract, Timestamp};
use rgbstd::validation::{ResolveTx, TxResolverError};
use rgbstd::{Layer1, WitnessAnchor, XAnchor};
use rgbstd::validation::{ResolveWitness, WitnessResolverError};
use rgbstd::{GenesisSeal, WitnessAnchor, WitnessId, XAnchor, XChain, XPubWitness};
use strict_encoding::StrictDumb;

struct DumbResolver;

impl ResolveTx for DumbResolver {
fn resolve_bp_tx(&self, _: Layer1, _: Txid) -> Result<Tx, TxResolverError> {
Ok(Tx::strict_dumb())
impl ResolveWitness for DumbResolver {
fn resolve_pub_witness(&self, _: WitnessId) -> Result<XPubWitness, WitnessResolverError> {
Ok(XPubWitness::strict_dumb())
}
}

Expand All @@ -38,10 +38,9 @@ fn main() {
media: None,
};
let created = Timestamp::now();
let beneficiary = Outpoint::new(
Txid::from_hex("14295d5bb1a191cdb6286dc0944df938421e3dfcbf0811353ccac4100c2068c5").unwrap(),
1
);
let beneficiary_txid =
Txid::from_hex("14295d5bb1a191cdb6286dc0944df938421e3dfcbf0811353ccac4100c2068c5").unwrap();
let beneficiary = XChain::Bitcoin(GenesisSeal::tapret_first_rand(beneficiary_txid, 1));

const ISSUE: u64 = 1_000_000_000_00;

Expand Down
19 changes: 9 additions & 10 deletions examples/rgb21.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::fs;
use amplify::confinement::SmallBlob;
use amplify::hex::FromHex;
use amplify::Wrapper;
use bp::{Outpoint, Tx, Txid};
use bp::Txid;
use rgb_schemata::{uda_rgb21, uda_schema};
use rgbstd::containers::BindleContent;
use rgbstd::interface::rgb21::{Allocation, EmbeddedMedia, OwnedFraction, TokenData, TokenIndex};
Expand All @@ -13,15 +13,15 @@ use rgbstd::invoice::Precision;
use rgbstd::persistence::{Inventory, Stock};
use rgbstd::resolvers::ResolveHeight;
use rgbstd::stl::{self, DivisibleAssetSpec, RicardianContract, Timestamp};
use rgbstd::validation::{ResolveTx, TxResolverError};
use rgbstd::{Layer1, WitnessAnchor, XAnchor};
use rgbstd::validation::{ResolveWitness, WitnessResolverError};
use rgbstd::{GenesisSeal, WitnessAnchor, WitnessId, XAnchor, XChain, XPubWitness};
use strict_encoding::StrictDumb;

struct DumbResolver;

impl ResolveTx for DumbResolver {
fn resolve_bp_tx(&self, _: Layer1, _: Txid) -> Result<Tx, TxResolverError> {
Ok(Tx::strict_dumb())
impl ResolveWitness for DumbResolver {
fn resolve_pub_witness(&self, _: WitnessId) -> Result<XPubWitness, WitnessResolverError> {
Ok(XPubWitness::strict_dumb())
}
}

Expand All @@ -37,10 +37,9 @@ fn main() {
let spec = DivisibleAssetSpec::new("TEST", "Test uda", Precision::Indivisible);
let terms = RicardianContract::default();
let created = Timestamp::now();
let beneficiary = Outpoint::new(
Txid::from_hex("623554ac1dcd15496c105a27042c438921f2a82873579be88e74d7ef559a3d91").unwrap(),
0
);
let beneficiary_txid =
Txid::from_hex("14295d5bb1a191cdb6286dc0944df938421e3dfcbf0811353ccac4100c2068c5").unwrap();
let beneficiary = XChain::Bitcoin(GenesisSeal::tapret_first_rand(beneficiary_txid, 1));

let fraction = OwnedFraction::from_inner(1);
let index = TokenIndex::from_inner(2);
Expand Down
19 changes: 9 additions & 10 deletions examples/rgb25.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::convert::Infallible;
use std::fs;

use amplify::hex::FromHex;
use bp::{Outpoint, Tx, Txid};
use bp::Txid;
use rgb_schemata::{cfa_rgb25, cfa_schema};
use rgbstd::containers::BindleContent;
use rgbstd::interface::{rgb25, ContractBuilder, FilterIncludeAll, FungibleAllocation};
Expand All @@ -12,16 +12,16 @@ use rgbstd::resolvers::ResolveHeight;
use rgbstd::stl::{
Attachment, ContractData, Details, MediaType, Name, RicardianContract, Timestamp,
};
use rgbstd::validation::{ResolveTx, TxResolverError};
use rgbstd::{Layer1, WitnessAnchor, XAnchor};
use rgbstd::validation::{ResolveWitness, WitnessResolverError};
use rgbstd::{GenesisSeal, WitnessAnchor, WitnessId, XAnchor, XChain, XPubWitness};
use sha2::{Digest, Sha256};
use strict_encoding::StrictDumb;

struct DumbResolver;

impl ResolveTx for DumbResolver {
fn resolve_bp_tx(&self, _: Layer1, _: Txid) -> Result<Tx, TxResolverError> {
Ok(Tx::strict_dumb())
impl ResolveWitness for DumbResolver {
fn resolve_pub_witness(&self, _: WitnessId) -> Result<XPubWitness, WitnessResolverError> {
Ok(XPubWitness::strict_dumb())
}
}

Expand Down Expand Up @@ -51,10 +51,9 @@ fn main() {
media,
};
let created = Timestamp::now();
let beneficiary = Outpoint::new(
Txid::from_hex("623554ac1dcd15496c105a27042c438921f2a82873579be88e74d7ef559a3d91").unwrap(),
0
);
let beneficiary_txid =
Txid::from_hex("14295d5bb1a191cdb6286dc0944df938421e3dfcbf0811353ccac4100c2068c5").unwrap();
let beneficiary = XChain::Bitcoin(GenesisSeal::tapret_first_rand(beneficiary_txid, 1));

const ISSUE: u64 = 1_000_000_000_000;

Expand Down

0 comments on commit d0565ee

Please sign in to comment.