Skip to content

TechnicalMembership


Calls


add_member

Add a member who to the set.

May only be called from T::AddOrigin.

Attributes

Name Type
who AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'add_member', {'who': '[u8; 20]'}
)

change_key

Swap out the sending member for some other key new.

May only be called from Signed origin of a current member.

Prime membership is passed from the origin account to new, if extant.

Attributes

Name Type
new AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'change_key', {'new': '[u8; 20]'}
)

clear_prime

Remove the prime member if it exists.

May only be called from T::PrimeOrigin.

Attributes

No attributes

Python

call = substrate.compose_call(
    'TechnicalMembership', 'clear_prime', {}
)

remove_member

Remove a member who from the set.

May only be called from T::RemoveOrigin.

Attributes

Name Type
who AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'remove_member', {'who': '[u8; 20]'}
)

reset_members

Change the membership to a new set, disregarding the existing membership. Be nice and pass members pre-sorted.

May only be called from T::ResetOrigin.

Attributes

Name Type
members Vec<T::AccountId>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'reset_members', {'members': ['[u8; 20]']}
)

set_prime

Set the prime member. Must be a current member.

May only be called from T::PrimeOrigin.

Attributes

Name Type
who AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'set_prime', {'who': '[u8; 20]'}
)

swap_member

Swap out one member remove for another add.

May only be called from T::SwapOrigin.

Prime membership is not passed from remove to add, if extant.

Attributes

Name Type
remove AccountIdLookupOf<T>
add AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'TechnicalMembership', 'swap_member', {
    'add': '[u8; 20]',
    'remove': '[u8; 20]',
}
)

Events


Dummy

Phantom member, never used.

Attributes

No attributes


KeyChanged

One of the members&#x27; keys changed.

Attributes

No attributes


MemberAdded

The given member was added; see the transaction for who.

Attributes

No attributes


MemberRemoved

The given member was removed; see the transaction for who.

Attributes

No attributes


MembersReset

The membership was reset; see the transaction for who the new set is.

Attributes

No attributes


MembersSwapped

Two members were swapped; see the transaction for who.

Attributes

No attributes


Storage functions


Members

The current membership, stored as an ordered Vec.

Python

result = substrate.query(
    'TechnicalMembership', 'Members', []
)

Return value

['[u8; 20]']

Prime

The current prime member, if one exists.

Python

result = substrate.query(
    'TechnicalMembership', 'Prime', []
)

Return value

'[u8; 20]'

Errors


AlreadyMember

Already a member.


NotMember

Not a member.


TooManyMembers

Too many members.