> For the complete documentation index, see [llms.txt](https://snowball-mns.gitbook.io/snowball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://snowball-mns.gitbook.io/snowball/decentralized-identity-layer/technical-documentation/smart-contracts/registrarcontroller.md).

# RegistrarController

### **Purpose**:&#x20;

Manages identity registration, renewal, and batch record updates.<br>

### **Key Methods**:

* `makeCommitment()`: Generates a commitment hash to reserve an identity.
* `commit()`: Finalizes the commitment.
* `register()`: Registers the identity after the waiting period.
* `renew()`: Extends the identity’s expiration duration.
* `setRecords()`: Batch updates resolver records (e.g., address, text, contenthash).

### **Events**:

* `NameRegistered(name, node, owner, expires)`
* `NameRenewed(name, node, duration, expires)`

### **Interactions**:

* Works with `PublicResolver` to set/update records.
* Uses `PriceController` to calculate registration/renewal fees.

***

## **Grace Period**

**Purpose**: Enforces grace period rules post-identity expiration.\
**Logic**:

* After expiration, ownership is retained for `GRACE_PERIOD` (e.g., 30 days).
* Post-grace period, identities become available for purchase.

**Interactions**:

* Integrated into `RegistrarController` for renewal checks.
