-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6d7575
commit 1c24b2b
Showing
1 changed file
with
29 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,55 @@ | ||
# WORK IN PROGRESS | ||
# ENS Registrars | ||
|
||
## Foundry | ||
This repository contains a set of **Registrar** contracts designed for managing and assigning subnames under specific domains like `.eth` or `.protocol.eth`. These Registrars are responsible for creating and maintaining subnames such as `0xYamen.eth` or `0xYamen.protocol.eth`. | ||
|
||
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** | ||
## Overview | ||
|
||
Foundry consists of: | ||
Registrars are versatile contracts that can be tailored to different naming conventions and subdomains. For example, a domain like `protocol.eth` can have a dedicated Registrar that manages the registration of subnames like `name.protocol.eth`. The flexibility of these Registrars allows for various implementations where each protocol implements custom logic for assigning subnames, ensuring that different use cases and requirements can be met. | ||
|
||
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). | ||
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. | ||
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. | ||
- **Chisel**: Fast, utilitarian, and verbose solidity REPL. | ||
## Available Registrars | ||
|
||
## Documentation | ||
- **TokenizedRegistrar**: A Registrar that tokenizes the subnames, making them transferrable and sellable as ERC721 tokens. | ||
- **OwnableRegistrar**: A Registrar where only the owner has the authority to assign subnames. | ||
|
||
https://book.getfoundry.sh/ | ||
More Registrars are being developed and will be available soon. | ||
|
||
## Usage | ||
## Installation | ||
|
||
### Build | ||
To install and set up the ENS Registrars in your project, follow these steps: | ||
|
||
```shell | ||
$ forge build | ||
``` | ||
|
||
### Test | ||
|
||
```shell | ||
$ forge test | ||
1. Clone the repository: | ||
```sh | ||
$ git clone https://github.com/Patronum-Labs/ens-registrars.git | ||
``` | ||
|
||
### Format | ||
2. Navigate to the project directory: | ||
|
||
```shell | ||
$ forge fmt | ||
```sh | ||
$ cd ens-registrars | ||
``` | ||
|
||
### Gas Snapshots | ||
3. Install the dependencies: | ||
|
||
```shell | ||
$ forge snapshot | ||
```sh | ||
$ forge install | ||
``` | ||
|
||
### Anvil | ||
4. Build the contracts: | ||
|
||
```shell | ||
$ anvil | ||
```sh | ||
$ forge build | ||
``` | ||
|
||
### Deploy | ||
5. Run the tests: | ||
|
||
```shell | ||
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> | ||
```sh | ||
$ forge test | ||
``` | ||
|
||
### Cast | ||
## Contributing | ||
|
||
```shell | ||
$ cast <subcommand> | ||
``` | ||
Contributions are welcome! If you have ideas for new Registrars or improvements to existing ones, feel free to submit a Pull Request. | ||
|
||
### Help | ||
## License | ||
|
||
```shell | ||
$ forge --help | ||
$ anvil --help | ||
$ cast --help | ||
``` | ||
This project is licensed under the [MIT License](LICENSE). |