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> Vecbytes (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 { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build note_preimage call
const bytes = 0;

const call = api.tx[stringCamelCase("Preimage")][stringCamelCase("note_preimage")](
  bytes
);

Runtime Info

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