You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our voting strategy accepts encodedVotes as a byte array for processing votes. However, as the platform evolves and more participants create their own vote strategy contracts, the implementation of encodedVotes can vary significantly, making it challenging to maintain a consistent interaction with these contracts.
To address this, I propose introducing a standardized approach using structs to represent votes. By defining a common structure for votes, we can establish a clear and consistent interaction pattern across different vote strategy contracts, promoting interoperability and ease of integration.
The proposal suggests replacing the encodedVotes parameter with an array of Votes structs, as outlined below:
This change allows each vote to be represented as a structured object, providing a clear definition of the recipient, amount, (and any additional payload associated with the vote).
By adopting a common structure for votes, we establish a standard interaction pattern across vote strategy contracts. This simplifies integration efforts for developers and promotes interoperability between different systems.
Also the use of structs enhances code readability and maintainability. It allows for self-documenting code, making it easier for developers to understand and work with the contracts.
We can also think about using structs instead of encoded params in other parts of the contracts.
Feel free to share your thoughts, ideas, and concerns regarding this proposal.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, our voting strategy accepts encodedVotes as a byte array for processing votes. However, as the platform evolves and more participants create their own vote strategy contracts, the implementation of encodedVotes can vary significantly, making it challenging to maintain a consistent interaction with these contracts.
To address this, I propose introducing a standardized approach using structs to represent votes. By defining a common structure for votes, we can establish a clear and consistent interaction pattern across different vote strategy contracts, promoting interoperability and ease of integration.
The proposal suggests replacing the encodedVotes parameter with an array of Votes structs, as outlined below:
This change allows each vote to be represented as a structured object, providing a clear definition of the recipient, amount, (and any additional payload associated with the vote).
By adopting a common structure for votes, we establish a standard interaction pattern across vote strategy contracts. This simplifies integration efforts for developers and promotes interoperability between different systems.
Also the use of structs enhances code readability and maintainability. It allows for self-documenting code, making it easier for developers to understand and work with the contracts.
We can also think about using structs instead of encoded params in other parts of the contracts.
Feel free to share your thoughts, ideas, and concerns regarding this proposal.
Beta Was this translation helpful? Give feedback.
All reactions