Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate validator manager utilities #595

Open
cam-schultz opened this issue Oct 14, 2024 · 0 comments
Open

Consolidate validator manager utilities #595

cam-schultz opened this issue Oct 14, 2024 · 0 comments
Labels

Comments

@cam-schultz
Copy link
Contributor

Context and scope
Many of the utility functions in validator_manager.go perform identical actions for PoA, PoS ERC20, and PoS Native token validator managers. The same functionality is split into different functions so that the ABI and types from the proper package in abi-bindings can be referenced. This results in a lot of repeated code that should be cleaned up.

Discussion and alternatives
Converting the utilities to use generics, or implementing a common interface in abi-bindings seem like two strategies likely to succeed. One (potentially) complicating factor is that the three generated concrete types in abi-bindings share many of the same inner type definitions defined in the parent Solidity contract (e.g. erc20tokenstakingmanager.PoSValidatorManagerSettings and nativetokenstakingmanager.PoSValidatorManagerSettings are identical)

Open questions
Questions that are still being discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog 🗄️
Development

No branches or pull requests

1 participant