Transactions

set-subnet-identity

Publish identity metadata for a subnet (signer must be the subnet owner).

View as Markdown

Stores the subnet's public profile — name, links, contact, logo — so explorers and participants can identify it. Owner-only: the signing coldkey must own the subnet. Everything submitted is public and permanent history on chain. Calling again overwrites the whole record (empty fields clear their previous values); the chain enforces length limits on each field. Purely cosmetic — for the token ticker use update_symbol, and for economics use set_hyperparameter.

SignerOriginPalletWraps
coldkeysubnet ownerSubtensorModuleSubtensorModule.set_subnet_identity

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet the identity is for; the signer must be its owner.
subnet_namestringyesDisplay name shown for the subnet.
github_repostringnoGitHub repository URL for the subnet's code.
subnet_contactstringnoContact address for the subnet operators.
subnet_urlstringnoWebsite for the subnet.
discordstringnoDiscord handle or server invite.
descriptionstringnoShort free-text description of what the subnet does.
logo_urlstringnoLogo image URL for the subnet.
additionalstringnoAny extra free-text information to publish.

Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58 address, an address-book or proxy-book name, or a local wallet/hotkey name.

CLI

Preview with --dry-run (shows fee, effects, and policy result without submitting), then submit:

btcli tx set-subnet-identity \
  --netuid <int> \
  --subnet-name <value> --dry-run
btcli tx set-subnet-identity \
  --netuid <int> \
  --subnet-name <value> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetSubnetIdentity(netuid=1, subnet_name="...")

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)

(bt.Subtensor is also the async client — async with bt.Subtensor() as client: — see The client.) Or build the intent by op name, as an agent would:

result = sub.execute_tool("set_subnet_identity", {...}, wallet)

On-chain implementation

SubtensorModule.set_subnet_identitypallets/subtensor/src/macros/dispatches.rs#L1155:

#[pallet::call_index(78)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::set_subnet_identity())]
pub fn set_subnet_identity(
    origin: OriginFor<T>,
    netuid: NetUid,
    subnet_name: Vec<u8>,
    github_repo: Vec<u8>,
    subnet_contact: Vec<u8>,
    subnet_url: Vec<u8>,
    discord: Vec<u8>,
    description: Vec<u8>,
    logo_url: Vec<u8>,
    additional: Vec<u8>,
) -> DispatchResult {
    Self::do_set_subnet_identity(
        origin,
        netuid,
        subnet_name,
        github_repo,
        subnet_contact,
        subnet_url,
        discord,
        description,
        logo_url,
        additional,
    )
}

Delegates to do_set_subnet_identity.

Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).