Skip to content

Commit

Permalink
refactor: rename subdomain-dao folders into sdao (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGLoic authored Nov 16, 2021
1 parent bc49b45 commit e8cd335
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ The node corresponds to the [namehash](https://docs.ens.domains/contract-api-ref

### Interface and Implementation

See `contracts/subdomain-dao/ISDaoRegistrar.sol` and `contracts/subdomain-dao/SDaoRegistrar.sol` for the exact interface and implementation.
See `contracts/sdao/ISDaoRegistrar.sol` and `contracts/sdao/SDaoRegistrar.sol` for the exact interface and implementation.

## Extensions

An extension is an abstract contract which inherits the `SDaoRegistrar` core contract.

It may add other public methods for registration using the internal registration method or/and implements the `beforeRegistration` and `afterRegistration` hooks.

extensions are easy to read: `/contracts/subdomain-dao/extensions/*.sol`
extensions are easy to read: `/contracts/sdao/extensions/*.sol`

### SDaoRegistrarReserved Extension

Expand All @@ -95,7 +95,7 @@ function _beforeRegistration(address account, bytes32 labelHash)

A reservation period is introduced during which registration of a subdomain `subdomain.domain.eth` is blocked if the related `subdomain.eth` is owned by someone else than the registrant. The reservation period can be updated by the owner of the contract.

See `contracts/subdomain-dao/extensions/SDaoRegistrarReserved.sol` for the implementation.
See `contracts/sdao/extensions/SDaoRegistrarReserved.sol` for the implementation.

### SDaoRegistrarLimited Extension

Expand Down Expand Up @@ -127,7 +127,7 @@ function _afterRegistration(address account, bytes32 labelHash)

A counter for the number of registered subdomains and a registration limit number are added. If the counter reaches the registration limit, registration is blocked. The registration limit can be updated by the owner of the contract.

See `contracts/subdomain-dao/extensions/SDaoRegistrarLimited.sol` for the implementation.
See `contracts/sdao/extensions/SDaoRegistrarLimited.sol` for the implementation.

### SDaoRegistrarERC721Generator Extension
```ts
Expand All @@ -143,7 +143,7 @@ function _afterRegistration(address account, bytes32 labelHash)
}
```
An ERC721 is minted and the registration is blocked if the balance of the registrant is not zero.
See `contracts/subdomain-dao/extensions/SDaoRegistrarERC721Generator.sol` for the implementation.
See `contracts/sdao/extensions/SDaoRegistrarERC721Generator.sol` for the implementation.
### SDaoRegistrarERC1155Generator Extension
```ts
function _afterRegistration(address account, bytes32 labelHash)
Expand All @@ -161,7 +161,7 @@ function _afterRegistration(address account, bytes32 labelHash)

An ERC1155 token is minted for the registrant after each registration. The ERC1155 token ID and data are left free to be implemented by the developer.
The registration is blocked if the balance of the registrant is not zero, based on a `balanceOf` method to be implemented by the developer.
See `contracts/subdomain-dao/extensions/SDaoRegistrarERC1155Generator.sol` for the implementation.
See `contracts/sdao/extensions/SDaoRegistrarERC1155Generator.sol` for the implementation.


### SDaoRegistrarCodeAccessible Extension
Expand Down Expand Up @@ -193,7 +193,7 @@ The message must be signed by a specific `code signer` address in order to be va

An access code can only be consumed once.

See `contracts/subdomain-dao/extensions/SDaoRegistrarCodeAccessible.sol` for the implementation.
See `contracts/sdao/extensions/SDaoRegistrarCodeAccessible.sol` for the implementation.

### SDaoRegistrarClaimable Extension

Expand Down Expand Up @@ -222,7 +222,7 @@ A new public method of registration `claim` is added. It allows to register a su

The FCFS served registration is blocked if the subdomain is already booked.

See `contracts/subdomain-dao/extensions/SDaoRegistrarClaimable.sol` and `contracts/ens-label-booker/ENSLabelBooker.sol` for the implementation of the extension and the Label Booker contracts.
See `contracts/sdao/extensions/SDaoRegistrarClaimable.sol` and `contracts/ens-label-booker/ENSLabelBooker.sol` for the implementation of the extension and the Label Booker contracts.

## Presets

Expand All @@ -241,7 +241,7 @@ A preset is an SDAO Registrar contract extended with a set of extensions. It may
- hardhat task: `deploy-sdao-preset-claimable`
- implements `SDaoRegistrarClaimable` extension

See `contracts/subdomain-dao/presets/*.sol` for the implementations.
See `contracts/sdao/presets/*.sol` for the implementations.

## Hardhat scripts

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "0.0.1-semantic-release",
"scripts": {
"compile": "SKIP_LOAD=true hardhat compile",
"test:sdao-erc721-generator": "hardhat test ./test/subdomain-dao/sdao-erc721-generator.spec.ts",
"test:sdao-erc1155-generator": "hardhat test ./test/subdomain-dao/sdao-erc1155-generator.spec.ts",
"test:sdao-code-accessible": "hardhat test ./test/subdomain-dao/sdao-code-accessible.spec.ts",
"test:sdao-claimable": "hardhat test ./test/subdomain-dao/sdao-claimable.spec.ts",
"test:sdao-registry": "hardhat test ./test/subdomain-dao/sdao-registry.spec.ts",
"test:sdao-reserved-limited": "hardhat test ./test/subdomain-dao/sdao-reserved-limited.spec.ts",
"test:sdao-erc721-generator": "hardhat test ./test/sdao/sdao-erc721-generator.spec.ts",
"test:sdao-erc1155-generator": "hardhat test ./test/sdao/sdao-erc1155-generator.spec.ts",
"test:sdao-code-accessible": "hardhat test ./test/sdao/sdao-code-accessible.spec.ts",
"test:sdao-claimable": "hardhat test ./test/sdao/sdao-claimable.spec.ts",
"test:sdao-registry": "hardhat test ./test/sdao/sdao-registry.spec.ts",
"test:sdao-reserved-limited": "hardhat test ./test/sdao/sdao-reserved-limited.spec.ts",
"test:ens-label-booker": "hardhat test ./test/ens-label-booker.spec.ts",
"test:ens-registry": "hardhat test ./test/ens-registry.spec.ts",
"test": "hardhat test ./test/*.spec.ts ./test/**/*.spec.ts",
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy/deploy-ens-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ReverseRegistrar,
PublicResolver,
} from '../../types';
import { DeployedSDao } from './subdomain-dao/deploy-sdao';
import { DeployedSDao } from './sdao/deploy-sdao';

type DeployEnsFullArgs = {
// additionally deploy SDAO contracts
Expand Down
10 changes: 5 additions & 5 deletions tasks/deploy/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './deploy-ens-full';
export * from './deploy-label-booker';
export * from './subdomain-dao/deploy-sdao-preset-claimable';
export * from './subdomain-dao/deploy-sdao-preset-code-accessible';
export * from './subdomain-dao/deploy-sdao-preset-erc721';
export * from './subdomain-dao/deploy-sdao-preset-erc1155';
export * from './subdomain-dao/deploy-sdao';
export * from './sdao/deploy-sdao-preset-claimable';
export * from './sdao/deploy-sdao-preset-code-accessible';
export * from './sdao/deploy-sdao-preset-erc721';
export * from './sdao/deploy-sdao-preset-erc1155';
export * from './sdao/deploy-sdao';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e8cd335

Please sign in to comment.