Skip to content

Commit

Permalink
examples: fix RGB21 token printout
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jun 14, 2023
1 parent fec2f3c commit 69128a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Binary file modified examples/rgb21-simplest.contract.rgb
Binary file not shown.
7 changes: 1 addition & 6 deletions examples/rgb21-token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bp::{Chain, Outpoint, Tx, Txid};
use rgb_schemata::{uda_rgb21, uda_schema};
use rgbstd::containers::BindleContent;
use rgbstd::interface::rgb21::{Allocation, EmbeddedMedia, OwnedFraction, TokenData, TokenIndex};
use rgbstd::interface::{rgb21, ContractBuilder, FungibleAllocation};
use rgbstd::interface::{rgb21, ContractBuilder};
use rgbstd::persistence::{Inventory, Stock};
use rgbstd::resolvers::ResolveHeight;
use rgbstd::stl::{self, DivisibleAssetSpec, Precision, RicardianContract, Timestamp};
Expand Down Expand Up @@ -96,10 +96,5 @@ fn main() {
// Reading contract state through the interface from the stock:
let contract = stock.contract_iface(contract_id, rgb21().iface_id()).unwrap();
let nominal = contract.global("spec").unwrap();
let allocations = contract.fungible("beneficiary").unwrap();
eprintln!("{}", nominal[0]);

for FungibleAllocation { owner, witness, value } in allocations {
eprintln!("(amount={value}, owner={owner}, witness={witness})");
}
}

0 comments on commit 69128a7

Please sign in to comment.