File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,33 @@ func testQuery(f *globalFlags) {
278
278
fmt .Printf ("Assets: %s\n " , assetsJson )
279
279
}
280
280
}
281
+ case "utxo-whole-result" :
282
+ utxos , err := o .LocalStateQuery ().Client .GetUTxOWhole ()
283
+ if err != nil {
284
+ fmt .Printf ("ERROR: failure querying UTxO whole: %s\n " , err )
285
+ os .Exit (1 )
286
+ }
287
+
288
+ for utxoId , utxo := range utxos .Results {
289
+ fmt .Println ("---" )
290
+ fmt .Printf ("UTxO ID: %s#%d\n " , utxoId .Hash .String (), utxoId .Idx )
291
+ fmt .Printf ("Address: %x\n " , utxo .Address ())
292
+ fmt .Printf ("Amount: %d\n " , utxo .Amount ())
293
+
294
+ assets := utxo .Assets ()
295
+ if assets != nil {
296
+ fmt .Printf ("Assets: %+v\n " , assets )
297
+ }
298
+
299
+ datum := utxo .Datum ()
300
+ if datum != nil {
301
+ if cborData := datum .Cbor (); cborData != nil {
302
+ fmt .Printf ("Datum CBOR: %x\n " , cborData )
303
+ } else {
304
+ fmt .Printf ("Datum present (error decoding)" )
305
+ }
306
+ }
307
+ }
281
308
default :
282
309
fmt .Printf ("ERROR: unknown query: %s\n " , queryFlags .flagset .Args ()[0 ])
283
310
os .Exit (1 )
Original file line number Diff line number Diff line change @@ -596,7 +596,10 @@ func (u *UtxoId) MarshalCBOR() ([]byte, error) {
596
596
/*
597
597
result [{* utxo => value }]
598
598
*/
599
- type UTxOWholeResult any
599
+ type UTxOWholeResult struct {
600
+ cbor.StructAsArray
601
+ Results map [UtxoId ]ledger.BabbageTransactionOutput
602
+ }
600
603
601
604
// TODO (#863)
602
605
type DebugEpochStateResult any
You can’t perform that action at this time.
0 commit comments