πRule and RulesParser
Function and Usage
The Rules Parser library defined several Rules that are extensively covering almost all kinds of activities that a company may encounter during its daily operation, which can be categorized into the following types as per their governing matters: General Governance Rule, Voting Rules, Position Allocation Rules, First Refusal Rules, Grouping Orders and Listing Rules. All these rules are stored in the "World States" in form of bytes32 and can be retrieved from a "key-value" mapping with the structure of "sequence number (uint) -> rule object (bytes32) " in the smart contract of Shareholders Agreement. During the runtime, the Book Keepers can call the Rules Parser to parse the said Rules from the original form of bytes32 into their specific structured objects, from the attributes of which the intended value will be obtained ultimately. Except the General Governance Rule, the beginning 16-bit of the other Rules are defined as their sequence number. However, these sequence numbers are not consecutive, instead, they are segmented with 256 as a group for a specific type of Rules, so as to reserve enough numbers for adding new Rules in future.
Members and Attributes
The Rules Parser library comprehensively defined the data structure, coding method and parsing method for the General Governance Rule, Voting Rules, Position Allocation Rules, First Refusal Rules, Grouping Orders, as well as Listing Rules.
General Governance Rule
Voting Rule
Position Allocation Rule
First Refusal Rule
Grouping Update Order
Listing Rule
Linking Rule
Source Code
Last updated