Skip to content

CollatorSelection


Calls


add_invulnerable

Attributes

Name Type
who T::AccountId

Python

call = substrate.compose_call(
    'CollatorSelection', 'add_invulnerable', {'who': 'AccountId'}
)

leave_intent

Attributes

No attributes

Python

call = substrate.compose_call(
    'CollatorSelection', 'leave_intent', {}
)

register_as_candidate

Attributes

No attributes

Python

call = substrate.compose_call(
    'CollatorSelection', 'register_as_candidate', {}
)

remove_invulnerable

Attributes

Name Type
who T::AccountId

Python

call = substrate.compose_call(
    'CollatorSelection', 'remove_invulnerable', {'who': 'AccountId'}
)

set_candidacy_bond

Attributes

Name Type
bond BalanceOf<T>

Python

call = substrate.compose_call(
    'CollatorSelection', 'set_candidacy_bond', {'bond': 'u128'}
)

set_desired_candidates

Attributes

Name Type
max u32

Python

call = substrate.compose_call(
    'CollatorSelection', 'set_desired_candidates', {'max': 'u32'}
)

set_invulnerables

Attributes

Name Type
new Vec<T::AccountId>

Python

call = substrate.compose_call(
    'CollatorSelection', 'set_invulnerables', {'new': ['AccountId']}
)

Events


CandidateAdded

Attributes

Name Type Composition
account_id T::AccountId AccountId
deposit BalanceOf<T> u128

CandidateRemoved

Attributes

Name Type Composition
account_id T::AccountId AccountId

InvalidInvulnerableSkipped

Attributes

Name Type Composition
account_id T::AccountId AccountId

InvulnerableAdded

Attributes

Name Type Composition
account_id T::AccountId AccountId

InvulnerableRemoved

Attributes

Name Type Composition
account_id T::AccountId AccountId

NewCandidacyBond

Attributes

Name Type Composition
bond_amount BalanceOf<T> u128

NewDesiredCandidates

Attributes

Name Type Composition
desired_candidates u32 u32

NewInvulnerables

Attributes

Name Type Composition
invulnerables Vec<T::AccountId> ['AccountId']

Storage functions


CandidacyBond

Python

result = substrate.query(
    'CollatorSelection', 'CandidacyBond', []
)

Return value

'u128'

Candidates

Python

result = substrate.query(
    'CollatorSelection', 'Candidates', []
)

Return value

[{'deposit': 'u128', 'who': 'AccountId'}]

DesiredCandidates

Python

result = substrate.query(
    'CollatorSelection', 'DesiredCandidates', []
)

Return value

'u32'

Invulnerables

Python

result = substrate.query(
    'CollatorSelection', 'Invulnerables', []
)

Return value

['AccountId']

LastAuthoredBlock

Python

result = substrate.query(
    'CollatorSelection', 'LastAuthoredBlock', ['AccountId']
)

Return value

'u32'

Errors


AlreadyCandidate


AlreadyInvulnerable


NoAssociatedValidatorId


NotCandidate


NotInvulnerable


TooFewEligibleCollators


TooManyCandidates


TooManyInvulnerables


ValidatorNotRegistered