August 2018
Intermediate to advanced
404 pages
11h 19m
English
Structs provide a way to define new types of solidity:
struct Person { }
struct Person { uint16 id; bytes32 fName; bytes32 lName;}
struct Person { uint16 id; bytes32 fName; bytes32 lName; Contact phone;}struct Contact { uint countryCode; uint number;}
You cannot create a struct member with its own type. This helps in limiting the size of the struct to a finite value.
Person owner;Person[] contributors;
contributors[2].fName ...