substrate-js-utilities icon indicating copy to clipboard operation
substrate-js-utilities copied to clipboard

SCALE decoding of Compact<u32> wrong

Open brenzi opened this issue 2 years ago • 1 comments

Along https://docs.substrate.io/reference/scale-codec/#fn-1

Compact encoded as 0x1501

should be decoded as decimal 69

but if I use this https://www.shawntabrizi.com/substrate-js-utilities/codec/ with

[
  {
    "nonce": "Compact<u32>"
  }
]

I get 5377

brenzi avatar Mar 28 '24 08:03 brenzi

@brenzi don't have an answer to this one. If you look at my code, I am just funneling the input to Polkadot JS.

It seems it is not registering the compact stuff correctly.

shawntabrizi avatar Mar 28 '24 22:03 shawntabrizi