For historical reasons, the (DAG-)CBOR encoding of CID types includes a fixed 0x00 leading byte in the bytes portion. This also adds a readCid function.
I wasn't able to find nicer Solidity to slice a byte array, since the slicing syntax is only available for calldata params.
TODO
Unit tests. Can we add simple unit tests that don't involve Rust integration tests?
For historical reasons, the (DAG-)CBOR encoding of CID types includes a fixed
0x00
leading byte in the bytes portion. This also adds areadCid
function.I wasn't able to find nicer Solidity to slice a byte array, since the slicing syntax is only available for calldata params.
TODO
Unit tests. Can we add simple unit tests that don't involve Rust integration tests?
:link: zboto Link