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
Context and scope
The ValidatorManager abstract contract holds a lot of useful information in its state (ValidatorManagerStorage), but they are inaccessible to child contracts and users.
I am currently writing a contract that inherits ValidatorManager and I have trouble retrieving such information, e.g. my contract has no knowledge of the current totalWeight of the L1.
It would be very useful to have more getter functions to access variables like:
$._subnetID
$._churnTracker.totalWeight
For the sake of simplicity, it would make sense to make most, if not all, of those variables accessible through getters (if not publicly, at least internally).
Discussion and alternatives
An alternative would be to make _getValidatorManagerStorage()internal but this is not a good practice.
The text was updated successfully, but these errors were encountered:
Context and scope
The
ValidatorManager
abstract contract holds a lot of useful information in its state (ValidatorManagerStorage
), but they are inaccessible to child contracts and users.I am currently writing a contract that inherits
ValidatorManager
and I have trouble retrieving such information, e.g. my contract has no knowledge of the currenttotalWeight
of the L1.It would be very useful to have more getter functions to access variables like:
$._subnetID
$._churnTracker.totalWeight
For the sake of simplicity, it would make sense to make most, if not all, of those variables accessible through getters (if not publicly, at least internally).
Discussion and alternatives
An alternative would be to make
_getValidatorManagerStorage()
internal
but this is not a good practice.The text was updated successfully, but these errors were encountered: