Types of Voting

Now, let's delve into the various types of voting that can be conducted within our ecosystem. These voting modules are not constrained to adhere strictly to predefined standards outlined earlier. Each voting module is designed with its own unique criteria for voting and execution method, which can be either immediate or delayed.

To facilitate dynamic voting, the first step involves deploying the contract for the respective voting module, followed by adding its address to the node for delegate call functionality.

Delegate call operates similarly to a proxy contract mechanism. Consider two contracts, A and B, where A acts as the proxy for B. This means that any function invoked on contract A will redirect to the corresponding function in contract B. If contract B modifies the state, such as writing information or emitting an event, these actions will be executed on contract A. Consequently, all storage operations and readings are performed on contract A.

Therefore, each voting module contract can remain separate, and as long as its header (function name) conforms to our standard format, namely vote(uint256, address), it will be invoked accordingly.

Last updated