Skip to content

Slots


Calls


clear_all_leases

See [Pallet::clear_all_leases].

Attributes

Name Type
para ParaId

Python

call = substrate.compose_call(
    'Slots', 'clear_all_leases', {'para': 'u32'}
)

force_lease

See [Pallet::force_lease].

Attributes

Name Type
para ParaId
leaser T::AccountId
amount BalanceOf<T>
period_begin LeasePeriodOf<T>
period_count LeasePeriodOf<T>

Python

call = substrate.compose_call(
    'Slots', 'force_lease', {
    'amount': 'u128',
    'leaser': 'AccountId',
    'para': 'u32',
    'period_begin': 'u32',
    'period_count': 'u32',
}
)

trigger_onboard

See [Pallet::trigger_onboard].

Attributes

Name Type
para ParaId

Python

call = substrate.compose_call(
    'Slots', 'trigger_onboard', {'para': 'u32'}
)

Events


Leased

A para has won the right to a continuous set of lease periods as a parachain. First balance is any extra amount reserved on top of the para&#x27;s existing deposit. Second balance is the total amount reserved.

Attributes

Name Type Composition
para_id ParaId u32
leaser T::AccountId AccountId
period_begin LeasePeriodOf<T> u32
period_count LeasePeriodOf<T> u32
extra_reserved BalanceOf<T> u128
total_amount BalanceOf<T> u128

NewLeasePeriod

A new [lease_period] is beginning.

Attributes

Name Type Composition
lease_period LeasePeriodOf<T> u32

Storage functions


Leases

Amounts held on deposit for each (possibly future) leased parachain.

The actual amount locked on its behalf by any account at any time is the maximum of the second values of the items in this list whose first value is the account.

The first item in the list is the amount locked for the current Lease Period. Following items are for the subsequent lease periods.

The default value (an empty list) implies that the parachain no longer exists (or never existed) as far as this pallet is concerned.

If a parachain doesn't exist yet but is scheduled to exist in the future, then it will be left-padded with one or more Nones to denote the fact that nothing is held on deposit for the non-existent chain currently, but is held at some point in the future.

It is illegal for a None value to trail in the list.

Python

result = substrate.query(
    'Slots', 'Leases', ['u32']
)

Return value

[(None, ('AccountId', 'u128'))]

Constants


LeaseOffset

The number of blocks to offset each lease period by.

Value

0

Python

constant = substrate.get_constant('Slots', 'LeaseOffset')

LeasePeriod

The number of blocks over which a single period lasts.

Value

604800

Python

constant = substrate.get_constant('Slots', 'LeasePeriod')

Errors


LeaseError

There was an error with the lease.


ParaNotOnboarding

The parachain ID is not onboarding.