# TestRegistrar

[Source](https://github.com/pulsedomains/pns-contracts/blob/master/contracts/registry/TestRegistrar.sol)

The Test registrar facilitates easy testing of PNS on the Pulse Chain 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'))`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pulse.domains/contract-api-reference/testregistrar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
