Mappings and Solidity Contract Flashcards
1
Q
mapping(_KeyType => _ValueType)
A
defines a way to assign values to keys. Similar to arrays, but keys can be any. type and do not have a predefined range. Very flexible
2
Q
_KeyType
A
can be almost any type except for a mapping, a dynamically sized array, a contract, an enum and a struct
3
Q
_ValueType
A
can actually be any. type, including mappings
4
Q
Contract
A
a collection of codes (fuctions) and data (states) located at a specific address on the Etherum blockchain
5
Q
Contract is similar to
A
a class in object-oriented language