Created
April 21, 2020 04:36
-
-
Save caseyjkey/f6a736a93ebcdef141a72e584775711a to your computer and use it in GitHub Desktop.
ComplexStorage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.21 <0.7.0; | |
contract ComplexStorage { | |
mapping (address => Group) public userToGroup; | |
Group[] public groupArray; | |
Group public singleGroup; | |
struct Group { | |
string name; | |
uint8 members; | |
} | |
constructor() public { | |
address address1 = 0x5EE68F3BFa0b2cc8b1bED1e457F6825466dd6221; | |
address address2 = 0xaee905FdD3ED851e48d22059575b9F4245A82B04; | |
userToGroup[address1] = Group("Pay Pals", 4); | |
userToGroup[address2] = Group("Hollowsesh", 3); | |
singleGroup = Group("808 Mafia", 15); | |
groupArray.push(userToGroup[address1]); | |
groupArray.push(userToGroup[address2]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment