Is it possible to have a
mapping in Solidity with a
hash as key?
mapping (hash => uint) hashToInt;
If not, is there any way to group some information and put it as a key of a
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
hash was an old type that's been replaced with
bytes32. You can call
sha3(data1, data2, ...) and use that as a key.
There's still some open discussion on