GithubHelp home page GithubHelp logo

jventures-jdn / jns-app-v3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ensdomains/ens-app-v3

0.0 0.0 0.0 774.06 MB

JNS

Home Page: https://jns.jfinchain.com

License: MIT License

Shell 0.12% JavaScript 0.69% TypeScript 99.11% CSS 0.07%

jns-app-v3's Introduction

ENS App V3

The all new, all cool version of the ENS manager.

EXTERNAL CONTRIBUTOR NOTICE

Please note that everything within this repo is currently in alpha. Some contracts are not yet deployed on mainnet which means some functionality may break on the network.

Usage

Quick start

pnpm install
pnpm denv
pnpm dev:glocal

Install

pnpm install

Running Dev Server

# For mainnet
pnpm dev

# Or with the test environment running
pnpm dev:glocal

Lint

pnpm lint

Unit Test

pnpm test
pnpm test:watch
pnpm test:coverage

We recommend installing this vscode plugin for a better unit testing experience.

Test Environment

You must have Docker installed to run the test environment. For more information on the environment, see ens-test-env.

Once installed, you can run:

pnpm denv

If you need to deploy a new subgraph

You shouldn't deploy the subgraph on top of the existing dataset, instead you should create a clean dataset (explained below).

  1. Start the test environment
pnpm denv --save
  1. Deploy the subgraph

After the deploy scripts have run, you can deploy the subgraph. Assuming you are in the ens-subgraph repo, you can use:

yarn setup
  1. Wait for the subgraph to sync

Similar to the update process, a good indicator of sync status is if you see this message:

no chain head update for 30 seconds, polling for update, component: BlockStream

Dissimilar to the update process however is that you will never need to mine blocks manually.

  1. Exit the test environment

You can exit out of the test environment using Ctrl+C.

Once exited, you can commit the data to your branch. You do not need to run a separate save command.

E2E Testing

Note: You don't need to run the test environment command. It is all handled in the e2e script.

pnpm e2e

Building and Starting

pnpm build
pnpm start

# Or with the test environment running
pnpm build:glocal
pnpm buildandstart:glocal

PR builds

Cloudflare will automatically build and deploy a test site when pushed to a new PR branch.

External Package Local Development

  1. Install yalc globally:
npm i -g yalc
  1. Run relevant update script within external repo, for example:
# Example publish script for ENSjs, be aware this may have changed.
pnpm publish:local:ensjs
  1. Run pnpm install within this repo:
pnpm install

If updating an existing yalc installation, you can add the --force flag.

Architecture

The structure of the pages folder is mimicked inside components. Components specific to a page can be found in the the components folder, in the folder corresponding to that page.

Components that are used in multiple places will be found in the top level of the components folder.

Testing philosophy

Our testing philosophy is user-centric, meaning we want to write out tests so that they resemble the way a user would use our app as much as possible. We've borrowed this from the excellent testing-library.

A user generally clicks, types and swipes, and so most tests should include one of these actions. A user may also load a page in a specific state (by clicking, typing or swiping outside of the app) so sometimes we just want to check a page renders correctly. The vast majority of our tests will be of these kinds.

For deeper parts of the codebase that aren't directly related to a user interaction, such as utility functions, the user is the developer. So simply test the code in the way a developer would use it.

We also primarily test for functionality, making sure the user is able to complete any action that we intend for them to be able to complete. This means we wouldn't write tests to ensure an animation occurs, as that would not stop a user completing an action, and would likely be picked up during the course of development.

Writing out todo tests before implementing a test can help. If I want my form to submit the correct data when I click submit, then I should write it.todo('should submit the correct data when submit is clicked') before starting. This will prevent me from testing implementation details as I write out the component.

jns-app-v3's People

Contributors

tateb avatar storywithoutend avatar leonmanrolls avatar talentlessguy avatar sugh01 avatar jefflau avatar makoto avatar mdtanrikulu avatar lucemans avatar trees0x avatar arachnid avatar hibbb avatar stoooops avatar rex4539 avatar doplur avatar gskril avatar bestsilly avatar cthulu-dot-eth avatar

jns-app-v3's Issues

Registration Proxy with Unicode Filter and List Management

This integration ensures centralized control and management under the JNSAdminContract. #3

Mapping Implementation:

  • Use Solidity mappings to store whitelisted and blacklisted Unicode characters.
  • Ensure characters are stored using their Unicode code points as keys. (key: byte32, value: boolean)

Character Validation Logic:

  • Develop logic to validate each character in a requested JNS name against the whitelist and blacklist mappings.

List Management Functions:

  • Create functions to add and remove characters from the whitelist and blacklist.
  • Implement access control to restrict list management functions to authorized users.
  • Implement a getWhitelist function

Add Blacklist word Filter for Registration

  • Implement a blacklist word filter during the domain registration process to screen for explicit language, in both Thai and English.
  • In cases where inappropriate domain names are discovered post-registration, add them to a blacklist at the Web 2.0 API level only.
  • There must not be a function to burn NFTs.

Update JNS NFT Logo to JFIN Logo and Modify Background Gradient to JFIN Colors

  • Update Logo:

    • Current State: The application uses an ENS logo.
    • Action Required: Replace the current logo with the JFIN logo provided in the assets folder.
  • Modify Background Gradient:

    • Current State: The background gradient uses an ENS color scheme.
    • Action Required: Change the background gradient to use the JFIN colors.

JNS Initial Setup Process

  • Join Connect (Prod, Test)
  • Setup Policy, Term of use
  • Setup Wallet connect
  • Deploy JNS Contract (Mainnet, Testnet)
  • Deploy Avatar service (Prod, Test)
  • Setup Avatar Service R2 Bucket (Prod, Test)
  • Deploy Metadata service (Prod, Test)
  • Setup Deployment Manual
  • Setup JNS Subgraph (Mainnet)
  • Setup JNS Domain name
  • Initiat Register Name
  • JNS Admin Wallet
  • Recipient Wallet
  • Setup JNS SDK (JFINSCAN, JOIN, HYPERNFT)

Implement a blacklist for name registration

action item กรณีตั้งชื่อไม่เหมาะสม

มี blacklist word กันไว้ตั้งแต่ตอนจดชื่อ เพื่อกรองคำหยาบที่ชัดเจนตั้งแต่แรก Thai + Eng (กันแค่คนที่จดผ่าน frontend) (เข้าใจว่ากรองได้ไม่ทุกเคส แต่เอาเท่าที่เราพอจะทำได้ เพื่อสื่อสารทางอ้อมกับภายนอกว่าเรา aware เรื่องนี้ตั้งแต่แรก)
กรณีพบเจอย้อนหลัง ว่ามีคนจดชื่อไม่เหมาะสมไปแล้ว >> blacklist ระดับ web 2 api เท่านั้น ห้ามมี function burn nft

JNS Admin Contract

  • forward received withdrawal
  • change destination withdrawal address (ROLE #1)
  • oracle price proxy
  • change oracle price contract destination (ROLE #2)
  • AccessControlDefaultAdminRules for access transfer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.