set_identity

Call Re-added v195 → v219, v233 → current #68

Sets on-chain identity for a hotkey .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsminerssubnet ownersdevelopers

The Big Picture

Hotkey addresses are 48-character hex strings. Nobody remembers those. set_identity lets you attach human-readable metadata - name, description, website, contact. This builds your brand on-chain, making it easier for delegators to find and trust you.

Why This Matters

Would you delegate to '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY' or 'Taostats'? Identity makes your hotkey recognizable, professional, and trustworthy. It's free marketing on-chain.

Example Scenario

You run 'OpenTensor Foundation' validator. Call set_identity(hotkey, name='OpenTensor', description='Official OTF validator', url='https://opentensor.ai', contact='@opentensor'). Now explorers and wallets display your brand instead of raw hex.

Common Questions

Can anyone see my identity?
Yes, it's public on-chain. Block explorers, wallets, and delegation UIs all display identity data. Don't put private info here.
Can I update identity later?
Yes, call set_identity again with new data. The old identity is replaced. Use this to keep descriptions current.

Use Cases

  • Brand your validator with name and description
  • Provide contact info for delegators and community
  • Build reputation through consistent identity
  • Help users identify legitimate vs impersonator hotkeys

From Chain Metadata

- Set prometheus information for the neuron.

Input Parameters

#NameTypeDescription
0
name
Vec<u8> Vecname (Vec<u8>)
1
url
Vec<u8> Vecurl (Vec<u8>)
2
github_repo
Vec<u8> Vecgithub_repo (Vec<u8>)
3
image
Vec<u8> Vecimage (Vec<u8>)
4
discord
Vec<u8> Vecdiscord (Vec<u8>)
5
description
Vec<u8> Vecdescription (Vec<u8>)
6
additional
Vec<u8> Vecadditional (Vec<u8>)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller owns the hotkey
  • Valid identity data

Effects

Events Emitted

Storage Modified

Postconditions

  • Identity stored on-chain

Side Effects

  • Hotkey displays identity info

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 set_identity call
const name = 0;
const url = 0;
const github_repo = 0;
const image = 0;
const discord = 0;
const description = 0;
const additional = 0;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("set_identity")](
  name,
  url,
  github_repo,
  image,
  discord,
  description,
  additional
);

Version History

v195 block 3,791,350 6 args
v233 block 4,920,350 7 args Current

Runtime Info

View Source
Pallet Index
7
Call Index
68
First Version
v195
Current Version
v393