Does anyone know how to retrieve validators elected for the new era ?
Thanks a lot !
Substrate and Polkadot Stack Exchange is a question and answer site for developers building blockchains with the Substrate SDK. It only takes a minute to sign up.
Sign up to join this communityThrough 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.