remark_with_event

Call v101 → current #7

Post data on-chain and emit a Remarked event .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developersanalytics

The Big Picture

Like remark, but emits an event with the data hash, making it indexable and searchable.

Use Cases

  • Timestamping with easy indexing
  • Application-level messaging
  • Searchable audit logs

From Chain Metadata

Make some on-chain remark and emit event.

Input Parameters

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

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Signed by any account
  • Sufficient balance for transaction fee

Effects

Events Emitted

Postconditions

  • Data hash included in Remarked event
  • Event recorded in System.Events

Side Effects

  • Data permanently anchored to blockchain
  • Event can be indexed

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 remark_with_event call (typed, named args)
const remark = Binary.fromOpaque(new Uint8Array(0));

const tx = api.tx.System.remark_with_event({
  remark,
});

Runtime Info

Pallet Index
0
Call Index
7
First Version
v101
Current Version
v411