Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change linea-ens-contracts readme #186

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions packages/linea-ccip-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,13 @@
"main": "dist/index.js",
"author": "Consensys",
"license": "Apache-2.0",
"typings": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"scripts": {
"start": "node dist/server.js",
"build": "tsc --project tsconfig.json --module commonjs --skipLibCheck true --outDir ./dist",
"size": "size-limit",
"analyze": "size-limit --why",
"clean": "rm -fr node_modules dist",
"test": "mocha test/testVerifier.spec.ts --timeout 10000 --exit",
"test": "hardhat compile && mocha test/testVerifier.spec.ts --timeout 10000 --exit",
"compile": "hardhat compile"
},
"module": "dist/linea-ccip-gateway.esm.js",
"size-limit": [
{
"path": "dist/linea-ccip-gateway.cjs.production.min.js",
"limit": "10 KB"
},
{
"path": "dist/linea-ccip-gateway.esm.js",
"limit": "10 KB"
}
],
"dependencies": {
"@chainlink/ccip-read-server": "^0.2.1",
"@ethersproject/abi": "^5.4.7",
Expand Down
194 changes: 0 additions & 194 deletions packages/linea-ccip-gateway/src/ccip-server/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/linea-ccip-gateway/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EVMGateway } from "./evm-gateway";
import { ethers } from "ethers";
import { L2ProofService } from "./L2ProofService";
import "dotenv/config";
import { Server } from "./ccip-server";
import { Server } from "@chainlink/ccip-read-server";
import { logError } from "./utils";

const l1ProviderUrl = process.env.L1_PROVIDER_URL;
Expand Down
30 changes: 15 additions & 15 deletions packages/linea-ens-contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# linea-ens-contracts

Friendly forked from https://github.com/ensdomains/ens-contracts
ENS contracts deployed on Linea to support "linea.eth" subdomain registration on Linea.
Its implementation has started with a fork from official ENS's repo https://github.com/ensdomains/ens-contracts

A few specifities:

- Supports 3 levels domain registration
- A POH linked to the account registering is needed to be able to register
- Registration is free using POH
- One registration by account using POH is allowed
- Is supported on L1 resolution thanks to [linea-state-verifier](https://github.com/Consensys/linea-resolver/tree/main/packages/linea-state-verifier)

## Contracts

Expand Down Expand Up @@ -46,15 +55,13 @@ This separation of concerns provides name owners strong guarantees over continue

### EthRegistrarController

EthRegistrarController is the first implementation of a registration controller for the new registrar. This contract implements the following functionality:
EthRegistrarController is taken from the official ENS's [registration controller](https://github.com/ensdomains/ens-contracts/blob/staging/contracts/ethregistrar/ETHRegistrarController.sol) with some changes:

- The owner of the registrar may set a price oracle contract, which determines the cost of registrations and renewals based on the name and the desired registration or renewal duration.
- The owner of the registrar may withdraw any collected funds to their account.
- The owner of the registrar can register a domain for any address that has not been registered yet for free.
- Users can register a new name using a commit/reveal process and if they have completed of Proof of humanity process.
- Users can renew a name 6 month before the expiration date.

The commit/reveal process is used to avoid frontrunning, and operates as follows:
It has the same the commit/reveal process is used to avoid frontrunning, and operates as follows:

1. A user commits to a hash, the preimage of which contains the name to be registered and a secret value.
2. After a minimum delay period and before the commitment expires, the user calls the register function with the name to register and the secret value from the commitment. If a valid commitment is found and the other preconditions are met, the name is registered.
Expand All @@ -74,13 +81,10 @@ PohVerifier is the contract responsible for checking the signature of the privat

- The owner of PohVerifier can set the signer address responsible for aknowledging a POH

### SimplePriceOracle

SimplePriceOracle is a trivial implementation of the pricing oracle for the EthRegistrarController that always returns a fixed price per domain per year, determined by the contract owner.
### FixedPriceOracle

### StablePriceOracle

StablePriceOracle is a price oracle implementation that allows the contract owner to specify pricing based on the length of a name, and uses a fiat currency oracle to set a fixed price in fiat per name.
FixedPriceOracle is a price oracle implementation that always return the same price.
It is used to make the original register function very expensive making it almost impossible to use and to force users to use the registration with POH.

## Resolvers

Expand All @@ -99,10 +103,6 @@ PublicResolver includes the following profiles that implements different EIPs.

## Developer guide

### Prettier pre-commit hook

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`

### How to setup

```
Expand Down
3 changes: 1 addition & 2 deletions packages/linea-ens-resolver/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "linea-ens-resolver",
"version": "1.0.0",
"description": "",
"main": "index.js",
"description": "L1 contracts to resolve Linea ENS domains stored on Linea from L1",
"scripts": {
"test": "hardhat compile && cd ../linea-ccip-gateway && npm run build && cd ../linea-ens-resolver && mocha test/testL1Resolver.spec.ts --timeout 10000 --exit",
"compile": "hardhat compile",
Expand Down
17 changes: 2 additions & 15 deletions packages/poh-signer-api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Linea ENS POH

API responsible for signing a message aknowledging an address has passed the POH process.
A NestJS API responsible for returning a signature aknowledging an address has passed the POH process.
Uses the [POH api](https://linea-xp-poh-api.linea.build) to check if an address has a POH.

## Installation

Expand Down Expand Up @@ -33,17 +34,3 @@ $ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).
2 changes: 1 addition & 1 deletion packages/poh-signer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "poh-signer-api",
"version": "1.0.0",
"description": "",
"description": "API to get a signature for an address that has a POH",
"author": "Consensys",
"private": true,
"license": "Apache-2.0",
Expand Down
Loading