-
In remix:
This gives back Then I do const metadataABI = [
'bytes32',
'bytes'
];
const data = defaultAbiCoder.decode(metadataABI, "0x101010101010101010101010101010101010101010101010101010101010101000000000000000000000") and error is:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Heya! I don't think it is possible to properly decode all kinds of packed encodings as it is ambigious, take the following example:
How since good and good2 are dynamic lengths, and their lengths are not encoded, there are multiple possible decodings that would encode to the same encoded value. What you can do is:
|
Beta Was this translation helpful? Give feedback.
Heya! I don't think it is possible to properly decode all kinds of packed encodings as it is ambigious, take the following example:
How since good and good2 are dynamic lengths, and their lengths are not encoded, there are multiple possible decodings that would encode to the…