Skip to content

CollatorSelection


Calls


leave_intent

See [Pallet::leave_intent].

Attributes

No attributes

Python

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

register_as_candidate

See [Pallet::register_as_candidate].

Attributes

No attributes

Python

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

set_candidacy_bond

See [Pallet::set_candidacy_bond].

Attributes

Name Type
bond BalanceOf<T>

Python

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

set_desired_candidates

See [Pallet::set_desired_candidates].

Attributes

Name Type
max u32

Python

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

set_invulnerables

See [Pallet::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
None T::AccountId AccountId
None BalanceOf<T> u128

CandidateRemoved

Attributes

Name Type Composition
None T::AccountId AccountId

NewCandidacyBond

Attributes

Name Type Composition
None BalanceOf<T> u128

NewDesiredCandidates

Attributes

Name Type Composition
None u32 u32

NewInvulnerables

Attributes

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

Storage functions


CandidacyBond

Fixed deposit bond for each candidate.

Python

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

Return value

'u128'

Candidates

The (community, limited) collation candidates.

Python

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

Return value

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

DesiredCandidates

Desired number of candidates.

This should ideally always be less than [Config::MaxCandidates] for weights to be correct.

Python

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

Return value

'u32'

Invulnerables

The invulnerable, fixed collators.

Python

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

Return value

['AccountId']

LastAuthoredBlock

Last block authored by collator.

Python

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

Return value

'u32'

Errors


AlreadyCandidate


AlreadyInvulnerable


InvalidProof


NotCandidate


Permission


TooManyCandidates


Unknown