Newer
Older
No weight available.
```rust
code: Vec<u8>
```
Set the new runtime code without doing any checks of the given `code`.
Note that runtime upgrades will not run if this is called with a not-increasing spec
version!
#### set_storage - 4
<details><summary><code>set_storage(items)</code></summary>
Taking 5.4867 % of a block.
```rust
items: Vec<KeyValue>
```
Set some items of storage.
#### kill_storage - 5
<details><summary><code>kill_storage(keys)</code></summary>
Taking 5.4797 % of a block.
```rust
keys: Vec<Key>
```
Kill some items from storage.
#### kill_prefix - 6
<details><summary><code>kill_prefix(prefix, subkeys)</code></summary>
Taking 6.4024 % of a block.
prefix: Key
</details>
Kill all storage items with a key that starts with the given prefix.
**NOTE:** We rely on the Root origin to provide us the number of subkeys under
the prefix we are removing to accurately calculate the weight of this function.
#### authorize_upgrade - 9
<details><summary><code>authorize_upgrade(code_hash)</code></summary>
Taking 0.0105 % of a block.
```rust
code_hash: T::Hash
```
Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
later.
This call requires Root origin.
#### authorize_upgrade_without_checks - 10
<details><summary><code>authorize_upgrade_without_checks(code_hash)</code></summary>
No weight available.
```rust
code_hash: T::Hash
```
</details>
Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
later.
WARNING: This authorizes an upgrade that will take place without any safety checks, for
example that the spec name remains the same and that the version number increases. Not
recommended for normal use. Use `authorize_upgrade` instead.
This call requires Root origin.
#### apply_authorized_upgrade - 11
<details><summary><code>apply_authorized_upgrade(code)</code></summary>
Taking 4.1629 % of a block.
```rust
code: Vec<u8>
```
</details>
Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
If the authorization required a version check, this call will ensure the spec name
remains unchanged and that the spec version has increased.
Depending on the runtime's `OnSetCode` configuration, this function may directly apply
the new `code` in the same block or attempt to schedule the upgrade.
All origins are allowed.
### Babe - 3
#### plan_config_change - 2
<details><summary><code>plan_config_change(config)</code></summary>
No weight available.
```rust
config: NextConfigDescriptor
```
Plan an epoch config change. The epoch config change is recorded and will be enacted on
the next call to `enact_epoch_change`. The config will be activated one epoch after.
Multiple calls to this method will replace any existing planned config change that had
not been enacted yet.
### Balances - 6
#### force_transfer - 2
<details><summary><code>force_transfer(source, dest, value)</code></summary>
Taking 0.0262 % of a block.
source: AccountIdLookupOf<T>
dest: AccountIdLookupOf<T>
value: T::Balance
```
Exactly as `transfer_allow_death`, except the origin must be root and the source account
may be specified.
#### force_unreserve - 5
<details><summary><code>force_unreserve(who, amount)</code></summary>
Taking 0.0117 % of a block.
who: AccountIdLookupOf<T>
amount: T::Balance
```
Unreserve some balance from a user by force.
Can only be called by ROOT.
### AuthorityMembers - 11
#### remove_member - 3
<details><summary><code>remove_member(member_id)</code></summary>
Taking 0.0665 % of a block.
member_id: T::MemberId
Remove a member from the set of validators.
### Grandpa - 16
#### note_stalled - 2
<details><summary><code>note_stalled(delay, best_finalized_block_number)</code></summary>
No weight available.
delay: BlockNumberFor<T>
best_finalized_block_number: BlockNumberFor<T>
Note that the current authority set of the GRANDPA finality gadget has stalled.
This will trigger a forced authority set change at the beginning of the next session, to
be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
The block production rate (which may be slowed down because of finality lagging) should
be taken into account when choosing the `delay`. The GRANDPA voters based on the new
authority will start voting on top of `best_finalized_block_number` for new finalized
blocks. `best_finalized_block_number` should be the highest of the latest finalized
block of all validators of the new authority set.
Only callable by root.
### TechnicalCommittee - 23
#### set_members - 0
<details><summary><code>set_members(new_members, prime, old_count)</code></summary>
Taking 0.1558 % of a block.
new_members: Vec<T::AccountId>
prime: Option<T::AccountId>
old_count: MemberCount
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
Set the collective's membership.
- `new_members`: The new member list. Be nice to the chain and provide it sorted.
- `prime`: The prime member whose vote sets the default.
- `old_count`: The upper bound for the previous number of members in storage. Used for
weight estimation.
The dispatch of this call must be `SetMembersOrigin`.
NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
the weight estimations rely on it to estimate dispatchable weight.
WARNING:
The `pallet-collective` can also be managed by logic outside of the pallet through the
implementation of the trait [`ChangeMembers`].
Any call to `set_members` must be careful that the member set doesn't get out of sync
with other logic managing the member set.
**Complexity**:
- `O(MP + N)` where:
- `M` old-members-count (code- and governance-bounded)
- `N` new-members-count (code- and governance-bounded)
- `P` proposals-count (code-bounded)
#### disapprove_proposal - 5
<details><summary><code>disapprove_proposal(proposal_hash)</code></summary>
Taking 0.0226 % of a block.
proposal_hash: T::Hash
Disapprove a proposal, close, and remove it from the system, regardless of its current
state.
Must be called by the Root origin.
Parameters:
* `proposal_hash`: The hash of the proposal that should be disapproved.
**Complexity**
O(P) where P is the number of max proposals
#### prune_item_identities_names - 6
<details><summary><code>prune_item_identities_names(names)</code></summary>
Taking 5.524 % of a block.
names: Vec<IdtyName>
Remove identity names from storage.
This function allows a privileged root origin to remove multiple identity names from storage
in bulk.
- `origin` - The origin of the call. It must be root.
- `names` - A vector containing the identity names to be removed from storage.
#### dispatch_as - 3
<details><summary><code>dispatch_as(as_origin, call)</code></summary>
Taking 0.0048 % of a block.
as_origin: Box<T::PalletsOrigin>
call: Box<<T as Config>::RuntimeCall>
Dispatches a function call with a provided origin.
The dispatch origin for this call must be _Root_.
**Complexity**
- O(1).
There are **4** disabled calls from **2** pallets.
### System - 0
#### remark - 0
<details><summary><code>remark(remark)</code></summary>
Taking 0.0546 % of a block.
```rust
remark: Vec<u8>
```
Make some on-chain remark.
Can be executed by every `origin`.
#### remark_with_event - 7
<details><summary><code>remark_with_event(remark)</code></summary>
Taking 0.2093 % of a block.
```rust
remark: Vec<u8>
```
Make some on-chain remark and emit event.
### Session - 15
#### set_keys - 0
<details><summary><code>set_keys(keys, proof)</code></summary>
Taking 0.0378 % of a block.
```rust
keys: T::Keys
proof: Vec<u8>
```
Sets the session key(s) of the function caller to `keys`.
Allows an account to set its session key prior to becoming a validator.
This doesn't take effect until the next session.
The dispatch origin of this function must be signed.
**Complexity**
- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
fixed.
#### purge_keys - 1
<details><summary><code>purge_keys()</code></summary>
Taking 0.0336 % of a block.
```
</details>
Removes any session key(s) of the function caller.
This doesn't take effect until the next session.
The dispatch origin of this function must be Signed and the account must be either be
convertible to a validator ID using the chain's typical addressing system (this usually
means being a controller account) or directly convertible into a validator ID (which
usually means being a stash account).
**Complexity**
- `O(1)` in number of key types. Actual cost depends on the number of length of
`T::Keys::key_ids()` which is fixed.