paritytech / desub

Decode Substrate with Backwards-Compatible Metadata
GNU General Public License v3.0
39 stars 13 forks source link

debug output of ValueDef doesn't show type structure #84

Open gilescope opened 2 years ago

gilescope commented 2 years ago

Which of these nodes is a Variant or a Primitive or a Composite or Named or Unnamed? I can guess... but it would be nice if the debug helped more by pointing out what ValueDef it is. It's not easy to match on stuff.

V1 (
    Value {
        value:  {
            parents: Value {
                value: U8(
                    0,
                ),
                context: TypeId(
                    2,
                ),
            },
            interior: Value {
                value: X1 (
                    Value {
                        value: Parachain (
                            Value {
                                value: U32(
                                    2012,
                                ),
                                context: TypeId(
                                    114,
                                ),
                            },
                        ),
                        context: TypeId(
                            113,
                        ),
                    },
                ),
                context: TypeId(
                    112,
                ),
            },
        },
        context: TypeId(
            111,
        ),
    },
)