Does anyone know how to retrieve validators elected for the new era ?
Thanks a lot !
Through the runtime call grandpaApi -> grandpaAuthorities() which queries the current state of the authority set.
Returns the authority session keys associated with grandpa, as described here.
If you want to know the validator stash accounts associated with staking, you can use:
Session::Validators
: current validators.Session::QueuedKeys
: set of next validators.Through the runtime call grandpaApi -> grandpaAuthorities() which queries the current state of the authority set.