Difference between revisions of "Solidity Terms"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
=Mappings= | =Mappings= | ||
# One way hash function. | # One way hash function. | ||
# Cannot loop through a mapping | |||
# On Demand Data Structure | # On Demand Data Structure | ||
# Hash key then get results | # Hash key then get results | ||
# A hash function is any function that can me bused to map data of arbitrary size to data of fixed size | # A hash function is any function that can me bused to map data of arbitrary size to data of fixed size | ||
contract MappingDemo { | |||
struct Person { | |||
uint id; | |||
bytes32 name; | |||
bool isPerson; | |||
} | |||
mapping(address => Person) p; | |||
} |
Revision as of 15:54, 21 March 2018
Mappings
- One way hash function.
- Cannot loop through a mapping
- On Demand Data Structure
- Hash key then get results
- A hash function is any function that can me bused to map data of arbitrary size to data of fixed size
contract MappingDemo { struct Person { uint id; bytes32 name; bool isPerson; } mapping(address => Person) p;
}