> For the complete documentation index, see [llms.txt](https://mgmx.gitbook.io/mgmx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mgmx.gitbook.io/mgmx/contract-api-reference/testregistrar.md).

# TestRegistrar

[Source](https://github.com/ensdomains/ens/blob/master/contracts/TestRegistrar.sol)

The Test registrar facilitates easy testing of ENS on the Ethereum test networks. Typically deployed on the .test TLD, it provides functionality to instantly claim a domain for test purposes, which expires 28 days after it was claimed.

## Register a Domain

```
function register(bytes32 label, address owner) public;
```

Registers the subdomain whose `keccak256` hash is provided in `label`, and assigns ownership to `owner`. For example, to register *myname.test*, call `register` with `keccak256('myname')` as the first argument.

Registrations after 28 days.

## Get expiration time

```
mapping (bytes32 => uint) public expiryTimes;
```

Returns the unix timestamp at which the specified subdomain will expire. For example, to check the expiration time of *myname.test*, call `expiryTimes(keccak256('myname'))`.
