note_preimage

Call v133 → current #0

Stores a preimage on-chain.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdevelopers

The Big Picture

Stores call data for governance.

Use Cases

  • Prepare governance proposals

From Chain Metadata

Register a preimage on-chain. If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage.

Input Parameters

#NameTypeDescription
0
bytes
Vec<u8> Vec bytes (Vec<u8>)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Sufficient balance
  • Hash is unique

Effects

Events Emitted

Storage Modified

Postconditions

  • Preimage stored
  • Deposit held

Side Effects

  • Emits Noted

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Build note_preimage call (typed, named args)
const bytes = Binary.fromOpaque(new Uint8Array(0));

const tx = api.tx.Preimage.note_preimage({
  bytes,
});

Runtime Info

Pallet Index
14
Call Index
0
First Version
v133
Current Version
v411