Reputation: 1482
For example what does this mean? I think it's just syntax for a hashMap but not sure.
address chairperson;
mapping(address => Voter) voters;
Proposal[] proposals;
Upvotes: 0
Views: 505
Reputation: 66857
This is what solidity calls mappings. Depending on your programming background you may refer to them as hashes, dictionaries, associative arrays or similar.
This is the general form:
mapping(_KeyType => _ValueType)
So in your case you'll have a variable voters
, which maps addresses to Voter
instances.
Upvotes: 4