as user
9chsTNS-0.0.1
inquire a tezname¶
To inquire whois-ish info of a tezname is simple. It's basically a public information on contract so any contract explorer can be helpful.
Using dough!
The dough also provide a command dough inquire
that can inquire and show on screen. Check this document!
Todo
Using asciinema to record dough inquire
and update/insert into here.
originate a tezname¶
As a regular user, you can naturally become a tezname owner by deploying your own tezname contract. You can originate cTezName.tz
by directly using tezos-client
.
Using dough!
There are two ways to use dough for deploying a cTezName.
The one way is using dough data
(users guide) to prepare init data and manually originate cTezName via tezos-client.
The other way is using dough deploy
(users guide) to deploy cTezName via dough rather than tezos-client. All you need to do is to follow the following steps.
Step 1: Prepare a record data file as follow. The dough will take this data as Haskell record data structure and translate it into Michelson format.
TzNameData
{ sProtocol = "9chsTNS-0.0.1"
, sTzName = "mico"
, sAvailable = "False"
, sOwner = TNID "abpH"
, sAdmin = TNID "dotblack"
, sDNS =
[ ("dns1.tzname.org", "192.168.1.100")
, ("dns2.tzname.org", "192.168.1.103") ]
, sAppliedDate = "2019-01-01T04:30:00Z"
, sExpireDate = "2020-01-01T04:30:01Z"
, sLastModification = ("2019-01-01T04:30:00Z", "originated")
, sRoot = "tz1bhXKVY4ihH8Dcao4cuk8KxJ4sPjXGZcEp"
}
Step 2: Exec dough deploy
.
Say, you want to register mico.tez
with ./test/admin/initA.data
as init data file and ./src/9chsTNS-0.0.1/cTezName.tz
as the source tezname contract. All you need to do is exec the following instruction:
dough deploy -c dough.config -d ./test/admin/initA.data -i ./src/9chsTNS-0.0.1/cTezName.tz -n mico.tez
The returned info will be displayed on terminal. It shows the tezname, the source code of cTezName, the originated address and the address of tezname records contract.
[INFO]
TzName contract:mico.tez of ./src/9chsTNS-0.0.1/cTezName.tz
has been deploied successfully at address: KT1ATUkZPKuMsF9WL7moaBgeTW6iB4gpPYBj
[INFO]
This origination record has been updated onto KT1P4fir3MtexzztWbybNxonCv28Fu6hwmGA
Todo
Using asciinema to record dough inquire
and update/insert into here.
After you deploy your tezname contract, you can checking with the instance of tezname record contract.