|
1 |
| -# WORK IN PROGRESS |
| 1 | +# ENS Registrars |
2 | 2 |
|
3 |
| -## Foundry |
| 3 | +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`. |
4 | 4 |
|
5 |
| -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** |
| 5 | +## Overview |
6 | 6 |
|
7 |
| -Foundry consists of: |
| 7 | +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. |
8 | 8 |
|
9 |
| -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). |
10 |
| -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. |
11 |
| -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. |
12 |
| -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. |
| 9 | +## Available Registrars |
13 | 10 |
|
14 |
| -## Documentation |
| 11 | +- **TokenizedRegistrar**: A Registrar that tokenizes the subnames, making them transferrable and sellable as ERC721 tokens. |
| 12 | +- **OwnableRegistrar**: A Registrar where only the owner has the authority to assign subnames. |
15 | 13 |
|
16 |
| -https://book.getfoundry.sh/ |
| 14 | +More Registrars are being developed and will be available soon. |
17 | 15 |
|
18 |
| -## Usage |
| 16 | +## Installation |
19 | 17 |
|
20 |
| -### Build |
| 18 | +To install and set up the ENS Registrars in your project, follow these steps: |
21 | 19 |
|
22 |
| -```shell |
23 |
| -$ forge build |
24 |
| -``` |
25 |
| - |
26 |
| -### Test |
27 |
| - |
28 |
| -```shell |
29 |
| -$ forge test |
| 20 | +1. Clone the repository: |
| 21 | +```sh |
| 22 | +$ git clone https://github.com/Patronum-Labs/ens-registrars.git |
30 | 23 | ```
|
31 | 24 |
|
32 |
| -### Format |
| 25 | +2. Navigate to the project directory: |
33 | 26 |
|
34 |
| -```shell |
35 |
| -$ forge fmt |
| 27 | +```sh |
| 28 | +$ cd ens-registrars |
36 | 29 | ```
|
37 | 30 |
|
38 |
| -### Gas Snapshots |
| 31 | +3. Install the dependencies: |
39 | 32 |
|
40 |
| -```shell |
41 |
| -$ forge snapshot |
| 33 | +```sh |
| 34 | +$ forge install |
42 | 35 | ```
|
43 | 36 |
|
44 |
| -### Anvil |
| 37 | +4. Build the contracts: |
45 | 38 |
|
46 |
| -```shell |
47 |
| -$ anvil |
| 39 | +```sh |
| 40 | +$ forge build |
48 | 41 | ```
|
49 | 42 |
|
50 |
| -### Deploy |
| 43 | +5. Run the tests: |
51 | 44 |
|
52 |
| -```shell |
53 |
| -$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> |
| 45 | +```sh |
| 46 | +$ forge test |
54 | 47 | ```
|
55 | 48 |
|
56 |
| -### Cast |
| 49 | +## Contributing |
57 | 50 |
|
58 |
| -```shell |
59 |
| -$ cast <subcommand> |
60 |
| -``` |
| 51 | +Contributions are welcome! If you have ideas for new Registrars or improvements to existing ones, feel free to submit a Pull Request. |
61 | 52 |
|
62 |
| -### Help |
| 53 | +## License |
63 | 54 |
|
64 |
| -```shell |
65 |
| -$ forge --help |
66 |
| -$ anvil --help |
67 |
| -$ cast --help |
68 |
| -``` |
| 55 | +This project is licensed under the [MIT License](LICENSE). |
0 commit comments