SubnetIdentitySet
Event v195 → v212, v216 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → v402, v411 → current Changed in v411 #77Emitted when a subnet 's identity metadata is set or updated.
View events on chainThe Big Picture
Subnets are just numbers (netuid) by default. Identity metadata lets you give your subnet a name, description, website, and other info that makes it discoverable and recognizable. Miners and validators can see what your subnet does before joining. Essential for attracting participants to your subnet.
Why This Matters
Nobody knows what 'subnet 47' does. But 'ImageGen - Decentralized Image Generation' immediately tells the story. Identity metadata makes your subnet findable and attractive to potential miners and validators.
Example Scenario
You launch a new text-to-SQL subnet. You call set_subnet_identity with name 'Text2SQL', description 'Convert natural language to SQL queries', and your GitHub link. SubnetIdentitySet fires. Now taostats and other explorers show your subnet's purpose.
Common Questions
- Is identity required?
- No, but strongly recommended. Subnets without identity are just numbers, making it hard for anyone to know what they do or decide to participate.
- What can I include in the identity?
- Name, description, website URL, and other metadata fields. Check the identity type definition for all available fields.
Use Cases
- Brand your subnet with a recognizable name
- Provide description and links for discoverability
- Track when subnets update their branding
- Build subnet directories with identity info
How to Use This Event
- → Monitor identity changes for subnet discovery
- → Build subnet browsers with name/description display
- → Track when subnets rebrand or update descriptions
From Chain Metadata
The identity of a subnet has been set
Triggers
Emitted by
Preconditions
- Caller is subnet owner
- Valid identity data provided
Effects
Storage Modified
Postconditions
- SubnetIdentities storage updated
Side Effects
- Subnet displays new name/description in UIs
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | arg0 → netuid | u16 NetUid | Subnet ID (u16, 0-65535) |
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);
// Subscribe to SubnetIdentitySet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SubtensorModule.SubnetIdentitySet.get(block.hash);
for (const evt of events) {
console.log("SubnetIdentitySet:", evt.payload);
}
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 77
- First Version
- v195
- Current Version
- v411