Skip to content

Commit

Permalink
print data attachment rights state
Browse files Browse the repository at this point in the history
  • Loading branch information
jack committed May 29, 2024
1 parent 76a2277 commit 51b3622
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,36 @@ impl Exec for RgbArgs {
);
}
}
if let Ok(allocations) =
contract.data(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" data={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
if let Ok(allocations) =
contract.attachments(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" attachments={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
if let Ok(allocations) =
contract.rights(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" rights={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
if *all {
if let Ok(allocations) = contract
.fungible(owned.name.clone(), &FilterExclude(wallet.wallet().filter()))
Expand All @@ -520,6 +550,36 @@ impl Exec for RgbArgs {
);
}
}
if let Ok(allocations) =
contract.data(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" data={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
if let Ok(allocations) =
contract.attachments(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" attachments={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
if let Ok(allocations) =
contract.rights(owned.name.clone(), &FilterExclude(&runtime))
{
for allocation in allocations {
println!(
" rights={}, utxo={}, witness={}",
allocation.state, allocation.seal, allocation.witness
);
}
}
}
// TODO: Print out other types of state
}
Expand Down

0 comments on commit 51b3622

Please sign in to comment.