0

I am attempting to store a hash (web3.sha3) into an array in a smart contract.

What is the best way to do that?

0

The question is a little unclear, but are you asking the datatype to store it in? Do you want to store the individual bytes of the hash into different slots in an array? If so, use the bytes datatype. If you want to store an array of sha3 hashes, you should use a bytes32[] array and store the hashes at different indexes in the array.

If you need more information, consider editing your question to add specific needs you have.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.