Skip to main content

Overview

TokenENS is deployed once per chain. It wraps the ENS Registry and Public Resolver to register a subdomain (e.g. pepe.makx.eth) for every token launched through the factory. All token metadata — name, symbol, social links, contract addresses — is stored as ENS text records, queryable without a backend.

Deployment Addresses

NetworkAddress
EthereumComing soon
BaseComing soon
BNB ChainComing soon
SepoliaComing soon

Write Functions

function registerToken(
    address tokenAddress,
    address bondingCurveAddress,
    string calldata label,
    string calldata name,
    string calldata symbol,
    string calldata totalSupply,
    TokenMetadata calldata meta
) external onlyAuthorized
Registers a new ENS subdomain for the token. Creates the subnode, sets the resolver, sets the ETH address record, and batch-writes all text records via multicall. Only callable by factory or owner.
function updateRecord(address tokenAddress, string calldata key, string calldata value) external onlyOwner
Updates a single ENS text record for a registered token.
function updateRecords(address tokenAddress, string[] calldata keys, string[] calldata values) external onlyOwner
Batch-updates multiple ENS text records via multicall.
function transferSubdomain(address tokenAddress, address newOwner) external onlyOwner
Transfers ENS subdomain ownership to a new address.
function setFactory(address _factory) external onlyOwner
Sets the authorized factory address.

Structs

struct TokenMetadata {
    string avatar;       // logo/avatar image URL or IPFS/NFT ref
    string description;  // bio or description of the token/project
    string comTwitter;   // com.twitter → Twitter/X handle
    string comTelegram;  // org.telegram → Telegram handle
    string url;          // project website URL
}

ENS Text Records

Each token subdomain gets 11 text records set at registration:
KeySource
avatarmeta.avatar
descriptionmeta.description
urlmeta.url
com.twittermeta.comTwitter
org.telegrammeta.comTelegram
nameToken name
io.makx.token.symbolToken symbol
io.makx.token.decimals"18"
io.makx.token.totalSupplyTotal supply (as string)
io.makx.token.addressToken contract address
io.makx.launchpad.addressBonding curve address

Events

event TokenRegistered(address indexed tokenAddress, bytes32 indexed node, string label)
event TokenRecordUpdated(address indexed tokenAddress, string key, string value)

Errors

ErrorCondition
NotOwnerNon-owner called onlyOwner function
NotAuthorizedNon-owner and non-factory called onlyAuthorized
TokenNotRegisteredUpdate on unregistered token
LengthMismatchMismatched array lengths in updateRecords
SubdomainTakenDuplicate registration