Skip to main content

UidLookup Precompile

Last updated: Aug 03, 2026

The UidLookup precompile maps an EVM address to the UIDs of neurons that have associated it via the associate_evm_address extrinsic.

See also: Associating an EVM Key.

Function

FunctionParametersState mutabilityDescription
uidLookup(uint16 netuid, address evm_address, uint16 limit)addressviewAllows for UID lookup when provided with EVM address.

Usage

ABI

The canonical ABI is defined in the UidLookup precompile ABI source file. If you have a local copy of the source files, you can import the ABI and contract address into your project as shown below:

import { IUIDLookupABI, IUID_LOOKUP_ADDRESS } from "./contracts/uidLookup";

Look Up Neurons Associated with an EVM Address

import { ethers } from "ethers";
import { IUIDLookupABI, IUID_LOOKUP_ADDRESS } from "./contracts/uidLookup";

const provider = new ethers.JsonRpcProvider("YOUR_RPC_URL");
const uidLookup = new ethers.Contract(
IUID_LOOKUP_ADDRESS,
IUIDLookupABI,
provider,
);

const netuid = 1;
const evmAddress = "0xYourNeuronEvmAddress";
const results = await uidLookup.uidLookup(netuid, evmAddress, 10);

for (const item of results) {
console.log(`UID ${item.uid} associated at block ${item.block_associated}`);
}