Open Aniket-Engg opened 6 years ago
You are right, it's not possible to store the entire ipfs hash in a bytes32 type. An ipfs hash is 34 bytes, you can however strip the first two bytes and store the rest of the data, then you could store the first two bytes as part of the key, or you could just assume the first two bytes since they are 1220
in most cases.
@oed Yes, it would be great if this can be updated in README
In the readme, i found this:
let value = 'myValue' // a string (bytes32), the data you want to register. // Could be an ipfs hash for example.
I visited : https://ethereum.stackexchange.com/questions/24545/how-to-store-and-load-an-ipfs-hash-as-bytes32-in-contract-written-in-solidityIs it possible to add an IPFS hash in byte32 type?