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

feat(taikoon): taikoon ui setup #16854

Merged
merged 58 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1992970
brought over contracts, tests and scripts; getting everything to run now
bearni95 Apr 25, 2024
b9b56ba
refreshed gitignore
bearni95 Apr 25, 2024
570e770
removed lib from tree
bearni95 Apr 25, 2024
175e4a4
tracking pnpm-lock.yaml main
bearni95 Apr 25, 2024
2d89594
missing deps added to enable compiling
bearni95 Apr 25, 2024
d3335f1
format & mint
bearni95 Apr 25, 2024
cb4baca
cleared lint warnings
bearni95 Apr 25, 2024
d44c463
updated pnpm; passing tests and build
bearni95 Apr 25, 2024
6817f27
removed .gitmodules
bearni95 Apr 25, 2024
71eaf4c
fixed typo leafs > leaves
bearni95 Apr 25, 2024
2442adc
added build step to gha
bearni95 Apr 25, 2024
7a522a2
fixed merkle whitelist generation script under new location
bearni95 Apr 25, 2024
5f55717
localhost deployment re-enabled
bearni95 Apr 25, 2024
30ec660
added holesky deployment
bearni95 Apr 25, 2024
311d129
restored ipfs deploy script
bearni95 Apr 25, 2024
c7e5731
updated pnpm-lock.yaml
bearni95 Apr 25, 2024
3e2099f
ran linter
bearni95 Apr 25, 2024
8b42156
simplified tests for taikoonToken.t.sol
bearni95 Apr 25, 2024
ae80196
updated forge-std version
bearni95 Apr 25, 2024
9e6f6e9
added compile step to gha
bearni95 Apr 25, 2024
bacd1d1
fixed gha typo
bearni95 Apr 25, 2024
3bd7dad
upgraded foundry toolchain version on gha
bearni95 Apr 25, 2024
ae94276
upgraded foundry toolchain version on gha
bearni95 Apr 25, 2024
57d0404
frontend builds
bearni95 Apr 25, 2024
b724f0d
holesky deployments enabled
bearni95 Apr 25, 2024
93328c9
recovered functionality for frontend
bearni95 Apr 25, 2024
f10fade
gha for taikoon-ui
bearni95 Apr 25, 2024
84e2746
removed unused graphql schema
bearni95 Apr 25, 2024
bf6c85a
formatted and linted frontend
bearni95 Apr 25, 2024
a8dd1d1
changed lorem ipsum to the first pages of the hobbit to bypass typo c…
bearni95 Apr 25, 2024
3c8b4f4
added .env var to gha
bearni95 Apr 25, 2024
78057a4
typos fixed
bearni95 Apr 25, 2024
a816b7c
fixes for lint and typos
bearni95 Apr 25, 2024
b0de72e
Merge branch 'main' into taikoon-ui-setup
bearni95 Apr 26, 2024
08ca14f
Merge branch 'main' into taikoon-ui-setup
dantaik Apr 29, 2024
2b62a91
removed csv and json whitelists; added an example templated one
bearni95 Apr 29, 2024
08799e8
using viem's zeroAddress instead of custom one
bearni95 Apr 29, 2024
e456f00
replaced explicit address type with viem's one
bearni95 Apr 29, 2024
47b825e
moved IPFS_GATEWAY to .env; created .env.example
bearni95 Apr 29, 2024
4e90dec
cleanup of unused errors
bearni95 Apr 29, 2024
eaca895
- token custom errors implemented
bearni95 Apr 29, 2024
d11656e
ipfs custom errors
bearni95 Apr 29, 2024
4ca46ce
cleanup of unused errors
bearni95 Apr 29, 2024
5b77e71
replaced 'classes' component export with 136259props.class
bearni95 Apr 29, 2024
7df8737
i18n texts for landing and countdown pages and all their sections
bearni95 Apr 29, 2024
6240913
mint page, mint modal and terms modal have i18n texts
bearni95 Apr 29, 2024
47775d6
collection page using i18n
bearni95 Apr 29, 2024
43ac853
using daisyui collapsible element
bearni95 Apr 29, 2024
9431abd
non-core, non-modal, non-section components with abstracted classing
bearni95 Apr 29, 2024
fdb8434
refactored classes for core components
bearni95 Apr 29, 2024
86c0883
refactored classes for modals
bearni95 Apr 29, 2024
bfb6e75
refactored classes out of sections
bearni95 Apr 29, 2024
ece7ca9
re-run pnpm install + lock.yaml
bearni95 Apr 29, 2024
df0f258
Merge branch 'main' into taikoon-ui-setup
bearni95 Apr 29, 2024
a75cc55
patched pnpm-lock.yaml
bearni95 Apr 29, 2024
a024efc
formatted and lintes taikoons package
bearni95 Apr 29, 2024
6c86d89
added env var for ipfs gateway to gha
bearni95 Apr 29, 2024
307ddb1
Merge branch 'main' into taikoon-ui-setup
bearni95 Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/workflows/taikoon-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Taikoon UI

on:
push:
branches: [main]
paths:
- "packages/taikoon-ui/**"
pull_request:
paths:
- "packages/taikoon-ui/**"

jobs:
build:
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Check formatting
working-directory: ./packages/taikoon-ui
run: pnpm lint

- name: Frontend build
working-directory: ./packages/taikoon-ui
run: |
export PUBLIC_WALLETCONNECT_PROJECT_ID="fake_project_id"
export PUBLIC_IPFS_GATEWAY="https://ipfs.io/ipfs/"
pnpm build
2 changes: 2 additions & 0 deletions packages/taikoon-ui/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PUBLIC_WALLETCONNECT_PROJECT_ID=
PUBLIC_IPFS_GATEWAY=
20 changes: 20 additions & 0 deletions packages/taikoon-ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.DS_Store
node_modules
coverage
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Generated files
/src/abi/*
CHANGELOG.md

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

src/generated/*
49 changes: 49 additions & 0 deletions packages/taikoon-ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'simple-import-sort'],
rules: {
'linebreak-style': ['error', 'unix'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-irregular-whitespace': 'off'
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte'],
},
env: {
browser: true,
es2017: true,
node: true,
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
{
files: ['*.ts', '*.svelte'],
rules: {
// TS will take care of this potential error. For more information please visit:
// https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',


},
},
],
}
10 changes: 10 additions & 0 deletions packages/taikoon-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
4 changes: 4 additions & 0 deletions packages/taikoon-ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
18 changes: 18 additions & 0 deletions packages/taikoon-ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"semi": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all",
"bracketSameLine": true,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
58 changes: 58 additions & 0 deletions packages/taikoon-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Frontend

## Install

```bash
npm install
```

## Run

Start the development server:

```bash
npm start
```

## Storybook

Tool to develop UI components in isolation. Run the following command to start the storybook server:

```bash
npm run storybook
```

---

## Status Tracker

### Pages

| Page | Status | Notes |
| ------------- | ------ | ----- |
| Countdown | | |
| Landing | | |
| Mint | | |
| Auction | | |
| Explore | | |
| Your Taikoons | | |

### Components

| Component | Status | Notes |
| -------------- | --------------------- | ----- |
| Header | | |
| Countdown | | |
| NFT Renderer | | |
| Background | | |
| Landing Header | Design Ready | |
| Landing Text | Design Ready | |
| Landing FAQ | Design Ready | |
| Landing Links | Design Ready | |
| Footer | Design Ready | |
| Mint Form | Design Ready | |
| Auction Form | Design Ready | |
| Card | In Storybook | |
| Button | In Storybook | |
| Text Input | Implemented on Weblab | |
| Spinner | In Storybook |
72 changes: 72 additions & 0 deletions packages/taikoon-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "taikoon-ui",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check ./src && eslint ./src --fix",
"format": "prettier --write ./src",
"test:integration": "playwright test",
"test:unit": "vitest",
"start": "npm run generate:abi && vite dev --open",
"generate:abi": "cd ../taikoon && pnpm compile && cd - && wagmi generate"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.3.1",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"convert-csv-to-json": "^2.44.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-svelte": "^2.35.1",
"p-map": "^7.0.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"raw-body": "^2.5.2",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-copy": "^1.4.2",
"svelte-i18n": "^4.0.0",
"svelte-scrolling": "^1.4.0",
"tailwindcss-image-rendering": "^1.0.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.2.0",
"which": "^4.0.0"
},
"type": "module",
"dependencies": {
"@openzeppelin/merkle-tree": "^1.0.6",
"@wagmi/cli": "^2.1.4",
"@wagmi/connectors": "^4.1.18",
"@wagmi/core": "^2.6.9",
"@web3modal/common": "^4.1.1",
"@web3modal/ui": "^4.1.1",
"@web3modal/wagmi": "^4.1.1",
"@zerodevx/svelte-toast": "^0.9.5",
"autoprefixer": "^10.4.19",
"daisyui": "^4.10.1",
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"minidenticons": "^4.2.1",
"postcss": "^8.4.38",
"svelte-countdown": "^1.1.2",
"tailwindcss": "^3.4.3",
"viem": "^2.9.26"
}
}
12 changes: 12 additions & 0 deletions packages/taikoon-ui/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { PlaywrightTestConfig } from '@playwright/test'

const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173,
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
}

export default config
6 changes: 6 additions & 0 deletions packages/taikoon-ui/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
62 changes: 62 additions & 0 deletions packages/taikoon-ui/src/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export const recommendedProcessingFee = {
ethGasLimit: BigInt(900_000),
erc20NotDeployedGasLimit: BigInt(3_100_000),
erc20DeployedGasLimit: BigInt(1_100_000),
erc721NotDeployedGasLimit: BigInt(2_400_000),
erc721DeployedGasLimit: BigInt(1_100_000),
erc1155NotDeployedGasLimit: BigInt(2_600_000),
erc1155DeployedGasLimit: BigInt(1_100_000),
};

export const processingFeeComponent = {
closingDelayOptionClick: 300,
intervalComputeRecommendedFee: 20_000,
};

export const bridgeService = {
noOwnerGasLimit: BigInt(140_000),
noERC20TokenDeployedGasLimit: BigInt(3_000_000),
erc20GasLimitThreshold: BigInt(2_500_000),

noERC721TokenDeployedGasLimit: BigInt(2_400_000),
erc721GasLimitThreshold: BigInt(3_000_000),

noERC1155TokenDeployedGasLimit: BigInt(2_600_000),
erc1155GasLimitThreshold: BigInt(3_000_000),
};

export const pendingTransaction = {
waitTimeout: 300_000,
};

export const storageService = {
bridgeTxPrefix: 'transactions',
customTokenPrefix: 'custom-tokens',
};

export const bridgeTransactionPoller = {
interval: 20_000,
};

export const statusComponent = {
minimumEthToClaim: 0.0001,
};

export const transactionConfig = {
pageSizeDesktop: 6,
pageSizeMobile: 5,
blurTransitionTime: 300,
};

export const toastConfig = {
duration: 5000,
};

export const apiService = {
timeout: 5000,
};

export const ipfsConfig = {
gatewayTimeout: 200,
overallTimeout: 5000,
};
Loading