MevShield::Call

Variant 438 v411

pallet_shield::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (7)

IndexNameFieldsDocs
0announce_next_key
enc_key: Option
Rotate the key chain and announce the current author's ML-KEM encapsulation key. Called as an inherent every block. `enc_key` is `None` on node failure, which removes the author from future shielded tx eligibility. Key rotation order (using pre-update AuthorKeys): 1. CurrentKey ← PendingKey 2. PendingKey ← NextKey 3. NextKey ← next-next author's key (user-facing) 4. AuthorKeys[current] ← announced key
1submit_encrypted
ciphertext: BoundedVec
Users submit an encrypted wrapper. Client‑side: 1. Read `NextKey` (ML‑KEM encapsulation key bytes) from storage. 2. Sign your extrinsic so that it can be executed when added to the pool, i.e. you may need to increment the nonce if you submit using the same account. 3. Encrypt: plaintext = signed_extrinsic key_hash = xxhash128(NextKey) kem_len = Length of kem_ct in bytes (u16) kem_ct = Ciphertext from ML‑KEM‑768 nonce = Random 24 bytes used for XChaCha20‑Poly1305 aead_ct = Ciphertext from XChaCha20‑Poly1305 with ML‑KEM‑768 + XChaCha20‑Poly1305, producing ciphertext = key_hash || kem_len || kem_ct || nonce || aead_ct
2store_encrypted
encrypted_call: BoundedVec
Store an encrypted extrinsic for later execution in on_initialize.
3set_max_pending_extrinsics_number
value: u32
Set the maximum number of pending extrinsics allowed in the queue.
4set_on_initialize_weight
value: u64
Set the maximum weight allowed for on_initialize processing. Rejects values exceeding the absolute limit (half of total block weight).
5set_stored_extrinsic_lifetime
value: u32
Set the extrinsic lifetime (max blocks between submission and execution).
6set_max_extrinsic_weight
value: u64
Set the maximum weight allowed for a single extrinsic during on_initialize processing. Extrinsics exceeding this limit are removed from the queue. Rejects values exceeding the absolute limit.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 7 possible variants.
Size
variable (1+ bytes)

Examples

announce_next_key = announce_next_key(enc_key)
0x00<field0>
00 Variant index 0 = announce_next_key
field 0 enc_key: Option
submit_encrypted = submit_encrypted(ciphertext)
0x01<field0>
01 Variant index 1 = submit_encrypted
field 0 ciphertext: BoundedVec
store_encrypted = store_encrypted(encrypted_call)
0x02<field0>
02 Variant index 2 = store_encrypted
field 0 encrypted_call: BoundedVec

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode MevShield::Call — variant "announce_next_key"
const value = registry.createType("MevShield::Call", { announce_next_key: { enc_key: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
438
Kind
Variant
Path
pallet_shield::pallet::Call
Runtime
v411