The Ethereum Name Service (ENS) maps effortless to recall (and type) domain names such as ‘orinocopay.eth’ to Ethereum addresses such as ‘0x1234567890abcdef1234567890abcdef12345678’. Domains can be registered with ENS through an auction process, and once possessed a user can associate the domain with an address.
Something that ENS has been missing is command-line implements to permit access to its features and functions without having to write your own code. As part of Orinoco’s work on payment channels we required a Go library to treat ENS functions, and have added a command-line frontend to it for general purpose use.
Some nice features of the contraption are:
- written in Go, so compiles to a ordinary static binary
- does not require a local Ethereum knot
- uses the geth-style keystore for ease of integration with existing devices
- uses Orinoco’s value parsing library to permit for bids such as “0.05 ether” and gas prices such as “1gwei”
- accepts ENS domains and resolves addresses to domains wherever useful
Using the instrument is straightforward. To provide general information about a domain:
ens also provides more specific directions where the output can be used lightly by other contraptions. For example, to obtain the address for a domain:
Setting the address for a domain is almost as effortless, only requiring the passphrase to unlock the account that wields the domain and the address to which the domain should resolve:
Note that ens expects you to have a local keystore, but it does not need you to be running a local Ethereum knot. You can manage your local keystore with geth or similar instruments.
ENS supports the idea of switch sides resolution, where an address can be resolved to a domain. ens permits you to obtain this information:
Kicking off an auction for an address is identically elementary:
and other instructions such as ens auction expose and ens auction finish have the expected effect. ens auction help provides details of the instructions available when participating in an auction.
The tool’s Github repository is at https://github.com/orinocopay/ens where the source code and issues list can be found.
Some useful hints when using this instrument:
- you can switch the gas price of your transactions with the –gasprice option
- you can log your state-changing activities with the –log option (handy if you are prone to leave behind the domain you were bidding on or the salt that you used for a bid)
- you can use a local Ethereum knot rather than the default knot with –connection=
/.ethereum/geth.rpc or equivalent. For testing on Ropsten add the option –connection=https://ropsten.orinocopay.com:8546/
It should be noted that this software is relatively fresh and albeit it has been tested and is in use to secure and manage a number of domains there are no ensures that it’s totally bug-free. It is suggested that you use it from an account with limited ether and monitor the generated transactions by hand until you are comfy with how it operates.
Feedback on the contraption is welcome. Any issues found with the device can be reported at the relevant Github issues list.
By clapping more or less, you can signal to us which stories indeed stand out.
Focusing on real-world use cases for Ethereum