Core contracts of remilias.name on top of ENS. For documentation of the ENS system, see github.com/ensdomains/ens-contracts.
This repo doubles as an npm package with the compiled JSON contracts
import {
RemiliasRegistrar,
RemiliasNameWrapper,
RemiliasPublicResolver,
RemiliasRegistrarController,
BaseRegistrar,
BaseRegistrarImplementation,
BulkRenewal,
ENS,
ENSRegistry,
ENSRegistryWithFallback,
ETHRegistrarController,
FIFSRegistrar,
LinearPremiumPriceOracle,
PriceOracle,
PublicResolver,
Resolver,
ReverseRegistrar,
StablePriceOracle,
TestRegistrar,
} from '@ensdomains/ens-contracts'
// Registry
import '@ensdomains/ens-contracts/contracts/registry/ENS.sol';
import '@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol';
import '@ensdomains/ens-contracts/contracts/registry/ENSRegistryWithFallback.sol';
import '@ensdomains/ens-contracts/contracts/registry/ReverseRegistrar.sol';
import '@ensdomains/ens-contracts/contracts/registry/TestRegistrar.sol';
// EthRegistrar
import '@ensdomains/ens-contracts/contracts/ethregistrar/BaseRegistrar.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/RemiliasRegistrar.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/BaseRegistrarImplementation.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/BulkRenewal.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/ETHRegistrarController.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/LinearPremiumPriceOracle.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/PriceOracle.sol';
import '@ensdomains/ens-contracts/contracts/ethregistrar/StablePriceOracle.sol';
// Resolvers
import '@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol';
import '@ensdomains/ens-contracts/contracts/resolvers/RemiliasPublicResolver.sol';
import '@ensdomains/ens-contracts/contracts/resolvers/RemiliasResolver.sol';
import '@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol';
If your environment does not have compiler, you can access to the raw hardhat artifacts files at node_modules/@ensdomains/ens-contracts/artifacts/contracts/${modName}/${contractName}.sol/${contractName}.json
Implements an Remilias.name registrar intended for the remilias.eth 2LD.
RemiliasRegistrar is the contract that owns the remilias 2LD in the ENS registry. This contract implements a minimal set of functionality:
- The owner of the registrar may add and remove controllers.
- Controllers may register new domains for each remilias ecosystem NFT. They can not change the ownership or burn existing domains.
- Name owners may transfer ownership to another address.
- New NFT holders may reclaim ownership registered domain.
- Name owners may reclaim ownership in the ENS registry if they have lost it.
This separation of concerns provides name owners strong guarantees over continued ownership of their existing names, while still permitting innovation and change in the way names are registered via the controller mechanism.
RemiliasRegistrarController is the first implementation of a registration controller for the remilias registrar. This contract implements the following functionality:
- The owner of the registrar may add new collections to contract.
- Users can register new names if they hold approved collections.
- Users can reset ownership of a name after receiving registered NFT.
Resolver implements a general-purpose ENS resolver that is suitable for most standard ENS use cases. The public resolver permits updates to ENS records by the owner of the corresponding name.
PublicResolver includes the following profiles that implements different EIPs.
- ABIResolver = EIP 205 - ABI support (
ABI()
). - AddrResolver = EIP 137 - Contract address interface. EIP 2304 - Multicoin support (
addr()
). - ContentHashResolver = EIP 1577 - Content hash support (
contenthash()
). - InterfaceResolver = EIP 165 - Interface Detection (
supportsInterface()
). - NameResolver = EIP 181 - Reverse resolution (
name()
). - PubkeyResolver = EIP 619 - SECP256k1 public keys (
pubkey()
). - TextResolver = EIP 634 - Text records (
text()
). - DNSResolver = Experimental support is available for hosting DNS domains on the Ethereum blockchain via ENS. The more detail is on the old ENS doc.
npx hardhat node --fork https://mainnet.infura.io/v3/INFURA_KEY --hostname 0.0.0.0
This repo runs a husky precommit to prettify all contract files to keep them consistent. Add new folder/files to prettier format
script in package.json. If you need to add other tasks to the pre-commit script, add them to .husky/pre-commit
git clone https://github.com/ensdomains/ens-contracts
cd ens-contracts
yarn