-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes_on_storage_compatibility.txt
167 lines (151 loc) · 6.44 KB
/
notes_on_storage_compatibility.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/** @dev Storage compatibility
* current version: "history-import branch"
* next version: "multistage-submissions branch"
*
* Data storage of the current and the next versions MUST be compatible
*/
/**** history-import branch ****/
/** LaborLedger */
// Initializable,
bool private initialized; // 0
bool private initializing; // 0
uint256[50] private ______gap; // 1..50
// Constants
// ILaborLedger,
// Erc165Compatible,
// LaborLedgerRoles
Roles.Role private _leads; // 51
Roles.Role private _arbiters; // 52
uint256[10] __gap; // 53..62
// CollaborationAware,
address internal _collaboration; // 63
uint256[10] __gap; // 64..73
// Operators
address private _defaultOperator; // 74
mapping(address => mapping(address => bool)) private _operators; // 75
mapping(address => mapping(address => bool)) private _revokedDefaultOperators; 76
uint256[10] __gap; // 77..86
// LaborRegister
// +++
uint256[11] __gap; // 87..97 - for compatibility with the next version
mapping(address => Member) private _members; // 98
struct Member {
Status status; // 0
uint8 weight; // 1 factor (not index) to convert `time` to `labor`
uint16 startWeek; // 2-3 Week Index of the member first week
uint16 maxTimeWeekly; // 4-5 max Time Units allowed to submit per a week
uint32 time; // 6-9 submitted Time Units
uint32 labor; // 10-13 Labor Units equivalent of `time`
uint96 __gap // 14-25 +++ left for compatibility with the next version
uint32 settledLabor; // 26-29 Labor Units converted in tokens or paid (reserved)
uint16 recentWeeks; // 30-31 packed list of latest submission weeks (see `decodeWeeks`)
}
uint256[10] __gap; // 99..108
// LaborLedgerImpl
Project private _project; // 109
struct Project {
uint32 birthBlock; // block the contract is created within
uint16 startWeek; // Week Index of the project first week
uint32 time; // total submitted hours in Time Units
uint32 __gap; // +++ left for compatibility with the next version
uint32 labor; // total submitted hours in Labor Units
uint48 __gap2; // +++ left for compatibility with the next version
uint32 settledLabor; // Labor Units converted in tokens or paid (reserved)
uint32 weights; // Allowed values for the "weight" (packed uint8[4])
}
uint256[10] __gap; // reserved for upgrades
/** Collaboration */
bool private initialized; // 0
bool private initializing; // 0
uint256[50] private ______gap; // 1.. 50
Roles.Role private _quorums; // 51
Roles.Role private _inviters; // 52
uint256[10] __gap; // 53 .. 62
address private _defaultOperator; // 63
mapping(address => mapping(address => bool)) private _operators; // 64
mapping(address => mapping(address => bool)) private _revokedDefaultOperators; // 65
uint256[10] __gap; // 66 .. 75
mapping (bytes32 => bytes32) private _invites; // 76
uint256[10] __gap; // 77 .. 86
Collaboration internal _collab; // 87
struct Collaboration {
bytes32 uid;
address laborLedger;
address token;
// Equity pools expressed in Share Units (100%=(1)+(2)+(3))
uint32 managerEquity; // (1) management equity pool
uint32 investorEquity; // (2) investor equity pool
uint32 laborEquity; // (3) labor-units-based equity pool
}
uint256[10] __gap;
/**** multistage-submissions branch ****/
/** LaborLedger */
// Initializable,
bool private initialized; // 0
bool private initializing; // 0
uint256[50] private ______gap; // 1..50
// Context,
// Constants,
// ILaborLedger,
// Erc165Compatible,
// LaborLedgerRoles,
Roles.Role private _leads; // 51
Roles.Role private _arbiters; // 52
uint256[10] __gap; // 53..62
// CollaborationAware,
address internal _collaboration; // 63
uint256[10] __gap; // 64..73
// Operators,
address private _defaultOperator; // 74
mapping(address => mapping(address => bool)) private _operators; // 75
mapping(address => mapping(address => bool)) private _revokedDefaultOperators; // 76
uint256[10] __gap; // 77..86
// LaborRegister
mapping (address => mapping (uint16 => Adjustment)) private _adjusts; // 87
uint256[10] __gap; // 88..97
mapping(address => Member) private _members; // 98
struct Member {
Status status;
uint8 weight; // factor (not index) to convert `time` to `labor`
uint16 startWeek; // Week Index of the member first week
uint16 maxTimeWeekly; // max Time Units allowed to submit per a week
uint32 time; // accepted submitted Time Units
uint32 labor; // Labor Units equivalent of `time`
uint16 pendingTime; // not yet accepted submitted Time Units
uint16[8] cache; // Cached latest submissions
}
uint256[10] __gap; // 99..108
// LaborLedgerImpl
Project private _project; // 109
struct Project {
uint32 birthBlock; // block the contract is created within
uint16 startWeek; // Week Index of the project first week
uint32 acceptedTime; // total accepted submitted Time Units
uint32 pendingTime; // total pending submitted Time Units
uint32 acceptedLabor; // total accepted Labor Units
uint32 pendingLabor; // total pending Labor Units
}
/** Collaboration */
bool private initialized;
bool private initializing;
uint256[50] private ______gap;
Roles.Role private _quorums;
Roles.Role private _inviters;
uint256[10] __gap;
address private _defaultOperator;
mapping(address => mapping(address => bool)) private _operators;
mapping(address => mapping(address => bool)) private _revokedDefaultOperators;
uint256[10] __gap;
mapping (bytes32 => bytes32) private _invites;
uint256[10] __gap;
Collaboration internal _collab;
struct Collaboration {
bytes32 uid;
address laborLedger;
address token;
// Equity pools expressed in Share Units (100%=(1)+(2)+(3))
uint32 managerEquity; // (1) management equity pool
uint32 investorEquity; // (2) investor equity pool
uint32 laborEquity; // (3) labor-units-based equity pool
}
uint256[10] __gap;