Back to the app

Add .ely names to your app

Support for .ely takes two read-only calls on one contract. There is no API key and no backend, and it works with any EVM library. Let people type bona.ely instead of a long address, and show names instead of addresses.

Status: live on Elysium testnet. Mainnet details will be published at launch, so keep the values below in config.

Network and contract

Network
Elysium testnet (chain ID 99801)
RPC
https://testnet-rpc.elysium.kinetiq.xyz
ElyNames
0x13A130B336400409c956dF042C128238F1486ddD (verified, view source)

The two calls

Pass the label only, without .ely, in lowercase.

Example with ethers

import { JsonRpcProvider, Contract } from "ethers";

const provider = new JsonRpcProvider("https://testnet-rpc.elysium.kinetiq.xyz");
const names = new Contract(
  "0x13A130B336400409c956dF042C128238F1486ddD",
  [
    "function resolve(string) view returns (address)",
    "function primaryNameOf(address) view returns (string)"
  ],
  provider
);

const address = await names.resolve("bona");        // 0x000... if not found
const name = await names.primaryNameOf("0x...");    // "" if none

Example with viem

import { createPublicClient, http, parseAbi } from "viem";

const client = createPublicClient({
  transport: http("https://testnet-rpc.elysium.kinetiq.xyz"),
});
const abi = parseAbi([
  "function resolve(string) view returns (address)",
  "function primaryNameOf(address) view returns (string)",
]);

const address = await client.readContract({
  address: "0x13A130B336400409c956dF042C128238F1486ddD",
  abi,
  functionName: "resolve",
  args: ["bona"],
});

Handling user input

Showing names instead of addresses

Call primaryNameOf for each address you display, and fall back to a shortened address when it returns an empty string. For long lists, batch the calls with multicall. A wallet can only claim a name it owns, so the result is safe to display.

Optional: text records

text(string label, string key) returns a text record set by the name’s owner, such as com.twitter. It returns an empty string if the key isn’t set or the name has expired.

Names are NFTs

Every name is a standard ERC-721 token, with ERC-2981 royalty support. For indexing, listen for NameRegistered, NameRenewed, PrimaryNameSet and the standard Transfer event.

Try it

Enter a name to see its address, or an address to see its primary name.

Questions or integrating?

Message support on X or follow @ElysiumNames.