Show / Hide Table of Contents

NameService Class

Provides a series of attributes and methods of the native contract NameService, which contract hash is 0x7a8fcf0392cd625647907afa8e45cc66872b596b .

NameService is also an NFT(Non-fungible token)contract that inherits all attributes and methods of NFT contracts.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework


public class NameService 


HashGets the contract hash
SymbolGets the symbol, NNS
DecimalsGets decimals


TotalSupply() Gets the total supply of the domain token
BalanceOf(UInt160 owner) Gets the balance of the domain token with the specified owner address
OwnerOf(string name) Gets the owner of the domain token
Properties(string name) Gets the properties of the domain token
Tokens() Gets all registered domains in the name service contract
TokensOf(UInt160 owner) Gets all the domains owned by the specified address
Transfer(UInt160, string) Transfers the ownership of the domain
IsAvailable(string name) Checks if the domain is available
Register(string name, UInt160 owner) Registers a domain
Renew(string name) Renews a domain
SetAdmin(string name, UInt160 admin) Sets the admin of the domain
SetRecord(string name, RecordType type, string data) Sets the type data of the domain
GetRecord(string name, RecordType type) Gets the type data of the domain
DeleteRecord(string name, RecordType type) Deletes the type data of the domain
Resolve(string name, RecordType type) Resolves a domain
GetPrice() Gets the price of registering or renewing a domain