I am attempting to store a hash (web3.sha3) into an array in a smart contract.
What is the best way to do that?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
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.